Versioning and deprecation

What a version keeps, what may be added, how to write a tolerant client, and the headers of a deprecation.

On this page

The version is in the path, such as /inventory/v1, and a version never breaks a caller.

What stays the same in a version

  • Names, types and meanings of fields and statuses.
  • The behaviour of operations and the shape of events.
  • The shared rules of this guide: errors, idempotency, pagination, signatures.

What may be added

  • A new operation, a new optional parameter, a new field in an answer, a new event type.
  • A new value in a list of statuses.

Writing a tolerant client

WhenYour code
An answer or an event has a field you do not knowIgnores it.
A status has a value you do not knowTreats it as not final and reads the record again later.
An event has a type you did not subscribe toAnswers 2xx and skips it.

A new version

A change that could break a caller is a new version: v2 runs beside v1, under its own path. v1 keeps answering as it did. What moves to v2 is listed in the Changelog and in the docs of the product. What does not move, such as your credentials and your scope, stays the same.

Deprecation

A deprecation is announced in the Changelog and by e-mail to the technical contact of your account. From then on, the answers of a deprecated operation carry two headers.

HeaderMeaning
DeprecationThe date from which the operation is deprecated.
SunsetThe date from which the operation no longer answers.

Make your logs raise an alert on either header, so a deprecation reaches the developer even when the e-mail does not.

The contract number and the API version

The API version, v1, is in the path and changes rarely. The contract has its own number, info.version in /docs/openapi.json of each product, written as three parts. A correction raises the last part and an addition raises the middle part. The number of the contract tells you what changed inside v1, and the changelog of the product lists each number.