Check Sales Orders Deletable
POST/api/sales-orders/deletable
Checks whether the given sales orders can be deleted, returning one result per order. Use this before calling the delete endpoints to warn users about related records that will be removed along with each order.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Request body fields:
- ids (array of integers, required, min 1): Sales order IDs; each must exist.
Response: data is an array with one entry per order:
- id (integer), sales_order_number (string)
- deletable (boolean): Whether the order can be deleted. Deletion cascades related records, so this is true in normal cases.
- reason (string|null): Populated when the order is not deletable.
- warnings (object, present only when applicable): Informational warnings — e.g.
warnings.fulfillmentsdescribes how many fulfillments will be removed with the order.
Requires permission: sales_orders.delete
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.