We're announcing 🧑‍🚀 inter-galactic shipping ✨ for 3025!
Cosmo Cargo Inc.
Shipment API

Shipment

​Address · required
​Address · required
​Package[] · minItems: 1 · maxItems: 50 · unique · required
id
​string · uuid
recipientEmail
​string · email
​Comment[]

Notes about the shipment

status
​string | null · enum
Enum values:
CREATED
IN_TRANSIT
DELIVERED
EXCEPTION
createdAt
​string · date-time
​Comment[] · maxItems: 100
tags
​string[]
Enum values:
FRAGILE
EXPRESS
INTERNATIONAL
CUSTOMS_REQUIRED
facilities
​string[]
Enum values:
LAX1
JFK2
ORD3
DFW4
SEA5
​array

Array of custom data items that can be of any type

metadata
​object

Empty object for future extensibility

​object

Dictionary of custom string fields that can be added to the shipment

Example: {"customerReference":"CUST-123","internalNotes":"Handle with care","specialInstructions":"Leave at front desk"}
​object

Dictionary of facility capabilities and their status

Example: {"temperatureControl":{"enabled":true,"lastChecked":"2024-03-15T10:30:00Z"},"hazardousMaterials":{"enabled":false,"lastChecked":"2024-03-14T15:45:00Z"}}
​TrackingDetails

Real-time tracking information for this shipment

​

Tracking details for return shipment if applicable

Address

street
​string · minLength: 1 · maxLength: 200 · required
city
​string · minLength: 1 · maxLength: 100 · required
country
​string · pattern: ^[A-Z]{2}$ · required

ISO 3166-1 alpha-2 country code

postalCode
​string · minLength: 1 · maxLength: 20 · required
state
​string · minLength: 1 · maxLength: 100

Package

weight
​number · float · min: 0.1 · max: 1000 · required

Weight in kilograms

​Dimensions · required

Dimensions

length
​number · float · min: 1 · max: 300 · required

Length in centimeters

width
​number · float · min: 1 · max: 300 · required

Width in centimeters

height
​number · float · min: 1 · max: 300 · required

Height in centimeters

Error

code
​string · minLength: 1 · maxLength: 50 · pattern: ^[A-Z_]+$ · required
message
​string · minLength: 1 · maxLength: 500 · required

HTTPValidationError

HTTP validation error details
​object[] · required

ShipmentValidationError

Shipment-specific validation error
code
​string · enum · required

Specific validation error code

Enum values:
INVALID_ADDRESS
INVALID_PACKAGE
INVALID_WEIGHT
MISSING_FIELD
message
​string · required

Human-readable error message

field
​string · required

Field that failed validation

suggestion
​string

Suggested fix for the error

TrackingDetails

Detailed tracking information for a shipment
currentLocation
​string · required

Current location of the shipment

Example: Distribution Center - Los Angeles, CA
lastUpdate
​string · date-time · required

Last tracking update timestamp

estimatedDelivery
​string · date-time

Estimated delivery date and time

carrier
​string · enum

Carrier handling the shipment

Enum values:
FEDEX
UPS
USPS
DHL
Example: FEDEX
​object

ShipmentHistory

​Shipment
​ShipmentHistory · minProps: 1 · maxProps: 3
transferredAt
​string · date-time

When the shipment was transferred

Comment

A comment on a shipment that can have nested replies
id
​string · pattern: ^[a-zA-Z0-9-]+$ · required

Unique identifier for the comment

author
​string · required

Name of the person who wrote the comment

text
​string · required

Content of the comment

timestamp
​string · date-time · required

When the comment was posted

​Comment[]

Nested replies to this comment

Organization

A shipping organization that can have sub-organizations (e.g. regional offices)
id
​string · pattern: ^[a-zA-Z0-9-]+$ · required

Unique identifier for the organization

name
​string · minLength: 1 · maxLength: 200 · required

Name of the organization

​Organization

The parent organization (direct object circular reference)

​Organization[] · maxItems: 100

Child organizations (array circular reference)

LinkedShipment

A shipment that's part of a chain (e.g. multi-leg delivery)
id
​string · uuid · required

Unique identifier for the shipment

status
​string · enum · required
Enum values:
PENDING
IN_TRANSIT
DELIVERED

A shipment that's part of a chain (e.g. multi-leg delivery)

​LinkedShipment

A shipment that's part of a chain (e.g. multi-leg delivery)

SchemaValidationRequest

Request to validate data against a specific schema
data
​object · required

The data to validate against the schema

​object

SchemaValidationResponse

Response from schema validation
valid
​boolean · required

Whether the data is valid according to the schema

​object[]

Validation errors if any

schemaId
​string

Identifier of the schema used for validation

timestamp
​string · date-time

When the validation was performed

SchemaMetadata

Metadata about a schema
id
​string · required

Unique identifier for the schema

name
​string · required

Human-readable name of the schema

version
​string · pattern: ^\d+\.\d+\.\d+$ · required

Version of the schema

description
​string

Description of the schema

createdAt
​string · date-time

When the schema was created

updatedAt
​string · date-time

When the schema was last updated

spaceEntityType
​string · enum

The type of space entity this schema represents

Enum values:
CARGO
VESSEL
CREW
ROUTE
STATION
PLANET
ASTEROID
SATELLITE