Versioning

Smake Api uses versioning to roll out backwards-incompatible changes over time.


Backwards-compatible changes

Smake considers the following changes to be backwards-compatible:

  • Adding new API resources.
  • Adding new optional request parameters to existing API methods.
  • Adding new attributes to existing API responses.
  • Changing the order of attributes in existing API responses.
  • Adding new event types.

About Versioning

The API version will control the API and webhook behaviors, such as parameters accepted in requests, and response properties.

A new version of the API is released when backwards-incompatible changes are made to the API. To avoid breaking your code, we will never force you to upgrade until you’re ready.

We will be releasing backwards-compatible changes without introducing new versions. Your code will be able to handle these changes no matter what version it’s on.

Upgrade your Api Version

We recommend staying up-to-date with the current API version to take advantage of latest improvements to the Smake API.

To see your current version and upgrade to the latest, visit the API Page on your app.

Versioning of the Smake API will be released as dates, displayed as: YYYY-MM-DD

Test Before Upgrading

To test your code under a different API version before committing the change, you can set the API version on a specific request by setting a header with the version you are testing. The version will be set for subsequent requests until it’s changed back.

{danger} Users can only upgrade their API to the latest version. Once you’ve upgraded your API version, you cannot roll back to an earlier version. Please make sure to test thoroughly before doing so.

Example

GET /products HTTP/1.1
X-Api-Version: 2018-12-06