API reference · Orders
Decline a cancellation request
/orders/{orderId}/cancellation-requests/{requestId}/declineDecline a buyer's pending cancellation request with a reason, so the order ships as sold. Snapcaster emails the buyer the reason, the same notice a decline in the seller dashboard sends, and sends order.cancellation_request.resolved with outcome: declined. To honor a request instead, cancel the lines it names with POST /orders/{orderId}/cancel. Returns the declined request.
Example
These examples send requests to the sandbox.
Replace the example orderId and requestId in the URL with your own.
curl --request POST \
--url 'https://api-sandbox.snapcaster.ca/api/v1/marketplace/orders/ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW/cancellation-requests/cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031/decline' \
--header "Authorization: Bearer $MARKETPLACE_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--header 'Content-Type: application/json' \
--data '{
"reason": "string"
}'$(uuidgen) makes a new Idempotency-Key each time you run the command. To retry a command after a lost response, send the key from the first attempt.
{
"success": true,
"data": {
"id": "cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031",
"order_id": "ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW",
"status": "declined",
"reason": "Ordered the wrong printing",
"resolution_note": "Already packed and handed to Canada Post",
"created_at": "2026-09-04T19:01:12.000Z",
"resolved_at": "2026-09-04T19:20:41.000Z",
"lines": [
{
"line_ref": "oln_1f0c8a4d7e2b45c9a1d6f3b8e07c9241",
"sku_id": 14602,
"quantity": 1
}
]
}
}Endpoint
| Environment | URL |
|---|---|
| Sandbox | https://api-sandbox.snapcaster.ca/api/v1/marketplace |
| Production | https://api.snapcaster.ca/api/v1/marketplace |
marketplaceApiKey-http bearer. Send the seller's marketplace API key asAuthorization: Bearer mp_{sellerCode}_{hex}. Themp_{sellerCode}_prefix identifies the seller; the trailing hex is the secret. The seller generates the key and supplies it to your platform.
Request
Path parameters
orderIdstring requiredThe opaque public order id (the webhook/poll
order_id).Constraints: minimum length: 1 Example
ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VWrequestIdstring requiredThe cancellation request id (
cnr_…) from the list or a webhook.Constraints: minimum length: 1 Example
cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031
Headers
Idempotency-Keystring requiredKeep this UUID when retrying the same order operation and body. Keys remain valid for the lifetime of the order. Changed contents return 409 IDEMPOTENCY_CONFLICT; a concurrent attempt returns 409 REQUEST_IN_PROGRESS with Retry-After.
Constraints: format: uuid Example
f04e4a96-3c99-44dc-abce-5b6862c589c9X-Snapcaster-Api-VersionstringOverride the platform pin for this request only. Webhook versions and the platform pin do not change.
Constraints: allowed values:
2026-10Example2026-10
Request body
reasonstring requiredWhy the seller is declining. Snapcaster shows it to the buyer.
Constraints: minimum length: 1; maximum length: 1000
Response
200
The request, now declined.
Response body: Cancellation
successboolean requiredWhether the operation completed as requested.
Constraints: allowed values:
trueExampletruedataCancellationrequiredRequest The operation or event payload.
Show child fieldsHide child fields
data.string requiredid The cancellation request id (
cnr_…), stable for the life of the request (STABLE).Example
cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031data.string requiredorder_id The order the buyer asked to cancel (STABLE).
Example
ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VWdata.string requiredstatus pendinguntil it is answered.honored: a cancellation covered it.declined: the seller refused it, withresolution_note.withdrawn: the buyer took it back (STABLE).Constraints: allowed values:
pending,honored,declined,withdrawnExampledeclineddata.string or null requiredreason The buyer's own words, or null when they gave none (STABLE).
Example
Ordered the wrong printingdata.string or null requiredresolution_note The decline reason the buyer is shown. Null unless
statusisdeclined(STABLE).Example
Already packed and handed to Canada Postdata.string requiredcreated_at When the buyer opened the request (STABLE).
Constraints: format: date-time Example
2026-09-04T19:01:12.000Zdata.string or null requiredresolved_at When the request was honored, declined or withdrawn. Null while it is pending (STABLE).
Constraints: format: date-time Example
2026-09-04T19:20:41.000Zdata.array of object or null requiredlines The lines the buyer asked to cancel, or null when they asked to cancel the whole order (STABLE).
Show child fieldsHide child fields
data.string or null requiredlines[]. line_ref The purchase line the buyer asked to cancel, the same
line_refthe order carries. Null only on a request recorded before line refs existed.Example
oln_1f0c8a4d7e2b45c9a1d6f3b8e07c9241data.integer requiredlines[]. sku_id The SKU now on that line (STABLE).
Example
14602data.integerlines[]. quantity How many units the buyer asked to cancel. Omitted means the whole line (STABLE).
Constraints: exclusive minimum: 0 Example
1
Errors
Errors return a Marketplace body, except HTTP 413, 500 (Api). Error codes explains both error bodies and lists every code.
400
INVALID_REQUESTIDEMPOTENCY_KEY_REQUIREDUNSUPPORTED_API_VERSIONInvalid command body or missing/invalid UUID Idempotency-Key. Unknown or retired API-version override (
UNSUPPORTED_API_VERSION).Do this: Correct the request fields and supply a UUID Idempotency-Key. Keep the same key when retrying the same command. For UNSUPPORTED_API_VERSION, choose a supported version from the API versioning guide.
401
UNAUTHORIZEDMissing or invalid marketplace API key (
UNAUTHORIZED).Do this: Send the marketplace API key for this seller as a Bearer token, then retry.
403
SUBSCRIPTION_EXCLUDES_ORDERSThe platform's subscription is
inventory, which does not include orders (SUBSCRIPTION_EXCLUDES_ORDERS). Onlyordersandbothsubscriptions read and act on orders.Do this: Do not retry. Ask Snapcaster to change the platform subscription to
ordersorbothif the platform should handle orders.404
ORDER_NOT_FOUNDCANCELLATION_REQUEST_NOT_FOUNDNo order matches this id for the authenticated seller (
ORDER_NOT_FOUND). Another seller's order also returns 404, so the response does not reveal whether it exists. No pending cancellation request with this id is on the order (CANCELLATION_REQUEST_NOT_FOUND). An unknown id, a request on another order, and a request already honored, declined or withdrawn all answer this.Do this: Read GET /orders/{orderId}/cancellation-requests; a request that is no longer pending needs no answer.
409
IDEMPOTENCY_CONFLICTREQUEST_IN_PROGRESSIDEMPOTENCY_CONFLICT or REQUEST_IN_PROGRESS. Retry an in-progress command with the same key after Retry-After seconds.
Do this: For REQUEST_IN_PROGRESS, wait Retry-After seconds and retry the same key and body. For IDEMPOTENCY_CONFLICT, reuse the original body or create a new UUID for a different operation.
413
PAYLOAD_TOO_LARGEThe body is larger than this route accepts (
PAYLOAD_TOO_LARGE).Do this: Send a smaller body and retry.
500
INTERNAL_ERRORAn unexpected failure (
INTERNAL_ERROR).Do this: Retry with bounded retries and jitter. If the failure persists, contact Snapcaster with the X-Correlation-ID response header.