Learn about API versioning and updating, as well as non-breaking and breaking changes.
Your account's API version determines the allowable requests and the response structure returned by those requests. The version also defines the structure of generated events. Your account is automatically set to the latest version when you sign up for the Digital River API.
We will release non-breaking changes without introducing new versions. Your code will be able to handle these changes no matter what version it's on. The following changes are non-breaking, and the descriptions for these non-breaking changes appear in the latest version of the documentation:
Adding a new API resource
Adding a new method to an API resource
Adding new optional request parameters to existing API methods
Adding new properties to an existing API resource
Changing the order of properties in existing API responses
Changing existing error response codes or messages
Adding a field to a request or response
Adding a value to an enum
Adding new event types
Adding or removing prefixes (such as sku_ for SKU IDs)
Changing the length or format of strings, such as object IDs, error messages, and other human-readable strings
Periodically we release new features that require you to apply changes to your application before you can safely update to the latest version without disruption. These features are "breaking changes."
The following changes are breaking:
Adding new or modifying existing validation to an existing API resource
Requiring a parameter that was not required before
Modifying the expected payload of webhooks and async callbacks
Changing the data type of an existing field
Changing the supported filtering for existing API resources
Renaming a field or API resource
Adding a new feature that will change the meaning of a field
Removing an existing field or API resource
Changing the URL structure of an existing API resource
Whenever we release these breaking changes, we create a new version of the Digital River API and the API reference portal. In the documentation portal, we add notes that describe the breaking changes, such as in the sample below.
Image: Sample notification of a breaking change
Updating your API version
To see what API version you're currently running and update to the latest API version, navigate to the API keys section in Dashboard. If you're running an older version of the API, you can update to the latest version to take advantage of new features and improvements.
Test the new API before updating to the new version. Digital River provides a test environment where you test Digital River features without affecting live data.
You should always ensure that your API keys are configured for the version expected by your code. In other words, when your code is deployed from test to production, the version on the keys should match the code version.
We recommend that you update and test a new API version in your test environment before you update the API version in the production environment. Your production environment can remain on the production version until you are ready to upgrade to the latest version. This allows you to continue using your API keys associated with your production environment while testing a new version in your test environment. When you finish testing, you can update your production environment.
Creating a restricted key and assigning it to a version
You can create a webhook and assign it to a specific version. This allows you to send a specific notification to a team or partner.
Testing a version with a single API request
You can test a single API request without upgrading your API key. Select a version of the library to change the API version used and create a webhook endpoint with the same API version as the DigitalRiver.API_VERSION property in the library. Use the Release notes to find the API version you need and view all breaking changes.
To set an API version with a specific request, send the version number in the header: digitalriver-version=2020-09-30