ImportOS · Документація
Довідник API

POST /v1/shipments

Attach or update the shipment of a deal

Attach or update the shipment of a deal

One shipment per deal: the first call attaches the container / bill of lading, later calls update it. If a container or B/L number is given the container tracker is queried immediately; a tracker failure is returned in warnings and the shipment is still saved. Emits shipment.updated (webhook). Supports Idempotency-Key. Requires scope write:deals.

  • Автентифікація: заголовок Authorization: Bearer rv_live_... (API-ключі та scopes)
  • Потрібний scope: write:deals
Опис операції, параметрів і полів походить зі специфікації OpenAPI (openapi.json) і подається англійською, як у самому API.

Параметри

ПолеДеТипОбов’язк.Опис
idempotency-keyheaderstringніMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Тіло запиту

ПолеТипОбов’язк.Опис
dealIdstring (uuid)так
mode"container" | "roro" | "truck"ні
containerNostringні
billOfLadingstringні
bookingNostringні
carrierstringні
vesselstringні
portFromstringні
portTostringні
warehousestringні
etdstring (date-time)ні
etastring (date-time)ні
trackingProvider"shipsgo" | "terminal49" | "manual"ні
refreshbooleanні

Відповіді

200

The shipment after the update.

application/json · Схема: Shipment

ПолеТипОбов’язк.Опис
idstring (uuid)так
dealIdstring (uuid)так
status"planned" | "booked" | "loaded" | "in_transit" | "at_port" | "discharged" | "released" | "delivered"так
containerNostring | nullтак
billOfLadingstring | nullтак
vesselstring | nullтак
portFromstring | nullтак
portTostring | nullтак
etdstring | nullтакISO 8601 date-time (UTC).
etastring | nullтакISO 8601 date-time (UTC).
atastring | nullтакISO 8601 date-time (UTC).
eventsobject[]так
events[].atstringні
events[].codestringні
events[].descriptionstringні
events[].locationstringні
events[].vesselstringні
lastTrackedAtstring | nullтакISO 8601 date-time (UTC).
warningsstring[]так

400

Invalid request parameters or body (code validation_error).

application/problem+json · Схема: Problem

401

Missing, malformed, unknown, revoked or expired API key (code unauthorized).

application/problem+json · Схема: Problem

403

The API key lacks the scope required by this endpoint (code insufficient_scope).

application/problem+json · Схема: Problem

404

Not found in this tenant.

application/problem+json · Схема: Problem

409

A request with this Idempotency-Key is still being processed.

application/problem+json · Схема: Problem

422

No container/B/L number, or Idempotency-Key reused.

application/problem+json · Схема: Problem

429

Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.

application/problem+json · Схема: Problem

На цій сторінці