Zum Inhalt springen
SAP, DATEV and Dynamics experts
Integration

API Versioning: Keeping Interfaces Long-Lasting

12 min read
API-VersionierungDeprecationSchnittstellenBackward CompatibilityWartbarkeit

An interface between a shop and an ERP is rarely built to last forever: fields get added, data formats change, new business rules demand different structures. The central question is how an API can evolve without destroying existing integrations overnight. According to the Postman State of the API Report, 60 percent of API providers cite breaking changes as one of their biggest challenges (Postman State of the API 2023). At the same time, only 60 percent of teams actively version their APIs at all, and just 26 percent use semantic versioning (Postman State of the API 2025). Anyone who wants to keep shop interfaces stable and long-lasting therefore needs a well-considered versioning and deprecation strategy from the start. This article shows the common versioning models, their pros and cons and what an orderly interface lifecycle looks like.

API Versioning: Lifecycle of an Interfacev1 activev1 deprecatedv1 sunsetv2 releaseshutdownv2 active (parallel to migration phase)Versioning StrategiesURI Versioning/api/v2/ordersVisible, cacheableHeader VersioningAccept: v=2026-06Clean URLsDate Versioning2026-06-22Per-client pinningDeprecation Signals for ConsumersDeprecation headerSunset dateChangelogMigration guide

Why API Versioning Determines Lifespan

APIs have become the infrastructure of digital commerce. According to Gartner, over 90 percent of new enterprise applications now integrate APIs as a core component of their architecture (Gartner). The API management market is expected to grow from around 10 billion US dollars in 2025 to over 100 billion US dollars by 2033 (Market Data Forecast, 2025). The more systems depend on an interface, the more expensive every uncoordinated change becomes.

The core problem is the coupling between provider and consumer. When the shop renames a data field that a connected ERP system expects, processing breaks -- possibly unnoticed until orders stop arriving. Versioning solves this by providing several state-of-the-art definitions of an interface simultaneously: existing consumers keep working with the old version while new features ship in a new version. This temporal decoupling is the foundation of every maintainable integration and complements the architecture questions we cover in our article on REST API versus middleware.

Breaking Change and Non-Breaking Change

A breaking change forces consumers to adapt: removed fields, changed data types, renamed endpoints or stricter required fields. A non-breaking change is backward-compatible: new optional fields, new endpoints or additional enum values. The rule of thumb is not to remove or reinterpret existing structures, but consistently extend additively.

URI Versioning: The Version Lives in the Path

The most widespread strategy is URI versioning, where the version number is part of the path, such as /api/v1/orders and /api/v2/orders. The big advantage is visibility: every call immediately makes clear which version is being used. This simplifies debugging, logging and caching through proxies and CDNs, since different versions have different URLs.

URI versioning is also the easiest for developers to understand and testable directly in the browser address bar. The Shopware Store API and Admin API work with a version prefix in the path, which fits this model well. The downside: strictly speaking, the same resource should be reachable under a stable URL -- several versions of the same order under different paths contradict pure REST doctrine. In practice, however, pragmatism usually prevails.

URI Versioning
GET /api/v1/orders/4711
GET /api/v2/orders/4711

# v2 introduces a structured address object,
# v1 remains reachable unchanged for existing consumers

Header Versioning: Clean URLs, Version in the Request

With header versioning, the URL stays stable and the desired version is transmitted via an HTTP header -- either through a dedicated header like X-API-Version or through content negotiation in the Accept header. The resource URL thus stays identical across all versions, which is closer to the REST philosophy.

The downside is lower visibility: the version is not recognizable in the URL, which complicates debugging and caching. Header-based versioning also requires disciplined clients that reliably set the header. If a consumer forgets the header, the server must deliver a sensible default version -- and this default choice becomes the critical decision at every version change. Which variant fits depends on the consumer landscape and caching requirements.

CriterionURI VersioningHeader Versioning
VisibilityHigh, version in pathLow, version in header
CachingSimple, own URL per versionMore complex, Vary header needed
Browser testabilityDirectly possibleTooling required
REST conformityWeaker (multiple URLs)Stronger (stable URL)
AdoptionVery highMedium, mostly large APIs
Default version neededOptionalImportant when header missing

Date Versioning and Client Pinning

A third model uses date stamps instead of sequential numbers, such as version 2026-06-22. This approach has proven itself with large platform APIs, foremost among them Stripe, which has versioned its API by date since 2011 and maintained backward compatibility for over a decade (Stripe Engineering Blog). On the first call, an account is automatically pinned to the current version -- so-called pinning.

The charm of this model lies in its internal design: the core logic only knows the latest version. Older versions are handled by isolated transformation modules that step by step convert a modern response back into the format of older versions (Stripe Engineering Blog). The business logic thus stays free of branches for old versions, and new features emerge without regard for historical schemas. For shop interfaces with many external consumers this pattern can serve as a model, even though it is more demanding to implement.

Stripe has maintained compatibility with every API version since its founding in 2011 -- over a decade of backward-compatible interfaces through consistent transformation layers.

Stripe Engineering Blog

Semantic Versioning: Major, Minor, Patch

Semantic versioning (SemVer) structures version numbers according to the MAJOR.MINOR.PATCH scheme. An increase of the major version signals breaking changes, a minor version backward-compatible extensions and a patch pure bug fixes. This scheme communicates the scope of a change through the number alone.

Despite its clarity, SemVer is less common with APIs than one might expect: only 26 percent of teams use semantic versioning, so most track changes without clearly communicating their impact (Postman State of the API 2025). For interfaces, a combination is usually advisable: the major version lands in the URI path (v1, v2), while minor and patch changes ship backward-compatibly within the same major version. Version paths thus stay stable, and only real breaking changes force a new path.

  • MAJOR (v1 to v2): breaking changes, new URI path, parallel availability during migration
  • MINOR: new optional fields or endpoints, backward-compatible, no path change
  • PATCH: bug fixes without interface change, transparent to consumers

Backward Compatibility as a Design Principle

The most effective strategy against version sprawl is to avoid breaking changes in the first place. The principle of tolerance requires that a consumer ignore unknown additional fields rather than responding with an error. A provider can then add new fields without disturbing existing clients. Conversely, a provider should as a rule not retroactively tighten required fields or change data types.

Extend Additively

Add new fields and endpoints instead of changing existing ones. Optional fields with sensible defaults keep old clients running.

Read Tolerantly

Consumers should ignore unknown fields and process only the data they need. This lets them survive additive extensions without adjustment.

Preserve Defaults

Changed default values are often unnoticed breaking changes. Existing defaults stay stable, new options are added additively.

Transformation Layer

A compatibility layer converts modern responses back to older formats and keeps the core logic free of version branches.

In integration projects this discipline pays off directly: the more changes stay backward-compatible, the less often a new major version must be rolled out -- and the less often consumers have to migrate. Robust error handling in interfaces complements this principle by catching unexpected data formats instead of aborting processing.

The Deprecation Process: Retiring Old Versions in an Orderly Way

No version lives forever. At some point an old interface version should be shut down to reduce maintenance effort. What matters is that this happens in an orderly way and with sufficient lead time. Industry-standard deprecation periods comprise an announcement phase, a migration phase and finally the shutdown; periods of several months up to around two years are common, depending on scope (Gravitee, 2025).

A clean deprecation process follows several stages. First the new version is released while the old one is marked as deprecated but kept running. Then consumers are actively informed and supported in migration. Only after the deadline expires does the shutdown follow, the so-called sunset.

  1. Announcement: release the new version, mark the old version as deprecated, maintain the changelog
  2. Signaling: send deprecation and sunset headers in every response of the old version
  3. Migration help: provide a migration guide, mapping tables and a point of contact
  4. Monitoring: measure usage of the old version, address remaining consumers specifically
  5. Sunset: shut down the old version after the deadline, with a clear error message and reference to the new version

Deprecation Signals: Headers, Sunset and Changelog

So that consumers do not overlook an impending shutdown, it should be signaled technically. The HTTP standard provides dedicated headers for this: the Deprecation header marks a response as outdated, the Sunset header names the planned shutdown date. Every client thus learns in a machine-readable way, on every call, that the version it uses has an expiry date.

Deprecation Signals in the Response Header
HTTP/1.1 200 OK
Deprecation: true
Sunset: Sat, 20 Jun 2026 23:59:59 GMT
Link: </en/api-development/>; rel="deprecation"
Warning: 299 - "Version v1 will be shut down on 2026-06-20, please migrate to v2"

In addition to the headers, a maintained changelog is needed that documents every change, as well as a migration guide that concretely describes the differences between versions. Clear communication is considered a central success factor, since breaking changes can cause significant disruption for dependent systems (Redocly, 2025). Anyone who communicates deprecation purely by email or documentation risks consumers missing the deadline -- machine-readable signals also reach automated clients.

API Evolution Instead of Version Sprawl

An increasingly preferred philosophy is API evolution: instead of creating a new version for every change, a single version is maintained for as long as possible. Non-breaking changes flow in directly, and only real breaking changes lead to a new version or a new endpoint. Successful platforms combine this approach with explicit versioning for the rare cases in which an incompatible change is unavoidable (Speakeasy, 2025).

This hybrid approach noticeably reduces the number of parallel versions and thus maintenance effort. Fewer versions mean fewer code paths, fewer tests and less confusion for consumers. For shop interfaces meant to run stably for years, the goal is therefore not as many versions as possible, but as few version changes as possible with high backward compatibility.

Fewer Versions, More Stability

Every additional live version considerably increases maintenance effort. The actual goal of a good versioning strategy is not to manage many versions, but to need a new major version as rarely as possible -- through consistent backward compatibility.

Contract Tests and Monitoring for Version Safety

To keep accidental breaking changes from reaching production in the first place, contract testing helps. It automatically checks whether an API still fulfills its documented contract -- such as an OpenAPI specification. If a field type changes or an endpoint disappears, the test fails already in the development pipeline before consumers are affected.

In addition, monitoring version usage provides the data basis for deprecation decisions. When it is measurable how many consumers still use an old version, the shutdown can be planned in a well-founded way instead of guessed. A central middleware gateway is well suited to capture version usage, error rates and latencies per version in one place. This observability is the prerequisite for shutting down old versions without surprising active consumers.

Versioning in Shop-ERP Integration Concretely

In the practice of shop-ERP integration, several versioned worlds meet: the Shopware API, the API of the ERP system such as SAP or Dynamics and possibly a custom integration layer. Each of these interfaces has its own version lifecycle, and updates rarely happen synchronously.

This is where the value of an interposed integration layer shows: it encapsulates the version differences of the connected systems. When the ERP system releases a new API version, only the corresponding connector in the integration layer is adjusted, while the shop continues working unchanged. This decoupling is the same principle we cover in detail in our article on REST API versus middleware -- applied to the problem of diverging version cycles. In our experience, the third or fourth connected system with its own version schedule arrives sooner than most companies initially assume (project experience).

Practical Tip for Long-Lasting Interfaces

Define already at the first design of an interface how it will later be versioned, how deprecation is communicated and which default version applies when none is specified. These decisions cost little effort at the start, but save costly migrations and unplanned outages later.

Sources and Studies

This article is based on data from: Postman State of the API Report (2023 and 2025), Gartner (API adoption forecasts), Market Data Forecast API Management Market (2025), Stripe Engineering Blog (API Versioning), Gravitee API Versioning Best Practices (2025), Redocly API Versioning Best Practices (2025), Speakeasy Versioning Best Practices (2025) and our own project experience.