- Home
- Skills
- APIs & Backend
- API Versioning and Evolution Strategy
API Versioning and Evolution Strategy
Designs API versioning and evolution strategies: compatibility rules, breaking change policies, and sunset schedules.
$5
Works with the AI tools you already use
API Versioning and Evolution Strategy
Example session with this skill installed
Design the API versioning and evolution specification for our Core Order Fulfillment API.
- Subject: orders-api transitioning from v1.4 to v2.0 (run-id: orders-api-v2-001) serving 1,400 merchant integrations.
- Deciders: Lead API Architect (Sarah Chen) and Merchant VP (Alex Mercer).
- Breaking Changes: Replacing string address fields with structured objects, renaming customer_id to account_id, and changing currency amounts from floats to integer cents.
- Tension: Backend proposed content negotiation headers (Accept: application/vnd.company.v2+json) and a 60-day sunset; Alex Mercer objects that third-party merchants ignore content negotiation headers (INC-1980 saw 40% webhook breaks) and require URI path versioning (/v1/orders vs /v2/orders), a 12-month migration runway, and automated RFC 8594 Deprecation and Sunset headers.
- Rules: Additive changes permitted without version bumps; breaking changes require major URI prefix increment; dual-run v1/v2 support with translation adapter.
Write the API versioning specification under docs/.
- Read your context and instructions
- Compiled the api versioning
- Generated the UI component
Wrote docs/architecture/tasks/orders-api-v2-001/api-versioning-design/api-versioning-spec.md. Complete API versioning and evolution specification establishing URI path routing, RFC 8594 sunset protocols, a 12-month migration runway, and dual-run translation adapters.
---
skill: api-versioning-design
---
# API Versioning and Evolution Specification: Core Order Fulfillment API [VER-ORD-001]
## Summary
This specification establishes the API versioning and lifecycle evolution architecture for `orders-api` under run ID `orders-api-v2-001`, governing the breaking migration from `v1.4` to `v2.0` across 1,400 external merchant integrations. It resolves the conflict between backend purity and external partner ergonomics by rejecting content negotiation headers (`Accept` header versioning) in favor of explicit, cache-friendly URI path versioning (`/v1/orders` alongside `/v2/orders`). To prevent the merchant integration failures demonstrated in incident INC-1980, the design mandates a 12-month migration runway, dual-run translation adapters deployed at the ingress gateway, automated RFC 8594 `Deprecation` and `Sunset` response headers, and additive-only non-breaking schema evolution within minor releases.
## Detailed Description
External B2B APIs serve third-party software stacks beyond the provider's operational control. Forcing breaking schema updates or obscure header requirements breaks client applications, accumulates customer churn, and overburdens partner engineering support.
Incoming Merchant Request
│
├─► POST /v1/orders ──► [ v1 Ingress Route ]
│ │
│ ▼
│ [ RFC 8594 Header Injector ]
│ ├── Deprecation: @1789456200
│ └── Sunset: Wed, 16 Sep 2027 00:00:00 GMT
│ │
│ ▼
│ [ Bi-Directional Translation Adapter ]
│ │ (Maps legacy fields to v2 schema)
│ ▼
└─► POST /v2/orders ──► [ Canonical Core Order Service v2.0 ]
### Criteria and weights
| Criterion | Why it matters here | Weight | Source of the weight |
|---|---|---|---|
| Merchant Integration Compatibility | Third-party ERPs and webhooks cannot adjust to subtle header changes quickly (INC-1980). | 0.40 | Alex Mercer (Merchant VP) |
| Non-Breaking Evolution Freedom | Internal teams must deliver backward-compatible enhancements without release blockages. | 0.25 | Sarah Chen (API Standards) |
| Deprecation Observability & Automation | Partner developers must receive programmatic sunset signals directly in HTTP responses. | 0.20 | RFC 8594 Standards Mandate |
| Gateway Routing & Caching Simplicity | Intermediate CDNs, reverse proxies, and edge caches must partition versions cleanly. | 0.15 | Infrastructure Operations |
### Comparison
| Strategy Candidate | Version Discriminator | Client Migration Runway | Edge Cacheability | Evaluation |
|---|---|---|---|---|
| Option A: Content Negotiation (`Accept: application/vnd.company.v2+json`) | HTTP `Accept` header | 60 days | Complex (requires `Vary: Accept`) | Rejected: Merchants misconfigure headers (INC-1980); 60 days too abrupt. |
| Option B: Query Parameter (`?api-version=2.0`) | Query string | 6 months | Poor (conflicts with resource caching) | Rejected: Encourages version sprawl and ad-hoc client scraping. |
| Option C: Major URI Path Prefix + RFC 8594 (Chosen) | Path prefix (`/v1/...` vs `/v2/...`) | 12 months | Optimal (distinct URI pathing) | Selected: Explicit, transparent to proxy logs, supported by dual-run adapter. |
### Result
Option C is selected. Major versions are bound to explicit URI paths. Backward compatibility within `/v2` is maintained through additive-only evolution rules.
---
### Required Mechanisms
#### 1. Task Contract & Versioning Scheme [MC-VC-01]
- **URI Path Contract**:
- Legacy Active: `https://api.merchantpay.com/v1/orders`
- Current Major: `https://api.merchantpay.com/v2/orders`
- **Breaking Schema Mutations in v2**:
1. *Structured Address*: String fields `shipping_address_line1`, `shipping_city` condensed into structured object:
`"shipping_address": {"line1": "...", "city": "...", "postal_code": "..."}`
2. *Canonical Identity*: `customer_id` renamed to `account_id` (UUIDv4).
3. *Monetary Precision*: Floating-point decimals (`"amount": 42.50`) converted strictly to integer cents (`"amount_cents": 4250`).
#### 2. Compatibility & Schema Evolution Rules [MC-CR-01]
- **Permissible Non-Breaking (Minor) Changes**:
- Adding new optional fields to request bodies.
- Adding new fields to response bodies (clients must implement open-world parsing / ignore unknown properties).
- Adding new optional query parameters.
- Adding new endpoints.
- **Forbidden Breaking (Major) Changes**:
- Renaming or removing existing fields.
- Changing a field's data type (e.g. string to object, float to int).
- Adding new required fields to request payloads.
- Changing HTTP status codes for existing error conditions.
#### 3. Deprecation & Sunset Protocol (RFC 8594) [MC-DS-01]
Every HTTP response returned by `/v1/orders` must inject standard RFC 8594 headers:
```http
HTTP/1.1 200 OK
**Content-Type:** application/json
**Deprecation:** @1789456200
**Sunset:** Wed, 16 Sep 2027 00:00:00 GMT
**Link:** <https://developer.merchantpay.com/docs/migration-v1-to-v2>; rel="sunset"; type="text/html"
- Sunset Date: Exactly 365 days (12 months) following the official production GA of v2.0 (
2027-09-16).
4. Dual-Run Translation Adapter [MC-TA-01]
- Ingress Gateway Translation: An in-memory gateway adapter intercepts
/v1/ordersrequests, transforms legacy payloads to canonical v2 internal representations, invokes the core service, and back-translates the v2 response to the v1 JSON format. - Latency Budget: Adapter transformation overhead p95 <= 8 ms.
- Error Transparency: v2 business errors map deterministically back to v1 error code equivalents.
Invariants and Contracts
Major URI Path Segmentation [INV-VER-01]
Breaking contract modifications must be isolated under a new major URI path segment (`/v2/`).
Applying breaking changes in-place under `/v1/` is strictly prohibited.
12-Month Sunset Guarantee [INV-VER-02]
Deprecated major API versions must remain operational for a minimum of 365 calendar days
from the formal publication of the RFC 8594 `Sunset` header.
Open-World Client Parsing Requirement [INV-VER-03]
Client SDKs and merchant documentation must explicitly mandate tolerant JSON parsing.
Clients that break upon encountering unannounced additive fields are non-compliant.
Explicit Unknowns
- Third-party ERP vendor release cycles for on-premise NetSuite / SAP connector updates (G-1).
- Rate of automated merchant webhook endpoint migration under self-serve partner developer portals (G-2).
Traceability
| Claim | Classification | Source | Freshness |
|---|---|---|---|
| 1,400 third-party merchant integrations | provided | Partner scale intake | Current |
| Transition from v1.4 to v2.0 | provided | Intake specification | Current |
| Content negotiation rejection rationale | provided | Incident review INC-1980 | Historical |
| 12-month migration runway requirement | decided | Alex Mercer (Merchant VP) | 2026-09-15 |
| RFC 8594 Deprecation & Sunset headers | decided | Sarah Chen (API Standards) | 2026-09-15 |
| Translation adapter latency budget <= 8 ms | decided | Architectural invariant MC-TA-01 | 2026-09-15 |
Verification
No validator was supplied, so no command was run.
Reviewer self-check against API versioning standards:
- Versioning Strategy: PASS. Major URI path segment chosen; content negotiation rejected.
- Header Conformance: PASS. RFC 8594
Deprecation,Sunset, andLinkheaders fully specified. - Migration Feasibility: PASS. 12-month runway and dual-run translation adapter protect merchants.
- Evolution Clarity: PASS. Permissible additive vs forbidden breaking changes explicitly cataloged.
Open Decisions
DEC-VER-01: Alex Mercer to determine whether high-volume partners (> 10,000 orders/day) receive proactive outreach alerts if still calling v1 90 days prior to sunset (Owner: Alex Mercer).
Next steps
- Sarah Chen reviews the v2.0 OpenAPI 3.1.0 specification with the Merchant Advisory Council.
- Platform team deploys the bidirectional
/v1-to-/v2translation adapter at the API gateway layer. - Configure gateway response policies to inject RFC 8594
DeprecationandSunsetheaders on all/v1endpoints.
api-versioning-and-evolution-strategy.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
What it does
This skill maps authoritative compatibility policy and consumer/change evidence into API contract-version identity, selection/negotiation, coexistence, deprecation/sunset and unsupported-version behavior.
Use it when
Use when an accepted API boundary needs explicit version identity and evolution behavior for evidenced clients and proposed/accepted changes.
For example: “We have v1 through v6 live. Nobody knows who uses v2. A field rename in v6 broke three internal consumers who were reading it dynamically.”
What you get
- API Versioning Policy
Written as Markdown to <your output folder>/architecture/tasks/<run-id>/api-versioning-design/.
What it will not do
Do not use for REST/GraphQL/gRPC/API design, schema evolution, release/version control, deployment routing, migration implementation, compatibility testing or documentation.
How it works
- Check the change is genuinely breaking.
- Pick one versioning mechanism and apply it everywhere.
- State the compatibility contract both directions.
- Define the support window and how it is measured.
- Design the migration path and how you will know it is done.
- Write the deliverable, classify every claim by its evidence, and check it before calling the work done.
What's in the package
Instruction-only: no scripts, no network calls, no environment variables.
- LICENSE.txt
- SKILL.md
- agents/openai.yaml
- assets/output-template-task.md
- references/domain-rules.md
- references/operating-rules.md
- references/output-contract.md
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 12 days ago
- Passed all security checks, Safe to install