Skip to main content

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.

Required scope: orders:write

Grant 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.fulfillments describes how many fulfillments will be removed with the order.

Requires permission: sales_orders.delete

Request

Responses

OK

Response Headers
    Content-Type