Cancel Customer Order

Cancel a customer's order.

Required fields:

  • customer_id
  • order_id

A successful request cancels the order and returns it with the updated status CANCELLED.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Scope

erc-ecommerce-orders:write

Path Params
string
required
length between 1 and 255

The customer id

string
required
length between 1 and 255

The order id

Query Params
string
length between 1 and 50

The brand of the provider you want to filter by. If the account is multi-brand, this parameter is required.

Body Params

The order cancellation options. The body itself is optional — call the endpoint without a body to cancel with provider defaults.

Options applied when cancelling a customer's order. All fields are optional. Provider support varies per field; fields not supported by the resolved provider are accepted by the API and silently ignored on the provider side rather than rejected. The request body itself is optional — calling the endpoint without a body cancels the order with provider defaults (cancel_reason=other, restock=false, no customer notification, no automatic refund).

string
length between 1 and 255

Hint describing why the order is being cancelled. The value is normalised by the underlying provider — for Shopify, it is matched case-insensitively against the OrderCancelReason GraphQL enum (customer, declined, fraud, inventory, staff, other); unrecognised values are accepted by the API but recorded as other on the provider side. If omitted or blank, other is used. The field is informational only — it does not by itself block or alter cancellation eligibility.

boolean
Defaults to false

If true, instruct the provider to return the order's items to inventory as part of the cancellation. Currently honoured by Shopify; ignored by providers that do not expose an inventory restock operation on cancel. Defaults to false.

boolean

If true, send a cancellation notification to the customer through the provider's standard channel (for Shopify, the merchant's configured cancellation email is sent). If omitted, the provider's own default notification behaviour applies — typically no email is sent.

string
length between 1 and 1000

Internal note attached to the cancellation, visible only to merchant staff in the provider's admin interface — never shown to the customer. Useful for audit trail (acting agent, free-text reason details, ticket reference, etc.). Currently honoured by Shopify.

refund_method
object

How any outstanding balance on the order is refunded as part of the cancellation. Currently supported by Shopify only. The two sub-options are mutually exclusive — set at most one. If refund_method is omitted or both sub-fields are unset, no refund is issued automatically and the merchant can refund later via the provider's admin UI or via the dedicated refund API.

string

The type of custom fields

custom_fields
object

The custom fields associated with the provider

Responses

Language
Credentials
OAuth2
Missing 1 required scope
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json