Cancel multiple orders

Batch cancellation of up to 50 orders in a single request. Each order in the response has its own result: cancelled, cannot be cancelled (with reason), not found.

POST /shipments/cancel

Parameters

NameTypeRequiredDescription
ids array yes Order numbers (the id field), from 1 to 50 items.
reason string no Cancellation reason, up to 255 characters.

Important to know

Request example

curl -X POST https://api.shippickup.com/v1/shipments/cancel \
  -H "Authorization: Bearer $SHIPPICKUP_API_KEY" \
  -H "Idempotency-Key: order-10452-label-v1" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
        "4f2a9c1e7b3d48a6c5e0f1d2b3",
        "9a8b7c6d5e4f30211a2b3c4d5e",
        "00000000000000000000000000"
    ],
    "reason": "Customer cancelled the orders"
}'

Response example 200

JSON
{
    "data": [
        {
            "id": "4f2a9c1e7b3d48a6c5e0f1d2b3",
            "result": "cancelled",
            "refund_due_at": "2026-12-15T10:15:30+00:00"
        },
        {
            "id": "9a8b7c6d5e4f30211a2b3c4d5e",
            "result": "cannot_cancel",
            "reason": "The parcel is already in transit, cancellation is not possible"
        },
        {
            "id": "00000000000000000000000000",
            "result": "not_found"
        }
    ],
    "meta": {
        "cancelled": 1,
        "already_cancelled": 0,
        "cannot_cancel": 1,
        "not_found": 1,
        "failed": 0,
        "refund_delay_days": 10
    }
}

Possible errors

HTTPCodeDescription
422validation_failedError in request fields. error.details specifies the reason for each field.
422idempotency_key_requiredMissing or invalid Idempotency-Key header: must be 16–64 characters A-Za-z0-9_-.
422idempotency_key_reusedЭтот Idempotency-Key уже использован для другого запроса: для нового запроса нужен новый ключ.
403insufficient_scopeKey lacks the required permission, specified in error.details.required_scope.
429rate_limitedKey request limit exceeded. Retry after the time specified in the Retry-After header.

Full list of error codes →