univoozAPI
Errors

duplicate_external_order_id

One of your orders already uses that externalOrderId.

HTTP 409invalid_request_error

externalOrderId is unique in your organization. This error is the protection against two couriers for one delivery.

Why it happens

  • You sent the request again after a timeout. The first request made the order. Only the response did not arrive. This is the condition the protection is for.
  • Your system made the same id two times.
  • You used a live id in test mode, or a test id in live mode. One id belongs to one order in your organization, in both modes.

If the other order is in the other mode, the message says so. It does not give the reference, because your key cannot read orders in the other mode.

How to fix it

First decide if you want a second delivery.

If this was a repeat request, you do not. The order exists. Read it:

curl https://api.univooz.com/v1/orders/PO-88213 \
  -H "Authorization: Bearer uv_live_YOUR_KEY"

GET /v1/orders/{reference} accepts your externalOrderId. If the first response never arrived, this id is the only identifier you have.

If you want a second delivery, send a new externalOrderId.

To use live ids in test mode, add a prefix to them.

Univooz does not return the first order in this response. Read the order yourself.

Example response

{
  "error": {
    "type": "invalid_request_error",
    "code": "duplicate_external_order_id",
    "message": "An order with externalOrderId 'PO-88213' already exists.",
    "param": "externalOrderId",
    "doc_url": "https://docs.univooz.com/errors/duplicate_external_order_id",
    "request_id": "req_01KZCCF8ZH4M7XQ2VB9RSTNPKD"
  }
}

On this page