POST /orders/{orderId}/cancellation-requests/{requestId}/decline

Decline 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.

Generated cURL request - Sandbox: Generated request
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.

Response 200: Declined request
{
  "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

EnvironmentURL
Sandboxhttps://api-sandbox.snapcaster.ca/api/v1/marketplace/orders/{orderId}/cancellation-requests/{requestId}/decline
Productionhttps://api.snapcaster.ca/api/v1/marketplace/orders/{orderId}/cancellation-requests/{requestId}/decline
Authentication
  • marketplaceApiKey - http bearer. Send the seller's marketplace API key as Authorization: Bearer mp_{sellerCode}_{hex}. The mp_{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

orderId string required

The opaque public order id (the webhook/poll order_id).

Constraints: minimum length: 1 Example ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW

requestId string required

The cancellation request id (cnr_…) from the list or a webhook.

Constraints: minimum length: 1 Example cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031

Headers

Idempotency-Key string required

Keep 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-5b6862c589c9

X-Snapcaster-Api-Version string

Override the platform pin for this request only. Webhook versions and the platform pin do not change.

Constraints: allowed values: 2026-10 Example 2026-10

Request body

reason string required

Why 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: CancellationRequestResponse

success boolean required

Whether the operation completed as requested.

Constraints: allowed values: true Example true

data CancellationRequest required

The operation or event payload.

Show child fieldsHide child fields
data.id string required

The cancellation request id (cnr_…), stable for the life of the request (STABLE).

Example cnr_8d3f2a61b0c94e7f9a15c2d48e6b7031

data.order_id string required

The order the buyer asked to cancel (STABLE).

Example ord_sandbox_01K4A8Y6D4QJH2N3P5R7S9T0VW

data.status string required

pending until it is answered. honored: a cancellation covered it. declined: the seller refused it, with resolution_note. withdrawn: the buyer took it back (STABLE).

Constraints: allowed values: pending, honored, declined, withdrawn Example declined

data.reason string or null required

The buyer's own words, or null when they gave none (STABLE).

Example Ordered the wrong printing

data.resolution_note string or null required

The decline reason the buyer is shown. Null unless status is declined (STABLE).

Example Already packed and handed to Canada Post

data.created_at string required

When the buyer opened the request (STABLE).

Constraints: format: date-time Example 2026-09-04T19:01:12.000Z

data.resolved_at string or null required

When the request was honored, declined or withdrawn. Null while it is pending (STABLE).

Constraints: format: date-time Example 2026-09-04T19:20:41.000Z

data.lines array of object or null required

The lines the buyer asked to cancel, or null when they asked to cancel the whole order (STABLE).

Show child fieldsHide child fields
data.lines[].line_ref string or null required

The purchase line the buyer asked to cancel, the same line_ref the order carries. Null only on a request recorded before line refs existed.

Example oln_1f0c8a4d7e2b45c9a1d6f3b8e07c9241

data.lines[].sku_id integer required

The SKU now on that line (STABLE).

Example 14602

data.lines[].quantity integer

How many units the buyer asked to cancel. Omitted means the whole line (STABLE).

Constraints: exclusive minimum: 0 Example 1

Errors

Errors return a MarketplaceError body, except HTTP 413, 500 (ApiError). Error codes explains both error bodies and lists every code.

  • 400 INVALID_REQUEST IDEMPOTENCY_KEY_REQUIRED UNSUPPORTED_API_VERSION

    Invalid 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 UNAUTHORIZED

    Missing 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_ORDERS

    The platform's subscription is inventory, which does not include orders (SUBSCRIPTION_EXCLUDES_ORDERS). Only orders and both subscriptions read and act on orders.

    Do this: Do not retry. Ask Snapcaster to change the platform subscription to orders or both if the platform should handle orders.

  • 404 ORDER_NOT_FOUND CANCELLATION_REQUEST_NOT_FOUND

    No 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_CONFLICT REQUEST_IN_PROGRESS

    IDEMPOTENCY_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_LARGE

    The body is larger than this route accepts (PAYLOAD_TOO_LARGE).

    Do this: Send a smaller body and retry.

  • 500 INTERNAL_ERROR

    An 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.