Google Cloud Platform lets you build, deploy, and scale applications, websites, and services on the same infrastructure as Google.
![]()
Warning: You are viewing an old version of the DRS docs. To access the new APIs click here
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:
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:
Note: This URL call requires the access token returned in the LwA call.
The full list of endpoints is described below.
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:
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 .
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.
Replenish
This API will place an order for the ASIN the customer selected in the slot. More info
HTTP method:
Path:
Slot Status
This API will report on the current status of the slot and requires the consumable levels to be sent. More info
HTTP method:
Path:
Device Status
This API will report on the current status of the device and require the time and date of last usage to be sent. More info
HTTP method:
Path:
Deregistration
This API will remove the device from the customer's Amazon account. More info
HTTP method:
Path:
Subscription Info
This API will report on the current status of the subscription. More info
HTTP method:
Path:
Cancel Test Order
This test API will cancel test orders placed under development. More info
HTTP method:
Path:
Get Order Info
This API will report on the order status. More info
HTTP method:
Path:
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |