Error codes and reasons
Loyalty & Rewards Open API uses standard HTTP response codes to indicate the success or failure of an API request. The following code ranges apply to all endpoints:
- 2xx - operation was a success
- 4xx - operation failed due to a client error, trying again unchanged would result in the same outcome
- 5xx - operation failed due to a temporary DoorDash failure, please try again later
Standard Error Format
Errors return a JSON body with a machine-readable code and a human-readable message:
{
"code": "conflict",
"message": "Order pos-98231 has already been applied."
}
Error codes
| Status | code | When |
|---|---|---|
| 400 | validation_error | The body is invalid, such as a missing required field. |
| 401 | authentication_error | Missing or invalid JWT. |
| 403 | authorization_error | The credentials are not allowed to act for this store. |
| 404 | not_found | The location_id cannot be mapped to a store, or the order_id to void does not exist. An unknown customer is not an error: Get customer rewards returns 200 with customer.status set to NOT_FOUND. |
| 409 | conflict | The same order id (or order_id for a void) was sent again with a different body. |
| 422 | unprocessable | A reward_id in reward_ids is not valid for the customer or the order. Nothing is applied. Redeem does not return this: it lists invalid ids in rewards.unavailable_rewards. |
| 429 | rate_limited | Too many requests sent in a short timespan. |
| 500 | service_fault | An unexpected error on our side. |
| 503 | service_unavailable (proposed) | The service is temporarily unavailable. |
Retrying failed calls
- Retry 429, 500 and 503 with the same order
id(ororder_idfor a void) and the same body. Wait between attempts using exponential backoff, and wait at least as long as theRetry-Afterheader says, if the response has one. - If an apply, redeem or void call times out and you do not know whether it went through, retry it with the same order id and the same body. If it did go through, you get the original response.
- Do not retry 400, 401, 403, 404, 409 or 422 unchanged. Fix the request or the credentials first.
Was this page helpful?