ImportOS · Docs
API reference

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.

  • Authentication: header Authorization: Bearer rv_live_... (API keys and scopes)
  • Required scope: write:deals
Descriptions of the operation, parameters and fields come from the OpenAPI specification (openapi.json).

Parameters

FieldInTypeRequiredDescription
idempotency-keyheaderstringnoMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Request body

FieldTypeRequiredDescription
dealIdstring (uuid)yes
mode"container" | "roro" | "truck"no
containerNostringno
billOfLadingstringno
bookingNostringno
carrierstringno
vesselstringno
portFromstringno
portTostringno
warehousestringno
etdstring (date-time)no
etastring (date-time)no
trackingProvider"shipsgo" | "terminal49" | "manual"no
refreshbooleanno

Responses

200

The shipment after the update.

application/json · Schema: Shipment

FieldTypeRequiredDescription
idstring (uuid)yes
dealIdstring (uuid)yes
status"planned" | "booked" | "loaded" | "in_transit" | "at_port" | "discharged" | "released" | "delivered"yes
containerNostring | nullyes
billOfLadingstring | nullyes
vesselstring | nullyes
portFromstring | nullyes
portTostring | nullyes
etdstring | nullyesISO 8601 date-time (UTC).
etastring | nullyesISO 8601 date-time (UTC).
atastring | nullyesISO 8601 date-time (UTC).
eventsobject[]yes
events[].atstringno
events[].codestringno
events[].descriptionstringno
events[].locationstringno
events[].vesselstringno
lastTrackedAtstring | nullyesISO 8601 date-time (UTC).
warningsstring[]yes

400

Invalid request parameters or body (code validation_error).

application/problem+json · Schema: Problem

401

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

application/problem+json · Schema: Problem

403

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

application/problem+json · Schema: Problem

404

Not found in this tenant.

application/problem+json · Schema: Problem

409

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

application/problem+json · Schema: Problem

422

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

application/problem+json · Schema: Problem

429

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

application/problem+json · Schema: Problem

On this page