API reference › Test mode

GET/test/shipments/{id}

Test keys: the simulated carrier's side of a test shipment — its scenario, step, scans and measured boxes

Key scope
shipments:read
Idempotency-Key
Not used
URL
https://ids.express/api/v1/test/shipments/{id}

Parameters

  • idpath · stringrequired

    Shipment UUID or its master tracking number

Call it

curl -s "https://ids.express/api/v1/test/shipments/$ID" \
  -H "Authorization: Bearer $IDS_KEY"

Answers

200 The scenario state

Headers: X-Request-Id

application/json — TestScenarioState

  • trackingNumberstringrequired
  • scenariostringrequired

    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

  • stepintegerrequired
  • lastStepintegerrequired
  • finishedbooleanrequired
  • cancelledbooleanrequired

    The label was cancelled: the scenario has stopped.

  • scans[]array of objectrequired
  • seqintegerrequired

    1, 2, … in the order the carrier reported the scans.

  • stepintegerrequired

    The scenario step that reported it (0 — the label).

  • codestringrequired

    The carrier's status code (OC, PU, DP, AR, OD, DE, HL, RS, SE, DL).

  • descriptionstringrequired
  • citystringrequired
  • countryCodestringrequired
  • atstring (date-time)required

    When the scan happened — a late report has an earlier time than the scan before it.

  • adjustmentobjectrequirednullable

    Scenario adjustment, once the carrier measured the boxes: the declared and the measured box (what a carrier surcharge is based on).

  • reasonstringrequired

    one of: WEIGHT_AND_DIMENSIONS_DIFFER

  • measuredAtstring (date-time)required
  • packages[]array of objectrequired
  • packageNumberintegerrequired
  • declaredobjectrequired
  • weightnumberrequired
  • weightUnitstringrequired

    one of: KG · LB

  • lengthnumber
  • widthnumber
  • heightnumber
  • dimUnitstring

    one of: CM · IN

  • measuredobjectrequired

    Same shape as adjustment.packages[].declared above.

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 TEST_MODE_ONLY (a live key) / API_ACCESS_DISABLED / FORBIDDEN_SCOPE / API_OWNER_NOT_BILLABLE

Headers: X-Request-Id

Codes: TEST_MODE_ONLYAPI_ACCESS_DISABLEDFORBIDDEN_SCOPEAPI_OWNER_NOT_BILLABLE

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 TEST_SCENARIO_UNAVAILABLE — booked with the FedEx sandbox (no scenario)

Headers: X-Request-Id

Codes: TEST_SCENARIO_UNAVAILABLE

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.

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

  • TEST_MODE_ONLYHTTP 403retryable: no

    An operation of the test mode (/test/…) with a live key — test keys (ids_test_…) only.

  • API_ACCESS_DISABLEDHTTP 403retryable: no

    API access is switched off for this account.

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

  • NOT_FOUNDHTTP 404retryable: no

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

  • TEST_SCENARIO_UNAVAILABLEHTTP 409retryable: no

    The shipment has no simulated scenario to read or move: it was booked with the FedEx sandbox, or its label was cancelled.

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