Skip to content
ShopentlyLearn

Safe writes

Combine idempotency keys with version checks for predictable updates.

Get started

  1. Read

    Read the resource before editing it and supply expected_version as documented.

  2. Write

    Use POST to create supported resources, PATCH for partial updates and DELETE for supported removals.

  3. Response

    A repeated successful operation returns its stored result without applying the change again.

Headers

Idempotency-Key
Every resource write requires Idempotency-Key. Generate one key per logical operation; repeat the same key, method, target and payload when retrying that operation.
expected_version
Pricing changes may also require product, price, variant-price or price-list versions. If a version changes, read again and reconcile the update rather than forcing stale data.

Retry policy

  • Reusing a key for a different request yields idempotency.key_reused.
  • Each example is synthetic; replace identifiers with values obtained from your own store before executing it.