API reference › Returns

POST/shipments/{id}/returns

RET: book the return from its return quote — linked to the original, paid by the party you name. Requires Idempotency-Key.

Booked like POST /shipments (the same Idempotency-Key, operationRef, exact price of the quote, payment, recovery) as the carrier's return label, shipmentType return, return.of the original. payer — your decision, never IDS's: a platform paid on the platform names buyer or platform (platform.payment, exactly the quote's total) or seller (nothing is paid at booking: return.charge due, which you settle — POST /shipments/{id}/return-charge/settle); a platform or shop paying from its IDS balance is charged as for any booking (payer is recorded). handover pickup — a courier at the buyer's address on handover.date (refused with RETURN_PICKUP_UNAVAILABLE where the return quote said the carrier does not collect there); drop_off — the buyer hands it in at a carrier point (handover.dropOffPoint names the one shown). The label is in the answer (PDF or PNG — the buyer prints it) and, where IDS letters to your people are on (GET /platform), e-mailed to the buyer (shipper.contact.email). Then it is a shipment like any other: tracking, events (data.shipment.return), documents. Cancellation: an unused return label is never cancelled automatically — cancel it (POST /shipments/{id}/cancel) once the buyer will not use it. Before the carrier's pickup scan it is cancelled and refunded in full: to your balance, or, paid on the platform, recorded as owed to the buyer (refund_due — refund the original payment and confirm it); charged to the seller, its charge becomes void. After the scan nothing is refunded automatically: IDS reviews a cancel request (CXL).

Key scope
shipments:write
Idempotency-Key
Required — 1–255 characters, one per logical operation, reused on every retry (rules)
URL
https://ids.express/api/v1/shipments/{id}/returns

Parameters

  • idpath · stringrequired

    Shipment UUID or its master tracking number

Request body

Unknown fields are rejected (400 VALIDATION_FAILED, details[].path names the field).

application/json — ReturnBookingRequest

  • quoteIdstringrequiredlength ≤ 100

    The return quote (POST /shipments/{id}/return-quotes) — its price is charged exactly.

  • selectedServiceTypestringrequiredlength ≤ 60
  • payerstring

    one of: buyer · seller · platform · account

    Who bears the return as you decide it: a platform names buyer (paid on the platform: platform.payment), seller (charged to the seller, settled by you: POST /shipments/{id}/return-charge/settle) or platform; an ordinary account: account (default). IDS never decides it. Your rules must respect the buyer's rights: a consumer who withdraws bears the direct cost of the return only if told so before the purchase (OUG 34/2014 art. 6 (1) i), 14 (2)); a consumer returning non-conforming goods for repair, replacement or termination bears no cost of carriage (Directive (EU) 2019/771 art. 14 (1) a), 16 (3) a); OUG 140/2021).

  • handoverobjectrequired
  • methodstringrequired

    one of: pickup · drop_off

    pickup — a courier collects it at the buyer's address (where the carrier picks up there); drop_off — the buyer hands it in at a carrier point (required where no courier comes to a home address).

  • datestringpattern ^\d{4}-\d{2}-\d{2}$

    pickup: the day (today … +10 days, one of the return quote's handover.pickup.days).

  • readyTimestringpattern ^([01]\d|2[0-3]):[0-5]\d$

    pickup: from when the parcel is ready (the carrier reads it as local time at the buyer's address).

  • closeTimestringpattern ^([01]\d|2[0-3]):[0-5]\d$

    pickup: the latest time the courier may come (local time at the buyer's address).

  • instructionsstringlength ≤ 500

    pickup: for the courier.

  • dropOffPointobject

    drop_off: the point the buyer chose (from the return quote's handover.dropOff.points) — named in the label letter; any point of the carrier takes it.

  • idstringrequiredlength 1–60
  • namestringlength ≤ 100
  • line1stringlength ≤ 100
  • citystringlength ≤ 100
  • postalCodestringlength ≤ 20
  • countryCodestringlength 2–2
  • shipperobject

    The buyer's contact for the label, when the return quote had none (the address is the quote's).

  • contactobjectrequired
  • namestringrequiredlength 1–100
  • companystringlength ≤ 100
  • phonestringrequiredlength 1–20
  • emailstring (email)length ≤ 255
  • recipientobject

    The seller's contact for the label, when it differs from the quote's (the address is the quote's).

  • contactobjectrequired

    Same shape as shipper.contact above.

  • customsobject

    Across a border: the customs of what goes back. Default: the return quote's lines (the original's).

  • documentsOnlyboolean
  • contentTypestring

    one of: ITEMS · DOCUMENTS

  • itemDescriptionstringlength ≤ 200
  • dutiesPaymentstring

    one of: SENDER · RECIPIENT · THIRD_PARTY

  • incotermsstring

    one of: FCA · EXW · CIP · CPT · DAP · DAT · DDP

  • shipmentPurposestring

    one of: SOLD · NOT_SOLD · GIFT · SAMPLE · REPAIR_AND_RETURN · PERSONAL_EFFECTS

  • commodities[]array of objectitems ≤ 100
  • descriptionstringrequiredlength 1–450
  • quantityintegerrequired> 0≤ 99999
  • quantityUnitsstringlength ≤ 10
  • weightnumberrequired> 0≤ 1000
  • weightUnitstring

    one of: KG · LB

  • customsValuenumberrequired> 0
  • customsValueCurrencystringrequiredlength 3–3
  • countryOfManufacturestringlength 2–2
  • harmonizedCodestringlength ≤ 30
  • referencesobject
  • customerReferencestringlength ≤ 40
  • poNumberstringlength ≤ 40
  • invoiceNumberstringlength ≤ 40
  • platformobject

    A platform's key only. The seller and the buyer are the original's.

  • orderRefstringlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$

    Default: the original's order.

  • shipmentRefstringlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$
  • deliveryCustomerobject

    payer buyer, while IDS invoices the buyer: the delivery customer (default: the original's).

  • typestringrequired

    one of: person · company

    person: a private buyer; company: a buyer that is a company (its codes for the invoice).

  • namestringrequiredlength 1–200

    The person's full name or the company's legal name, as the invoice prints it.

  • vatNumberstringlength 2–32pattern ^[A-Za-z0-9][A-Za-z0-9 ./-]*$

    company only: its VAT code (e.g. RO12345678) when it has one.

  • registrationNumberstringlength 2–32pattern ^[A-Za-z0-9][A-Za-z0-9 ./-]*$

    company only: its registration number (e.g. J40/123/2020).

  • addressobjectrequired

    The delivery customer's address for the invoice (it may differ from the recipient's).

  • line1stringrequiredlength 1–100
  • line2stringlength ≤ 100
  • citystringrequiredlength 1–100
  • stateCodestringlength ≤ 20
  • postalCodestringlength ≤ 20
  • countryCodestringrequiredpattern ^[A-Za-z]{2}$
  • buyerAcceptanceobject

    payer buyer, while IDS invoices the buyer: the buyer's acceptance of IDS's documents for this return delivery.

  • documents[]array of objectrequireditems ≥ 1items ≤ 3

    terms and postal_conditions — accepted by the buyer, required, in their current versions; privacy — shown, optional.

  • typestringrequired

    one of: terms · postal_conditions · privacy

  • versionstringrequiredlength 1–20

    The version shown to the buyer (GET /metadata buyerDocuments).

  • acceptedAtstring (date-time)required

    When the buyer ticked the box (ISO 8601 with an offset), before the payment: not in the future, at most 30 days ago, not after platform.payment.confirmedAt.

  • ipAddressstringlength ≤ 45

    Accepted but not stored by IDS — keep it in your own checkout record.

  • userAgentstringlength 1–500

    Accepted but not stored by IDS — keep it in your own checkout record.

  • paymentobject

    A platform paid on the platform, payer buyer or platform: the payment for this return (exactly the return quote's total).

  • refstringrequiredlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$

    The platform's own id of the payment (e.g. its payment provider's payment id); one payment may cover several bookings of one order.

  • amountMinorintegerrequired> 0≤ 100000000

    The delivery amount of this booking in minor units (cents) — exactly the quote's total of the chosen service.

  • currencystringrequiredpattern ^[A-Za-z]{3}$

    The quote's currency.

  • confirmedAtstring (date-time)required

    When the platform's payment provider confirmed the payment (ISO 8601 with an offset).

  • operationRefstringlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$

    Your own reference of this booking operation (e.g. the order's delivery id), unique per account and environment: a lost answer is found by it (GET /shipments?operationRef=), and a second booking with it answers 409 OPERATION_REF_TAKEN instead of booking twice. Required for a booking paid on the platform.

  • localestringlength ≤ 35

    The language of the label letter to the buyer, where you allow IDS letters (en, ro, ru, uk, sr, hu, bg, el, zh).

  • labelFormatstring

    one of: PDF · PNG

    The buyer prints the label: PDF (default) or PNG.

  • labelSizestring

    one of: PAPER_4X6 · PAPER_4X8 · PAPER_LETTER

  • testScenariostring

    one of: delivered · delivery_attempt_failed · returned_to_sender · pickup_point · adjustment · lost · duplicate_scan · out_of_order · pickup_failed · pickup_timeout · pickup_retryable · pickup_missed · slow · carrier_error · carrier_error_retryable

Call it

OPERATION_KEY=$(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)   # one per logical operation — keep it, reuse it on every retry
curl -s -X POST "https://ids.express/api/v1/shipments/$ID/returns" \
  -H "Authorization: Bearer $IDS_KEY" \
  -H "Idempotency-Key: $OPERATION_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quoteId": "<quoteId>",
  "selectedServiceType": "<selectedServiceType>",
  "handover": {}
}'

Answers

201 The return booked — a Booking (shipmentType return, return block, the label inline); with FINALIZATION_PENDING a BookingPending

Headers: X-Request-Id

application/json — Booking or BookingPending

Booking
  • idstring (uuid)required
  • statusstringrequired

    one of: draft · pending · confirmed · in_transit · delivered · cancelled · exception · failed

  • masterTrackingNumberstringrequirednullable
  • environmentstringrequired

    one of: sandbox · production

  • createdViastringrequirednullable
  • createdAtstring (date-time)requirednullable
  • serviceobjectrequired
  • typestringrequirednullable
  • namestringrequirednullable
  • carrierCodestringrequirednullable
  • serviceCodestringrequirednullable
  • shipDatestringrequirednullable

    YYYY-MM-DD.

  • estimatedDeliveryDatestring (date-time)requirednullable
  • packages[]array of objectrequired
  • sequenceNumberintegerrequired
  • trackingNumberstringrequirednullable
  • labelobjectrequirednullable
  • formatstringrequired
  • encodedstringrequired
  • contentValueobjectrequirednullable

    Money: amount in whole cents of currency, amountMinor the same amount as an integer of minor units.

  • amountnumberrequirednullable
  • amountMinorintegerrequirednullable

    The amount beside it in minor units (cents).

  • currencystringrequirednullable
  • declaredValueobjectrequirednullable

    Same shape as packages[].contentValue above.

    Money: amount in whole cents of currency, amountMinor the same amount as an integer of minor units.

  • pickupobjectrequired
  • requestedbooleanrequired
  • scheduledbooleanrequired
  • confirmationCodestringrequirednullable
  • statusstringrequired

    one of: scheduled · requested · failed · none

    PCK: requested — IDS is asking, or will ask when the carrier books that day.

  • errorstringrequirednullable
  • environmentstringrequired

    one of: sandbox · production

  • statestringrequired

    one of: label_created · pickup_requested · pickup_confirmed · pickup_not_assigned · picked_up · pickup_cancelled · dropped_off

    label_created (no pickup asked), pickup_requested (IDS is asking, or will when the carrier books that day — not confirmed), pickup_confirmed, pickup_not_assigned (refused, no window, retries exhausted, the courier did not come), picked_up (the carrier's scan), pickup_cancelled, dropped_off.

  • readyAtstring (date-time)requirednullable
  • requestobjectrequirednullable
  • idstring (uuid)required
  • statusstringrequired

    one of: planned · requesting · confirmed · failed · outcome_unknown · missed · picked_up · cancelled · dropped_off

    planned — IDS asks the carrier on bookAfter (the carrier books that day only later); requesting — being asked (or retried after a temporary failure); confirmed — the carrier's confirmationCode; failed — refused, no window, retries exhausted; outcome_unknown — the carrier's answer was lost (IDS checks before asking again); missed — confirmed, the courier did not come; picked_up; cancelled; dropped_off — the seller handed the parcels in (an exception IDS agreed).

  • scheduledBystringrequired

    one of: ids · booking

    ids — IDS scheduled it (a pickup place, or the booking's own window); booking — a pickup made with the booking before PCK.

  • carrierstringrequired

    The carrier's pickup code (FDXE; SIMULATED for a test key).

  • datestringrequired

    YYYY-MM-DD, the pickup day in the place's time zone.

  • windowobjectrequirednullable

    The window asked of the carrier: from readyTime (the parcels ready) to closeTime (the latest the courier may come); null — none found.

  • readyTimestringrequiredpattern ^\d{2}:\d{2}$

    HH:mm in the place's time zone.

  • closeTimestringrequiredpattern ^\d{2}:\d{2}$

    HH:mm in the place's time zone.

  • timezonestringrequired
  • bookAfterstring (date-time)requirednullable

    planned only: when IDS asks the carrier (never shown as confirmed before).

  • confirmationCodestringrequirednullable
  • requestedAtstring (date-time)requirednullable
  • confirmedAtstring (date-time)requirednullable
  • pickedUpAtstring (date-time)requirednullable
  • shipmentCountintegerrequirednullable≥ 0

    Shipments waiting for this pickup (yours and the place's other ones of the day).

  • packageCountintegerrequired≥ 0
  • attemptsintegerrequired≥ 0
  • locationobjectrequirednullable
  • externalIdstringrequired
  • namestringrequired
  • alerts[]array of objectrequired

    What the carrier said with its confirmation (e.g. PICKUP.SCHEDULE.LATE).

  • codestringrequired
  • alertTypestringrequired
  • messagestringrequired
  • problemobjectrequirednullable

    An open problem IDS handles (refused, no_window, window_missed, outcome_unknown, booking_failed, carrier_alert, courier_missed).

  • kindstringrequired
  • openedAtstring (date-time)required
  • chargeobjectrequired

    Money: amount in whole cents of currency, amountMinor the same amount as an integer of minor units.

  • amountnumberrequirednullable
  • amountMinorintegerrequirednullable

    The amount beside it in minor units (cents).

  • currencystringrequirednullable
  • quoteIdstringrequirednullable
  • referencesobjectrequired
  • customerReferencestringrequirednullable
  • poNumberstringrequirednullable
  • invoiceNumberstringrequirednullable
  • platformobjectrequirednullable

    PLT: the references the platform gave the booking (platform.orderRef, …); null for a shipment booked without a platform.

  • orderRefstringrequirednullable
  • shipmentRefstringrequirednullable
  • sellerExternalIdstringrequirednullable
  • buyerExternalIdstringrequirednullable
  • deliveryCustomerobjectrequirednullable

    BOOK: the delivery customer (the buyer who pays the delivery and gets IDR's delivery invoice) as the booking named them; null when none was sent.

  • typestringrequired

    one of: person · company

  • namestringrequired
  • vatNumberstringrequirednullable
  • registrationNumberstringrequirednullable
  • addressobjectrequired
  • line1stringrequired
  • line2stringrequirednullable
  • citystringrequired
  • stateCodestringrequirednullable
  • postalCodestringrequirednullable
  • countryCodestringrequiredlength 2–2
  • buyerAcceptanceobjectrequirednullable

    BOOK: which IDS documents the buyer accepted at checkout and when — kept with the shipment as evidence; null when none was sent.

  • documents[]array of objectrequired
  • typestringrequired

    one of: terms · postal_conditions · privacy

  • versionstringrequired
  • acceptedAtstring (date-time)required
  • operationRefstringrequirednullable

    BOOK: your operationRef of the booking (null without one).

  • shipmentGroupobjectrequirednullable

    null for a shipment booked without an operationRef, a plan or a platform payment.

  • refstring (uuid)required

    The booking operation's id: the same for every shipment of one plan (shipmentGroupRef).

  • indexintegerrequired≥ 1

    This shipment's place in the plan, 1-based.

  • countintegerrequired≥ 1
  • paymentobjectrequired
  • modestringrequired

    one of: balance · test_wallet · platform_collected

    balance — the account's balance (or deferred payment); test_wallet — a test key's play money; platform_collected — the payment the platform took from its buyer (no IDS balance is touched).

  • paidAtstring (date-time)requirednullable

    When the shipment was paid (the charge, the test wallet, or the platform's payment recorded); null while unpaid and for shipments booked before 31.10.2026. RET: a return charged to its seller (return.charge) — when IDS accepted it charged to the seller; nothing was paid then (return.charge.settledAt says when the platform settled it).

  • platformPaymentobjectrequirednullable

    platform_collected only: the platform's payment of the booking operation.

  • refstringrequired

    The platform's own id of the payment, as sent.

  • amountnumberrequired
  • amountMinorintegerrequired

    The amount beside it in minor units (cents).

  • currencystringrequired
  • confirmedAtstring (date-time)required

    When the platform's payment provider confirmed it (as sent).

  • recordedAtstring (date-time)required

    When IDS recorded it — with the booking, in the same transaction that made its shipments paid.

  • statusstringrequired

    one of: collected · refund_due · refunded

    collected — nothing refunded; refund_due — the platform owes its buyer a refund on this payment (GET /shipments/{id}/refunds, confirm it there); refunded — every refund owed is confirmed (refundedAmount says how much).

  • shipmentCountintegerrequired

    How many shipments of the operation it pays (a plan: several).

  • refundedAmountnumberrequired

    CXL: what the platform confirmed it refunded on this payment (0 while nothing).

  • refundedAmountMinorintegerrequired

    The amount beside it in minor units (cents).

  • documents[]array of objectrequired
  • idstring (uuid)required
  • typestringrequired
  • fileNamestringrequired
  • createdAtstring (date-time)required
  • alerts[]array of objectrequired

    Same shape as pickup.request.alerts above.

  • labelAddressesobjectrequired

    The shipper and the recipient exactly as the carrier got them and the label prints them.

  • shipperobjectrequired

    A party as the carrier's label prints it: Latin letters only (Cyrillic, Greek transliterated by named systems, diacritics dropped), the phone with +, the postal code in the country's form, the lengths the label prints (35 characters per line, at most 3 street lines). The original you sent is kept by IDS.

  • contactobjectrequirednullable

    null: no contact was sent with the quote, or an unused quote expired and its contacts were removed.

  • namestringrequired
  • companystringrequirednullable
  • phonestringrequired
  • emailstringrequirednullable
  • addressobjectrequired
  • streetLines[]array of stringrequireditems ≥ 1items ≤ 3
  • citystringrequired
  • stateCodestringrequirednullable
  • postalCodestringrequirednullable
  • countryCodestringrequiredlength 2–2
  • residentialbooleanrequirednullable
  • recipientobjectrequired

    A party as the carrier's label prints it: Latin letters only (Cyrillic, Greek transliterated by named systems, diacritics dropped), the phone with +, the postal code in the country's form, the lengths the label prints (35 characters per line, at most 3 street lines). The original you sent is kept by IDS.

  • contactobjectrequirednullable

    Same shape as labelAddresses.shipper.contact above.

    null: no contact was sent with the quote, or an unused quote expired and its contacts were removed.

  • addressobjectrequired

    Same shape as labelAddresses.shipper.address above.

  • shipmentTypestringrequired

    one of: outbound · return

    RET: return for a return shipment (POST /shipments/{id}/returns).

  • returnobjectrequirednullable

    RET: a return shipment's block (null otherwise).

  • ofobjectrequired

    The original shipment it returns.

  • idstring (uuid)required
  • masterTrackingNumberstringrequirednullable
  • payerstringrequired

    one of: buyer · seller · platform · account

    Who bears it as you named it (IDS never decides it).

  • reasonstringrequired

    one of: withdrawal · defect · damaged · not_delivered · other

  • reasonNotestringrequirednullable
  • handoverstringrequired

    one of: pickup · drop_off

  • dropOffPointobject (free-form)requirednullable

    The point you named at booking (handover.dropOffPoint), as sent.

  • carrierReturnLabelbooleanrequired

    Booked as the carrier's own return label (associated with the original).

  • customsReasonstringrequirednullable

    one of: REJECTED · FAULTY_ITEM · OTHER · null

    Between two countries (with the customs lines — the carrier requires it): the return's reason as customs recognises it; null for a domestic return.

  • chargeobjectrequirednullable

    payer seller of a platform paid on the platform: the charge you settle (POST /shipments/{id}/return-charge/settle); null for any other payer.

  • statusstringrequired

    one of: due · settled · void

  • amountnumberrequirednullable
  • amountMinorintegerrequirednullable

    The amount beside it in minor units (cents).

  • currencystringrequirednullable
  • settledMethodstringrequirednullable

    one of: withheld · paid · null

  • settledReferencestringrequirednullable
  • settledAtstring (date-time)requirednullable
  • voidedAtstring (date-time)requirednullable
  • createdAtstring (date-time)required
  • warnings[]array of object

    PICKUP_FAILED (pickup.required), label address warnings.

  • codestringrequired
  • messagestringrequired
  • pathstring

    The request field the warning is about (label address warnings).

BookingPending
  • idstring (uuid)required
  • statusstringrequired

    one of: confirmed

  • warnings[]array of objectrequireditems ≥ 1
  • codestringrequired
  • messagestringrequired
  • pathstring

    The request field the warning is about (label address warnings).

400 VALIDATION_FAILED — the body, payer (a platform names buyer, seller or platform; an account its own), handover, a quote that is not this shipment's return quote (path quoteId), platform.payment missing or not allowed for the payer, operationRef missing for a platform paid on the platform, the delivery customer or buyer acceptance missing while IDS invoices the buyer, a contact the label cannot print, customs.dutiesPayment (a return label names no duties payer)

Headers: X-Request-Id

Codes: VALIDATION_FAILED

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

401 AUTHENTICATION_FAILED — missing, malformed, invalid, revoked or expired key

Headers: X-Request-Id

Codes: AUTHENTICATION_FAILED

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

402 PAYMENT_REQUIRED / CREDIT_LIMIT_EXCEEDED / CREDIT_OVERDUE_BLOCKED / PAYMENT_FAILED (paid from the balance)

Headers: X-Request-Id

Codes: PAYMENT_REQUIREDCREDIT_LIMIT_EXCEEDEDCREDIT_OVERDUE_BLOCKEDPAYMENT_FAILED

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

403 API_ACCESS_DISABLED / API_ACCOUNT_DISABLED / API_KEY_IP_NOT_ALLOWED / API_TERMS_NOT_ACCEPTED / FORBIDDEN_SCOPE / API_OWNER_NOT_BILLABLE; a platform's key: PLATFORM_SUSPENDED (a quote, booking or test operation of a suspended platform) / PLATFORM_TARIFF_MISSING (a quote or booking before IDS set its tariff)

Headers: X-Request-Id

Codes: API_ACCESS_DISABLEDAPI_ACCOUNT_DISABLEDAPI_KEY_IP_NOT_ALLOWEDAPI_TERMS_NOT_ACCEPTEDFORBIDDEN_SCOPEAPI_OWNER_NOT_BILLABLEPLATFORM_SUSPENDEDPLATFORM_TARIFF_MISSING

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

404 NOT_FOUND — not visible to this key (other account or other environment)

Headers: X-Request-Id

Codes: NOT_FOUND

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

409 RETURN_ORIGINAL_CANCELLED / RETURN_LIMIT_REACHED / IDEMPOTENCY_CONFLICT / IDEMPOTENCY_IN_PROGRESS / QUOTE_ALREADY_USED / OPERATION_REF_TAKEN

Headers: X-Request-Id

Codes: RETURN_ORIGINAL_CANCELLEDRETURN_LIMIT_REACHEDIDEMPOTENCY_CONFLICTIDEMPOTENCY_IN_PROGRESSQUOTE_ALREADY_USEDOPERATION_REF_TAKEN

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

410 QUOTE_EXPIRED — quote the return again

Headers: X-Request-Id

Codes: QUOTE_EXPIRED

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

422 RETURN_PICKUP_UNAVAILABLE (book it as drop_off) / RETURN_IMPORT_DUTIES_UNSET / QUOTE_MISMATCH / PLATFORM_PAYMENT_MISMATCH / CARRIER_ERROR

Headers: X-Request-Id

Codes: RETURN_PICKUP_UNAVAILABLERETURN_IMPORT_DUTIES_UNSETQUOTE_MISMATCHPLATFORM_PAYMENT_MISMATCHCARRIER_ERROR

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

429 RATE_LIMITED — per-key or per-IP limit exceeded; wait Retry-After seconds

Headers: X-Request-IdRetry-After

Codes: RATE_LIMITED

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

500 INTERNAL_ERROR

Headers: X-Request-Id

Codes: INTERNAL_ERROR

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

503 API_DISABLED (API switched off); CARRIER_NOT_CONFIGURED / CURRENCY_RATE_MISSING where a carrier or FX rate is used

Headers: X-Request-Id

Codes: API_DISABLEDCARRIER_NOT_CONFIGUREDCURRENCY_RATE_MISSING

The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.

Error codes of this operation

The codes the answers of this operation name. Always read error.retryable of the answer itself — «varies» means it differs per answer. The gates of every keyed request (401, 403, 429, 503) and the whole catalog: errors.

  • VALIDATION_FAILEDHTTP 400retryable: nodetails: ValidationIssuesdetails: ServiceRefusal

    The request is invalid: a field (details[].path), an unknown field, a missing Idempotency-Key, a body that is not JSON, an address the label cannot print. Fix it; repeating it unchanged fails again.

  • AUTHENTICATION_FAILEDHTTP 401retryable: no

    Missing, malformed, invalid, revoked or expired key; an environment tag that does not match. (An account switched off answers 403 API_ACCOUNT_DISABLED since SEC.)

  • PAYMENT_REQUIREDHTTP 402retryable: yes

    The balance does not cover the price, or a pending debt exists (paymentRequired) — top up and retry the same key.

  • CREDIT_LIMIT_EXCEEDEDHTTP 402retryable: yes

    Deferred payment: the booking would pass the credit limit (creditLimit).

  • CREDIT_OVERDUE_BLOCKEDHTTP 402retryable: yes

    Deferred payment: overdue debt blocks new bookings (creditOverdue) — pay it and retry.

  • PAYMENT_FAILEDHTTP 402retryable: no

    Charging failed after the carrier booked; the label was cancelled or is held for IDS review.

  • API_ACCESS_DISABLEDHTTP 403retryable: no

    API access is switched off for this account.

  • API_ACCOUNT_DISABLEDHTTP 403retryable: no

    The IDS account of this key is switched off, not approved or closed (for an employee's key: its franchise owner's account) — the key stops with it; contact IDS.

  • API_KEY_IP_NOT_ALLOWEDHTTP 403retryable: no

    IDS keeps a list of IP addresses for this key and the request came from another one — send it from a listed address, or ask IDS to change the list.

  • API_TERMS_NOT_ACCEPTEDHTTP 403retryable: no

    The IDS account of this key has not accepted the API Terms of Use (/legal/api-terms) — its holder accepts them in the IDS cabinet (Integrations / API), or IDS records a signed agreement (for an employee's key: its franchise owner's account). Retrying does not help until then.

  • FORBIDDEN_SCOPEHTTP 403retryable: no

    The key lacks the scope of this operation (x-scope).

  • API_OWNER_NOT_BILLABLEHTTP 403retryable: no

    The account cannot be billed through the API (no pricing tier, or an admin account).

  • PLATFORM_SUSPENDEDHTTP 403retryable: no

    The platform of this key is suspended by IDS: quotes, bookings and test operations are refused until IDS resumes it; reads, the tracking refresh, a cancellation and a complaint still work. A retry of a booking finished before the suspension replays its answer.

  • PLATFORM_TARIFF_MISSINGHTTP 403retryable: no

    The platform has no tariff yet — IDS sets it; no quote or booking until then.

  • NOT_FOUNDHTTP 404retryable: no

    Unknown path, or an object this key may not see (another account, the other environment).

  • RETURN_ORIGINAL_CANCELLEDHTTP 409retryable: no

    The original shipment was cancelled — there is nothing to return.

  • RETURN_LIMIT_REACHEDHTTP 409retryable: no

    The original already has as many returns that are not cancelled as IDS allows (10) — cancel an unused one first.

  • IDEMPOTENCY_CONFLICTHTTP 409retryable: no

    The Idempotency-Key was used for a different body, operation or environment.

  • IDEMPOTENCY_IN_PROGRESSHTTP 409retryable: yes

    The first request with this Idempotency-Key is still running — retry the same key later.

  • QUOTE_ALREADY_USEDHTTP 409retryable: variesdetails: QuoteAlreadyUsedDetails

    The quote is single use: another booking used it (details.state booked, retryable false) or is using it now (booking_in_progress, retryable true).

  • OPERATION_REF_TAKENHTTP 409retryable: variesdetails: OperationRefTakenDetails

    The operationRef belongs to another booking (another Idempotency-Key) — answered before the quote is looked at: details.state booked (details.shipmentIds — do not book again), booking_in_progress (retryable true: ask again after Retry-After; no shipmentIds) or under_review (that booking stopped before it was finished and IDS reviews it — contact IDS; no shipmentIds). A booking undone after a part of it had been charged (those shipments cancelled and refunded) frees its operationRef. The same Idempotency-Key replays its own answer instead.

  • QUOTE_EXPIREDHTTP 410retryable: no

    The quote expired (expiresAt) — request a new quote before the buyer pays.

  • RETURN_PICKUP_UNAVAILABLEHTTP 422retryable: nodetails: ReturnPickupUnavailableDetails

    The carrier does not collect at the buyer's address (details.reason, e.g. RESIDENTIAL_PICKUP_UNAVAILABLE: no courier at a home address) — book it with handover.method drop_off; the return quote lists points (include dropOffPoints). Nothing was booked.

  • RETURN_IMPORT_DUTIES_UNSETHTTP 422retryable: no

    A return across the EU's customs border (a buyer outside the EU, or a seller outside it) is not offered yet: the carrier bills a return label's import duties and taxes to IDS's account, and IDS has not set who bears them. Returns within the EU are not affected — contact IDS.

  • QUOTE_MISMATCHHTTP 422retryable: nodetails: ValidationIssues

    The booking asks for what the quote did not price (details[0].path) — get a new quote.

  • PLATFORM_PAYMENT_MISMATCHHTTP 422retryable: nodetails: PlatformPaymentMismatchDetails

    A booking paid on the platform: the payment sent (platform.payment) is not exactly the price of the quote booked — amountMinor and currency (details.expected / received). Nothing was booked; quote again before the buyer pays.

  • CARRIER_ERRORHTTP 422retryable: variesdetails: CarrierErrorDetails

    The carrier refused or failed the request. retryable true: it throttled, failed or did not answer — the route's availability is unknown, try later; false: it refused this request — or, on a booking, the carrier may have made the label without answering (the Idempotency-Key and the operationRef are closed, IDS reviews it: look the booking up with GET /shipments?operationRef= before booking again).

  • RATE_LIMITEDHTTP 429retryable: yes

    A limit per minute — the key's requests, its quotes, its platform's keys together, or the client IP (limitScope) — wait Retry-After seconds (retryAfterSec, limit).

  • INTERNAL_ERRORHTTP 500retryable: no

    Unexpected — for a booking, check GET /shipments before using a new key; quote the requestId.

  • API_DISABLEDHTTP 503retryable: no

    IDS switched the whole API off (/ping and /openapi.json keep answering).

  • CARRIER_NOT_CONFIGUREDHTTP 503retryable: no

    The carrier credentials of this environment are missing.

  • CURRENCY_RATE_MISSINGHTTP 503retryable: no

    IDS has no exchange rate for the balance currency.