Developer Console

CancelTestOrder Endpoint

CancelTestOrder allows developers to cancel test orders for one or all slots in the device. When you use the Replenish endpoint, the customer will have 24 hours to cancel the order. Every subsequent call to the replenish endpoint will return a 200 ORDER_INPROGRESS. You may use the CancelTestOrder API to call Replenish multiple times during testing and receive 200 TEST_ORDER_PLACED instead.

Path

Cancel test order for a specific SLOT_ID

/testOrders/slots/{slotId}

Cancel test orders on all slots

/testOrders

HTTP Method

DELETE

Header Parameters

x-amzn-accept-type: com.amazon.dash.replenishment.DrsCancelTestOrdersResult@1.0
x-amzn-type-version: com.amazon.dash.replenishment.DrsCancelTestOrdersInput@1.0
Authorization: Bearer (ACCESS_TOKEN)

Versioning

Versioning is used to incrementally update API functionality without directly impacting customers. x-amzn-type-version and x-amzn-accept-type headers must be sent with each call. The following are supported by the CancelTestOrder Endpoint:

x-amzn-type-version: com.amazon.dash.replenishment.DrsCancelTestOrdersInput@1.0
x-amzn-accept-type: com.amazon.dash.replenishment.DrsCancelTestOrdersResult@1.0

Response Example

HTTP/1.1 200 OK
x-amzn-type-version: com.amazon.dash.replenishment.DrsCancelTestOrdersResult@1.0
{
  "slotOrderStatuses": [
    {
      "orderStatus": "NO_ORDER_IN_PROGRESS",
      "slotId": "slot1"
    },
    {
      "orderStatus": "NO_ORDER_IN_PROGRESS",
      "slotId": "slot2"
    }
  ]
}

Error Responses

Errors Descriptions
HTTP/1.1 500 Internal Server Error Indicates that an error occurred internally to the server.
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.

Last updated: Aug 07, 2018