API Endpoints

DRS supports two base URLs which all endpoints are built on. In addition, you will request your LwA access tokens to a third URL.

Authenticating your API requests

To access DRS, you have obtained a Login with Amazon access token in STEP 3, which grants you access to the DRS APIs. When the customer completes the DRS flow by selecting the consumable(s) to replenish, your product will receive a token that you can use to get access.

There are two methods used to obtain an access token for use with DRS:

LwA Web API method for microsites or hybrid apps

LwA Mobile SDK method for iOS and Android apps

You will use the authorizationCode returned by these methods to contact the LwA endpoint and receive an access token.

Service calls

The following base URL must be used for all service related API calls, for instance replenishing an order or reporting the slot status of a device:

https://dash-replenishment-service-na.amazon.com

Note: This URL call requires the access token returned in the LwA call.

Web-related Calls

The following base URL must be used for all web-related calls. Use this URL for customer-facing pages and interactions, such as your settings and teaser pages:

https://drs-web.amazon.com

Note: This URL call requires the access token returned in the LwA call.

API Versioning

Amazon is using versioning to incrementally update API functionality without directly impacting customers. It is mandatory to pass in the following headers for every Service API call: x-amzn-type-version and x-amzn-accept-type.

x-amzn-type-version – Allows you to control the version of requests sent.

x-amzn-accept-type – Allows you to control the version of the responses you receive.

Supported versions are supplied for each DRS endpoint.

Versions and Backwards Compatibility

When endpoints have multiple versions available, the syntax for each version is listed in tabs. Although the latest version is the recommended endpoint syntax, you can use the previous versions if you prefer. DRS is always backwards compatible with support for previous versions.

Endpoint list

The following list includes all the endpoints you will communicate with in order to be compliant with the DRS certification guidelines for user experience.