Replenish is the core API used to place an order for a device/slot combination. Calling the Replenish endpoint will order the ASIN selected by your customer during device registration. The replenish endpoint is able to place both test and real orders, depending on the LwA scope data that was used when registering the customer. For more information, please read the Test Device Purchases documentation.
- HTTP Method
- Header Parameters
- Response Example
- Response Example Details
- Error Responses
Authorization: Bearer (ACCESS_TOKEN)
Versioning is used to incrementally update API functionality without directly impacting customers.
x-amzn-accept-type headers must be sent with each call. The following are supported by the Replenish Endpoint:
HTTP/1.1 200 Accepted
"eventInstanceId" : "SOME_EVENT_INSTANCE"
"detailCode" : "STANDARD_ORDER_PLACED"
Response Example Details
A successful response does not indicate that a purchase actually occurred. A successful response indicates that Amazon has accepted the request and performed some processing. On any accepted order, Amazon will provide:
eventInstanceId: used to map order notifications back to the original purchase event. This will be up to 255 char long.
detailCode: describes the order result
detailCode values are used:
|An order was successfully placed and will be shipped to the customer.
|An order was successfully placed with the test flag. All notifications will proceed normally but the customer will not be charged and the item will not ship.
|No order was placed because an order is already in progress. This value will be returned as long as there is an order still out for delivery to the customer.
|HTTP/1.1 400 Bad Request
|Client Error: An error occurred due to data passed in by the client (e.g. bad token). Amazon will make a best effort to provide feedback on the nature of the failure in the response body.
|HTTP/1.1 404 Not Found
|Client Error: Attempting to replenish a non-existing slot.
|Internal Server Error: Indicates that an error occurred internally to the server.
Last updated: Aug 07, 2018