API reference › Complaints

POST/complaints

File a complaint about one of your shipments (IDR Register of Complaints). Requires Idempotency-Key.

For a shipment of the key's environment that the key owner may see (by id or master tracking number). A production key registers the complaint in IDR's Register of Complaints (number R2026-000001) and sends the letter with the number to contact.email at once; a sandbox key registers it in the test register (TR2026-000001) and sends nothing. Deadlines follow IDR's general conditions of postal services: resolveBy = received + 3 months (kind other — about the platform itself — 30 days); payBy = the earlier of decision + 30 days and resolveBy. The Idempotency-Key is scoped to the account and the key's environment. A retry with the same Idempotency-Key and body answers the same complaint (200). Limits: complaints per contact e-mail a day (an IDS setting) → 429 RATE_LIMITED.

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

Request body

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

application/json — ComplaintRequest

  • shipmentstringrequiredlength 1–64

    Your shipment: its id or master tracking number.

  • filerRolestringrequired

    one of: sender · recipient · platform_representative

  • contactobjectrequired
  • namestringrequiredlength 1–200
  • emailstringrequiredlength ≤ 254

    The register's letters go here.

  • phonestringlength 3–40
  • kindstringrequired

    one of: loss · theft · damage · partial_loss · delay · not_performed · other

  • descriptionstringrequiredlength 20–5000
  • claimobject
  • amountstring | numberrequired

    More than 0, at most two decimals: "150.00".

  • currencystringrequired

    one of: RON · EUR · USD · GBP · CHF · PLN · MDL · UAH

  • payoutobject
  • methodstringrequired

    one of: bank_transfer · postal_order

  • detailsstringlength ≤ 1000
  • localestring

    The letters' language: en, ro, ru, uk, sr, hu, bg, el, zh; anything else → en.

  • attachments[]array of object
  • fileNamestringrequired
  • datastringrequired

    Base64 of a PDF, JPEG or PNG (checked by its bytes).

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/complaints" \
  -H "Authorization: Bearer $IDS_KEY" \
  -H "Idempotency-Key: $OPERATION_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "shipment": "<shipment>",
  "filerRole": "sender",
  "contact": {},
  "kind": "loss",
  "description": "<description>"
}'

Answers

200 { complaint } — the same Idempotency-Key and body: the complaint made before

Headers: X-Request-Id

application/json — ComplaintEnvelope

  • complaintobjectrequired
  • idstring (uuid)required
  • numberstringrequired
  • environmentstringrequired

    one of: sandbox · production

  • statusstringrequired

    one of: received · in_review · resolved · paid · closed

  • decisionstringrequirednullable

    one of: upheld · partially_upheld · rejected · null

  • decisionTextstringrequirednullable
  • kindstringrequired

    one of: loss · theft · damage · partial_loss · delay · not_performed · other

  • filerRolestringrequired

    one of: sender · recipient · platform_representative

  • shipmentIdstring (uuid)requirednullable
  • trackingNumberstringrequirednullable
  • receivedAtstring (date-time)required
  • resolveBystringrequirednullable

    YYYY-MM-DD.

  • payBystringrequirednullable

    YYYY-MM-DD.

  • decidedAtstring (date-time)requirednullable
  • claimobjectrequirednullable
  • amountstringrequired

    Two decimals, e.g. "150.00".

  • amountMinorintegerrequirednullable

    The amount beside it in minor units (cents).

  • currencystringrequirednullable
  • compensationobjectrequirednullable

    Same shape as complaint.claim above.

  • paidOnstringrequirednullable
  • letterSentbooleanrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • history[]array of objectrequired
  • typestringrequired
  • fromStatusstringrequirednullable
  • toStatusstringrequirednullable
  • atstring (date-time)required
201 { complaint } — registered

Headers: X-Request-Id

application/json — ComplaintEnvelope

  • complaintobjectrequired
  • idstring (uuid)required
  • numberstringrequired
  • environmentstringrequired

    one of: sandbox · production

  • statusstringrequired

    one of: received · in_review · resolved · paid · closed

  • decisionstringrequirednullable

    one of: upheld · partially_upheld · rejected · null

  • decisionTextstringrequirednullable
  • kindstringrequired

    one of: loss · theft · damage · partial_loss · delay · not_performed · other

  • filerRolestringrequired

    one of: sender · recipient · platform_representative

  • shipmentIdstring (uuid)requirednullable
  • trackingNumberstringrequirednullable
  • receivedAtstring (date-time)required
  • resolveBystringrequirednullable

    YYYY-MM-DD.

  • payBystringrequirednullable

    YYYY-MM-DD.

  • decidedAtstring (date-time)requirednullable
  • claimobjectrequirednullable
  • amountstringrequired

    Two decimals, e.g. "150.00".

  • amountMinorintegerrequirednullable

    The amount beside it in minor units (cents).

  • currencystringrequirednullable
  • compensationobjectrequirednullable

    Same shape as complaint.claim above.

  • paidOnstringrequirednullable
  • letterSentbooleanrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • history[]array of objectrequired
  • typestringrequired
  • fromStatusstringrequirednullable
  • toStatusstringrequirednullable
  • atstring (date-time)required
400 VALIDATION_FAILED — missing Idempotency-Key, a field (details[0].path), a file type or size (details[0].code COMPLAINT_FILE_TYPE_NOT_ALLOWED / COMPLAINT_FILE_TOO_LARGE / COMPLAINT_FILES_TOO_LARGE / COMPLAINT_TOO_MANY_FILES)

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.

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 IDEMPOTENCY_CONFLICT

Headers: X-Request-Id

Codes: IDEMPOTENCY_CONFLICT

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.)

  • 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).

  • IDEMPOTENCY_CONFLICTHTTP 409retryable: no

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

  • 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.