Skip to main content
Idempotency makes a retry safe. If-Match makes a concurrent change safe.

Idempotency

Keys are scoped to your merchant account. Idempotency-Key must be 16–128 characters; a shorter one is refused with 422 VALIDATION_FAILED. Derive it from the business intent that must happen at most once — never generate a fresh random key per retry.

ETags and If-Match

Shipments and your webhook carry a strong numeric ETag, "<version>", quotes included. The same number is the version field. A conditional request is required for:
  • PATCH /api/v2/external/shipments/{id}
  • PATCH /api/v2/external/webhook
  • DELETE /api/v2/external/webhook
  • POST /api/v2/external/webhook/secret-rotations
The ETag comes back on reads and on every successful change, so a sequence of changes can chain without an extra GET. A shipment’s version also advances as it moves through its lifecycle, so read it shortly before you change it.