Overview
Shipment API
This API allows you to create and track shipments through the Cosmo Cargo platform.
Authentication
All endpoints require a valid API key passed in the X-API-Key
header.
Endpoint
Update customs documentation
PUT
https://api.sh.example.com/v1
/shipments/{shipmentId}/customs
Update or add customs documentation for international shipments
path Parameters
shipmentId
stringrequired
Headers
X-Correlation-ID
stringUnique identifier for tracking requests across multiple services
Idempotency-Key
stringUnique key to ensure idempotency of the request
X-Customs-Region
stringCustoms processing region for the shipment
Request Body
items
object[]
purpose
stringoptionalincoterm
stringoptional
Responses
id
stringoptionalstatus
stringoptionalcustomsValue
numberoptionalcurrency
stringoptionaldocuments
object[]optional
Pay import duties
POST
https://api.sh.example.com/v1
/shipments/{shipmentId}/customs/duties
Pay import duties and taxes for an international shipment
path Parameters
shipmentId
stringrequired
Request Body
paymentMethod
string
paymentDetails
objectoptional
Responses
amount
numberoptionalcurrency
stringoptionalreceipt
stringoptional