Errors and Rate Limits
json
{
"success": false,
"message": "total does not add up ...",
"data": { "errorCode": "TOTAL_MISMATCH", "retryable": false, "retryAfterSeconds": null }
}Branch on errorCode; message is for humans (Turkish) and may change. A missing or expired token may get a 401 without a body — fetch a new token on any 401.
| HTTP | errorCode | Meaning | What to do |
|---|---|---|---|
| 401 | INVALID_CREDENTIALS | Credentials or token invalid / expired | Fetch a new token; if it persists, check the credentials |
| 403 | CHANNEL_DISABLED | Credentials disabled or the restaurant is not taking orders | Contact Hızlıyo |
| 422 | VALIDATION_FAILED | Body could not be parsed (malformed JSON, wrong type); data.fields lists the fields | Fix the request |
| 422 | EXTERNAL_ORDER_ID_REQUIRED | externalOrderId empty or longer than 64 | Fix the request |
| 422 | INVALID_DELIVERY_TYPE | delivery.type is not delivery/pickup | Fix the request |
| 422 | ADDRESS_REQUIRED | Delivery order without address or location | Fix the request |
| 422 | ITEMS_REQUIRED | No items | Fix the request |
| 422 | ITEM_IDENTITY_REQUIRED | Item without name | Fix the request |
| 422 | INVALID_QUANTITY | Quantity below 1 | Fix the request |
| 422 | INVALID_PRICE | Negative price or unnamed option | Fix the request |
| 422 | TOTAL_MISMATCH | Total ≠ items + delivery − discount | Fix the totals |
| 422 | INVALID_PAYMENT | Bad payment.status, or missing method for pay-at-door | Fix the request |
| 422 | INVALID_PHONE | Invalid phone number | Fix the request |
| 422 | ORDER_REJECTED | The order could not be created in Hızlıyo | Read message; do not retry |
| 409 | DUPLICATE_ORDER | Same X-Idempotency-Key with a different body | Use a new key for a new order |
| 409 | CANCEL_NOT_ALLOWED | Cancel after the restaurant accepted | The customer should call the restaurant |
| 404 | ORDER_NOT_FOUND | No such order for this restaurant | Check orderId |
| 404 | CATALOG_NOT_CONFIGURED | No catalog linked | Send items by name and price |
| 429 | RATE_LIMITED | Rate limit hit | Wait Retry-After seconds |
| 500 | INTERNAL_ERROR | Our side failed | Retry later with the same X-Idempotency-Key |
When retryable is true, resend the same request with the same X-Idempotency-Key; no second order is created.
Rate limits
| Endpoint | Limit |
|---|---|
POST /token | 60 per hour per IP |
POST /orders, POST /orders/{id}/cancel | 120 per minute per credential (Hızlıyo can raise it) |
Reads (GET /orders/{id}, /catalog, /store/status) | 600 per minute per credential |
Over the limit you get 429 with a Retry-After header (seconds).