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
Create a new shipment
POST
https://api.sh.example.com/v1
/shipments
Creates a new shipment with the provided details
Headers
X-Correlation-ID
stringUnique identifier for tracking requests across multiple services
Idempotency-Key
stringUnique key to ensure idempotency of the request
X-API-Version
stringAPI version requested by the client
X-Request-Priority
stringPriority level for processing the shipment request
Request Body
recipientAddress
objectsenderAddress
objectpackages
object[]
id
stringoptionalstatus
stringoptionaltrackingNumber
stringoptionalcreatedAt
stringoptionalcomments
object[]optional
Responses
recipientAddress
objectsenderAddress
objectpackages
object[]id
stringoptionalstatus
stringoptionaltrackingNumber
stringoptionalcreatedAt
stringoptionalcomments
object[]optional
Track a shipment
GET
https://api.sh.example.com/v1
/shipments/{trackingNumber}
Get the current status and tracking information for a shipment
path Parameters
trackingNumber
stringrequired
Headers
X-Correlation-ID
stringUnique identifier for tracking requests across multiple services
X-API-Version
stringAPI version requested by the client
X-Cache-Control
stringCaching behavior for the tracking response
Responses
recipientAddress
objectsenderAddress
objectpackages
object[]id
stringoptionalstatus
stringoptionaltrackingNumber
stringoptionalcreatedAt
stringoptionalcomments
object[]optional
Hold shipment
PUT
https://api.sh.example.com/v1
/shipments/{shipmentId}/hold
Place a shipment on hold at a facility
path Parameters
shipmentId
stringrequired
Request Body
holdUntil
string
reason
stringoptionalfacilityId
stringoptional
Responses
status
stringoptionalholdLocation
stringoptionalholdUntil
stringoptional