API
Errors

idempotency-key-reused

The idempotency key was already used for a different request.

idempotency-key-reused

HTTP 422. The key you sent already placed an order, and this request is not the one it was used for.

{
  "type": "https://developers.supliful.com/errors/idempotency-key-reused",
  "title": "Idempotency key reused",
  "status": 422,
  "detail": "This idempotency key already placed a different request. Send a new key for a new order.",
  "orderId": "3f6c1a52-0c3d-4a1e-9f21-5d0f6b8e77a4"
}

A key stands for one request. Replaying it with the same request returns the original order; replaying it with different lines, address or externalOrderId is refused, because answering with the original order would tell you the second request had been placed. The order the key already produced is in orderId.

When no Idempotency-Key header is sent, your externalOrderId is the key, so changing the contents of an order while keeping its externalOrderId lands here too.

How to fix it

  • If you meant to place a new order, send a new key — and a new externalOrderId, if you use one.
  • If you meant to retry, send exactly the request you sent first. Field order and formatting do not matter, and neither does the order of lines; the values do.
  • If you meant to change an order, you cannot through this endpoint. Contact Supliful about the existing orderId.

On this page