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 · stringrequiredShipment 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
trackingNumberstringrequiredscenariostringrequiredone 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
stepintegerrequiredlastStepintegerrequiredfinishedbooleanrequiredcancelledbooleanrequiredThe label was cancelled: the scenario has stopped.
scans[]array of objectrequiredseqintegerrequired1, 2, … in the order the carrier reported the scans.
stepintegerrequiredThe scenario step that reported it (0 — the label).
codestringrequiredThe carrier's status code (OC, PU, DP, AR, OD, DE, HL, RS, SE, DL).
descriptionstringrequiredcitystringrequiredcountryCodestringrequiredatstring (date-time)requiredWhen the scan happened — a late report has an earlier time than the scan before it.
adjustmentobjectrequirednullableScenario adjustment, once the carrier measured the boxes: the declared and the measured box (what a carrier surcharge is based on).
reasonstringrequiredone of: WEIGHT_AND_DIMENSIONS_DIFFER
measuredAtstring (date-time)requiredpackages[]array of objectrequiredpackageNumberintegerrequireddeclaredobjectrequiredweightnumberrequiredweightUnitstringrequiredone of: KG · LB
lengthnumberwidthnumberheightnumberdimUnitstringone of: CM · IN
measuredobjectrequiredSame shape as
adjustment.packages[].declaredabove.
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)
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: noMissing, 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: noAn operation of the test mode (/test/…) with a live key — test keys (ids_test_…) only.
API_ACCESS_DISABLEDHTTP 403retryable: noAPI access is switched off for this account.
FORBIDDEN_SCOPEHTTP 403retryable: noThe key lacks the scope of this operation (x-scope).
API_OWNER_NOT_BILLABLEHTTP 403retryable: noThe account cannot be billed through the API (no pricing tier, or an admin account).
NOT_FOUNDHTTP 404retryable: noUnknown path, or an object this key may not see (another account, the other environment).
TEST_SCENARIO_UNAVAILABLEHTTP 409retryable: noThe shipment has no simulated scenario to read or move: it was booked with the FedEx sandbox, or its label was cancelled.
RATE_LIMITEDHTTP 429retryable: yesA 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: noUnexpected — for a booking, check GET /shipments before using a new key; quote the requestId.
API_DISABLEDHTTP 503retryable: noIDS switched the whole API off (/ping and /openapi.json keep answering).
CARRIER_NOT_CONFIGUREDHTTP 503retryable: noThe carrier credentials of this environment are missing.
CURRENCY_RATE_MISSINGHTTP 503retryable: noIDS has no exchange rate for the balance currency.