/api/global/v1/... for version 1) and the “minor” version is specified by the client in either a header
or query parameter.
Example
Request
cURL
v1 and the minor version is 2024-10.
Major Version
The endpoints of a major version indicated in the url path (e.g.v1) will always remain backward-compatible, if
possible, and breaking changes should only be introduced by adding a new version so that the old version is left unchanged.
New endpoints will often be added to the current version without incrementing the version number, so new major versions should
be infrequent. Each version is like a namespace and multiple versions may be available in which case you should always
use the newest that provides the functionality you need.
Beta Version
The/api/global/beta namespace may used to provide new functionality that is still simmering, with the expectation that it
will be added to the latest version in the future. This will hopefully require you to just change beta to v1, for example, when the
functionality is declared to be finalized.
Minor Version
The minor version should be specified in every request with aX-ShipStream-API-Version header or a version= query parameter.
This should be chosen as the year and month of the latest version at the time the integration is developed.
The latest recognized version will only be updated whenever a breaking change is made, such as if a field’s type must
be modified or a field was renamed or removed. This version number will be used to maintain backwards compatibility for
a limited time so that minor changes can be introduced without duplicating the API with a new major version each time, or
otherwise hampering the ability to make changes.
For example, if the field foo needs to be changed from an integer to a string, the API docs will be updated to reflect
that a string is returned, and the latest recognized version will be updated to the current year and month. Any API
requests for an older version will return the integer, and any API requests for a newer version will return a string.
The API response will include a header named X-ShipStream-API-Version which contains the effective version for the given request.
Validation
If an invalid version number is specified in the request, a400 error will be thrown and the error message will indicate
the latest tagged version. Specifying a future date is not allowed, since you can’t predict what changes will potentially
be made in the future.
Deprecation
If the requested version is deprecated or no longer supported, aX-ShipStream-API-Version-Error header will be added to the response.