Reject an order
post
https://api.cartirra.com/v1/orders/{id}/rejectReject an order waiting for the store: a paid one is refunded in full, then it is cancelled and the customer told.
- Authentication
- Secret key (
Authorization: Bearer sk_…). How keys work - Permission
orders:reject- Idempotency
Idempotency-Keyheader required: a retry with the same key returns the first response. Details
Path parameters
idstringrequired
Headers
Idempotency-KeystringrequiredUnique per request; replays return the first response
Request body required
JSON (Content-Type: application/json).
reasonstringrequiredShown to the customer in words
notestringnullableA note the customer reads in the email; needed with "other"
Responses
200OKOrderResponse
idstringrequiredreferencestringrequiredkindstringrequiredbill_share: a payment toward a table bill (Pay at table), numbered SHR-…
bill_idstringnullableThe table bill a bill_share pays toward
statusstringrequiredpayment_statusstringrequiredpayment_methodstringrequiredfulfilment_typestringrequiredfulfilmentanyrequiredBy fulfilment_type
store_idstringrequiredcustomer_idstringnullablecontactOrderContactResponserequiredlinesarray of OrderLineResponserequiredpriceOrderPriceResponserequiredPrice breakdown snapshot
notestringnullableplaced_atstringrequiredpaid_atstring (date-time)nullablecompleted_atstring (date-time)nullablecancelled_atstring (date-time)nullablecancel_reasonstringnullableacceptancestringnullableSet when the store accepts orders before preparing them (null otherwise); a rejected order is cancelled
accepted_atstring (date-time)nullable
Errors
Every error has the same body: { "error": { "code", "message", "details"?, "request_id" } }. See Errors for every code.
- 400The request is malformed or a field is invalid (`VALIDATION_FAILED`).
- 401Missing, malformed, revoked or expired API key (`UNAUTHENTICATED`), or a key this route does not accept, such as a public key (`CREDENTIAL_NOT_ACCEPTED`).
- 403The key may not do this (`PERMISSION_DENIED`, `LIVE_MODE_NOT_ENABLED`, `PLAN_LIMIT_REACHED`, …).
- 404No such resource in this business and mode (`NOT_FOUND`).
- 409The resource is in a state that does not allow this (for example `ORDER_NOT_CANCELLABLE`, `REFUND_NOT_ALLOWED`).
- 422The request is valid but breaks a business rule.
- 429Too many requests for this key (`RATE_LIMITED`); wait for `Retry-After` seconds.
- 500Something went wrong on our side (`INTERNAL`). Safe to retry with the same `Idempotency-Key`.