Skip to main content
POST
/
v3
/
orders
/
{orderId}
/
cancel
Cancel an order - v3
curl --request POST \
  --url https://api.snappy.com/public-api/v3/orders/{orderId}/cancel \
  --header 'X-Api-Key: <api-key>'
{
  "data": {
    "id": "G7nR4bD9mK",
    "createdAt": "2026-05-27T10:30:00.000Z",
    "status": "active",
    "fulfillmentStatus": "unfulfilled",
    "tags": [],
    "cancellationDetails": {
      "cancelledAt": "2026-05-27T15:57:00.000Z",
      "cancellationReason": "customer_requested"
    },
    "lineItems": [
      {
        "variantId": "v_abc12345",
        "quantity": 1,
        "title": "Premium Gift Card"
      }
    ],
    "fulfillments": [
      {
        "fulfillmentLineItems": [
          {
            "variantId": "v_abc12345",
            "quantity": 1,
            "title": "Premium Gift Card"
          }
        ],
        "id": "tr_abc123",
        "status": "inTransit",
        "trackingCompany": "UPS",
        "trackingInfo": {
          "number": "1Z9999W99999999999",
          "url": "https://www.ups.com/track?tracknum=1Z9999W99999999999"
        }
      }
    ],
    "recipient": {
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "phone": "+15555555555"
    },
    "shippingAddress": {
      "address1": "123 Main St",
      "address2": "Suite A",
      "city": "New York",
      "provinceCode": "NY",
      "countryCode": "US",
      "postalCode": "10001"
    },
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "idempotencyKey": "order-2026-05-13-abc"
  }
}

Authorizations

X-Api-Key
string
header
required

Company Level Authentication

Include your API key in the X-Api-Key header for every request:

X-Api-Key: YOUR_API_KEY

Headers

snappy-account-id
string

Optional account identifier for swag validation/filtering.

Example:

"acc123456"

snappy-company-id
string

Optional company identifier for swag validation/filtering.

Example:

"cmp123456"

Path Parameters

orderId
string
required

The unique identifier of the order to cancel. Obtained from POST /v3/orders or GET /v3/orders.

Pattern: ^[A-Za-z0-9]{8,}$
Example:

"G7nR4bD9mK"

Response

Cancelled order.

JSON:API single-resource envelope for an order.

data
object
required

Order details including line items, recipient, shipping address, fulfillments, and tracking information.

Last modified on June 17, 2026