# Create a shipment Create a new shipment with orders, loads, and services. ## Required fields - customer: Reference to the customer - orders: At least one order with stops and mode ## What gets created - Shipment record - Order(s) with stops, freight, and charges - Optionally: Load(s) and Service(s) ## Relationship to Quotes If you have a Quote, use POST /quotes/{id}/convert-to-shipment instead. Direct shipment creation is for cases without a quote. Endpoint: POST /shipments Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `customer` (any, required) - `customerRep` (any) - `orders` (array, required) Orders to create (at least one required) - `orders.mode` (string, required) Transportation mode. - TL: Full Truckload - LTL: Less than Truckload - AIR: Air freight - OCEAN: Ocean freight - RAIL: Rail freight - INTERMODAL: Intermodal (multiple modes) - DRAYAGE: Drayage/cartage Enum: "TL", "LTL", "AIR", "OCEAN", "RAIL", "INTERMODAL", "DRAYAGE" - `orders.stops` (array, required) At least origin and destination stops - `orders.stops.type` (string, required) Type of stop Enum: "PICKUP", "DELIVERY", "CROSS_DOCK" - `orders.stops.location` (any) - `orders.stops.address` (object) Address for ad-hoc stop (if no location reference) - `orders.stops.address.line1` (string, required) Primary street address line Example: "123 Main St" - `orders.stops.address.line2` (string) Secondary address line (suite, floor, etc.) Example: "Suite 400" - `orders.stops.address.city` (string, required) City name Example: "Chicago" - `orders.stops.address.country` (string, required) Country name or code Example: "USA" - `orders.stops.address.market` (string, required) Market or region identifier Example: "CHI" - `orders.stops.address.latitude` (string) Latitude coordinate Example: "41.8781" - `orders.stops.address.longitude` (string) Longitude coordinate Example: "-87.6298" - `orders.stops.address.isAirportOrAirbase` (boolean) Whether this location is an airport or airbase - `orders.stops.address.isConstructionOrUtilitySite` (boolean) Whether this location is a construction or utility site - `orders.stops.address.isSmartyValidated` (boolean) Whether address has been validated by SmartyStreets Example: true - `orders.stops.address.obeysDst` (boolean) Whether this location observes daylight saving time Example: true - `orders.stops.address.cityId` (string) Reference to standardized city record (internal use) - `orders.stops.requestedStartDate` (string) Requested start date for the stop - `orders.stops.requestedEndDate` (string) Requested end date for the stop - `orders.stops.requestedStartTime` (string) Requested start time (HH:MM format) - `orders.stops.requestedEndTime` (string) Requested end time (HH:MM format) - `orders.stops.appointmentRequired` (boolean) Whether an appointment is required - `orders.stops.notes` (string) Special instructions for the stop - `orders.freight` (object) Freight details for an order - `orders.freight.handlingUnitQuantity` (integer) Number of handling units - `orders.freight.handlingUnitType` (string) Type of handling unit Enum: "PALLET", "SKID", "CARTON", "CRATE", "DRUM", "BUNDLE", "ROLL", "BAG", "TOTE", "OTHER" - `orders.freight.weight` (number) Total weight in pounds - `orders.freight.volume` (number) Total volume in cubic feet - `orders.freight.length` (number) Length in inches - `orders.freight.width` (number) Width in inches - `orders.freight.height` (number) Height in inches - `orders.freight.commodityDescription` (string) Description of the commodity - `orders.freight.hazmat` (boolean) Whether freight is hazardous materials - `orders.freight.stackable` (boolean) Whether freight is stackable - `orders.equipment` (array) Equipment types required - `orders.references` (array) Reference numbers for the order - `orders.references.type` (string, required) Reference type (e.g., BOL_NUMBER, PO_NUMBER) - `orders.references.value` (string, required) Reference value - `orders.specialRequirements` (array) Special requirements (e.g., liftgate, team drivers) - `loads` (array) Optional loads to create - `loads.orderStopIds` (array) Order stop IDs to include in this load - `loads.carrier` (object) Initial carrier assignment - `loads.carrier.carrier` (any, required) - `loads.carrier.contact` (any) - `loads.carrier.charges` (array) - `loads.carrier.charges.chargeCode` (any, required) - `loads.carrier.charges.description` (string) - `loads.carrier.charges.amount` (number, required) - `loads.carrier.charges.quantity` (number) - `loads.carrier.driverName` (string) - `loads.carrier.driverPhone` (string) - `loads.carrier.truckNumber` (string) - `loads.carrier.trailerNumber` (string) - `services` (array) Optional services to create - `services.vendor` (any, required) - `services.vendorContact` (any) - `services.serviceType` (string, required) Type of service. - DRAYAGE: Port/rail drayage - CUSTOMS_CLEARANCE: Customs brokerage - WAREHOUSING: Warehouse storage - CROSS_DOCK: Cross-dock handling - TRANSLOAD: Transloading service - FUMIGATION: Cargo fumigation - INSPECTION: Cargo inspection - DOCUMENTATION: Documentation handling - INSURANCE: Cargo insurance - CARGO_HANDLING: General cargo handling - OTHER: Other service type Enum: "DRAYAGE", "CUSTOMS_CLEARANCE", "WAREHOUSING", "CROSS_DOCK", "TRANSLOAD", "FUMIGATION", "INSPECTION", "DOCUMENTATION", "INSURANCE", "CARGO_HANDLING", "OTHER" - `services.scheduledDate` (string) - `services.referenceNumber` (string) ## Response 201 fields (application/json): - `id` (string, required) Example: "550e8400-e29b-41d4-a716-446655440000" - `key` (string, required) Human-readable shipment ID (e.g., "SHP-12345") Example: "SHP-12345" - `status` (string, required) Current status of the shipment lifecycle. Pre-transit: - DRAFT: Shipment being created - TENDER_PENDING: Awaiting carrier tender acceptance - TENDER_REJECTED: Carrier rejected the tender - ON_HOLD: Shipment temporarily paused - PLANNING: Being planned/scheduled - SELECTED: Carrier selected - BOOKED: Carrier confirmed booking - DISPATCHED: Dispatched to carrier In-transit: - LOADING: Loading at pickup - PICKED_UP: Picked up - IN_TRANSIT: In transit - UNLOADING: Unloading at delivery - ARRIVED_AT_DELIVERY_TERMINAL: At delivery terminal (LTL) - OUT_FOR_DELIVERY: Out for final delivery Final: - DELIVERED: Delivered - CANCELED: Canceled Enum: "DRAFT", "TENDER_PENDING", "ON_HOLD", "PLANNING", "SELECTED", "BOOKED", "DISPATCHED", "LOADING", "PICKED_UP", "IN_TRANSIT", "UNLOADING", "ARRIVED_AT_DELIVERY_TERMINAL", "OUT_FOR_DELIVERY", "DELIVERED", "CANCELED", "TENDER_REJECTED" - `customer` (object) Enhanced reference to a customer resource (returned in responses). Includes full customer details in addition to id/key. Note: Does NOT include nested references (paymentTerm, contacts, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `customer.id` (string, required) Customer UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `customer.key` (string,null) Client-defined reference ID if set Example: "ERP-CUSTOMER-ACME" - `customer.name` (string, required) Customer company name Example: "Acme Manufacturing Corp" - `customer.friendlyId` (string, required) Human-readable customer identifier Example: "A123456" - `customer.status` (string, required) Customer status Enum: "PROSPECT", "ACTIVE", "INACTIVE", "CHURNED" - `customer.phoneNumber` (string,null) Primary phone number Example: "+1-555-123-4567" - `customer.website` (string,null) Customer website URL Example: "https://acme-manufacturing.com" - `customer.createdAt` (string, required) When the customer was created Example: "2025-01-15T10:00:00Z" - `customer.updatedAt` (string, required) When the customer was last updated Example: "2025-01-15T14:30:00Z" - `customer.deletedAt` (string,null) When the customer was soft deleted (null if active) - `customerRep` (object) Customer representative - `customerRep.id` (string, required) User UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `customerRep.email` (string, required) User's email address Example: "john.doe@example.com" - `customerRep.name` (string,null) User's full name Example: "John Doe" - `customerRep.phone` (string,null) User's phone number Example: "+1-555-123-4567" - `customerRep.phoneExt` (string,null) Phone extension Example: "123" - `customerRep.status` (string, required) User account status Enum: "PENDING", "ACTIVE", "INACTIVE" - `customerRep.avatarId` (string,null) Profile avatar document ID Example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" - `customerRep.createdAt` (string, required) When the user was created Example: "2025-01-15T10:00:00Z" - `customerRep.updatedAt` (string, required) When the user was last updated Example: "2025-01-15T14:30:00Z" - `customerRep.deletedAt` (string,null) When the user was soft deleted (null if active) - `orders` (array) Orders in this shipment - `orders.key` (string,null) Friendly order ID - `orders.mode` (string) Transportation mode. - TL: Full Truckload - LTL: Less than Truckload - AIR: Air freight - OCEAN: Ocean freight - RAIL: Rail freight - INTERMODAL: Intermodal (multiple modes) - DRAYAGE: Drayage/cartage Enum: "TL", "LTL", "AIR", "OCEAN", "RAIL", "INTERMODAL", "DRAYAGE" - `orders.billingStatus` (string) Billing status for the order (AR side). - DOCS_NEEDED: Waiting for delivery documents - NOT_READY_TO_INVOICE: Not ready to invoice - READY_TO_INVOICE: Ready to generate invoice - INVOICED: Invoice generated and sent - PARTIALLY_PAID: Partial payment received - PAID: Fully paid Enum: "DOCS_NEEDED", "NOT_READY_TO_INVOICE", "READY_TO_INVOICE", "INVOICED", "PARTIALLY_PAID", "PAID" - `orders.stops` (array) Flattened stops array - `orders.stops.type` (string) Enum: "PICKUP", "DELIVERY", "CROSS_DOCK" - `orders.stops.sequence` (integer) Stop order in the route - `orders.stops.location` (object) Reference to another resource (returned in responses) - `orders.stops.location.id` (string, required) Resource UUID - `orders.stops.address` (object) Physical address/location details (nested, without id). This is an embedded object representing a Location record. The id is managed internally and not exposed in the API. - `orders.stops.address.line1` (string, required) Primary street address line Example: "123 Main St" - `orders.stops.address.line2` (string,null) Secondary address line (suite, floor, etc.) Example: "Suite 400" - `orders.stops.address.city` (string, required) City name Example: "Chicago" - `orders.stops.address.country` (string, required) Country name or code Example: "USA" - `orders.stops.address.market` (string, required) Market or region identifier Example: "CHI" - `orders.stops.address.latitude` (string,null) Latitude coordinate Example: "41.8781" - `orders.stops.address.longitude` (string,null) Longitude coordinate Example: "-87.6298" - `orders.stops.address.isAirportOrAirbase` (boolean, required) Whether this location is an airport or airbase - `orders.stops.address.isConstructionOrUtilitySite` (boolean, required) Whether this location is a construction or utility site - `orders.stops.address.isSmartyValidated` (boolean, required) Whether address has been validated by SmartyStreets Example: true - `orders.stops.address.obeysDst` (boolean, required) Whether this location observes daylight saving time Example: true - `orders.stops.address.cityId` (string,null) Reference to standardized city record (internal use) - `orders.stops.requestedStartDate` (string,null) - `orders.stops.requestedEndDate` (string,null) - `orders.stops.requestedStartTime` (string,null) - `orders.stops.requestedEndTime` (string,null) - `orders.stops.actualArrival` (string,null) - `orders.stops.actualDeparture` (string,null) - `orders.stops.appointmentRequired` (boolean) - `orders.stops.notes` (string,null) - `orders.freight` (object) - `orders.freight.handlingUnitQuantity` (integer,null) - `orders.freight.handlingUnitType` (string,null) - `orders.freight.weight` (number,null) Weight in pounds - `orders.freight.volume` (number,null) Volume in cubic feet - `orders.freight.length` (number,null) - `orders.freight.width` (number,null) - `orders.freight.height` (number,null) - `orders.freight.commodityDescription` (string,null) - `orders.freight.hazmat` (boolean) - `orders.freight.stackable` (boolean) - `orders.references` (array) - `orders.references.type` (string) Reference type (e.g., BOL_NUMBER) - `orders.references.value` (string) Reference value - `orders.charges` (array) - `orders.charges.chargeCode` (object) Reference to another resource (returned in responses) - `orders.charges.description` (string,null) - `orders.charges.amount` (number) - `orders.charges.quantity` (number) - `orders.charges.rate` (number,null) - `orders.equipment` (array) Example: [{"id":"550e8400-e29b-41d4-a716-446655440000","key":"ERP-USER-12345"}] - `orders.specialRequirements` (array) Example: [{"id":"550e8400-e29b-41d4-a716-446655440000","key":"ERP-USER-12345"}] - `orders.mileage` (number,null) - `orders.totalRevenue` (number,null) Sum of all charges - `orders.createdAt` (string) - `orders.updatedAt` (string,null) - `loads` (array) Loads for carrier execution - `loads.key` (string,null) - `loads.carriers` (array) Flattened carriers array - `loads.carriers.carrier` (object) Enhanced reference to a carrier resource (returned in responses). Includes full carrier details in addition to id/key. Note: Does NOT include nested references (contacts, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `loads.carriers.carrier.id` (string, required) Carrier UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `loads.carriers.carrier.name` (string, required) Carrier company name Example: "Swift Transportation" - `loads.carriers.carrier.email` (string,null) Primary email address Example: "dispatch@swifttrans.com" - `loads.carriers.carrier.createdAt` (string, required) When the carrier was created Example: "2025-01-15T10:00:00Z" - `loads.carriers.carrier.updatedAt` (string, required) When the carrier was last updated Example: "2025-01-15T14:30:00Z" - `loads.carriers.carrier.deletedAt` (string,null) When the carrier was soft deleted (null if active) - `loads.carriers.status` (string) Enum: "ACTIVE", "TONU", "BOUNCED" - `loads.carriers.bookedAt` (string,null) - `loads.carriers.dispatchedAt` (string,null) - `loads.carriers.totalCost` (number,null) - `services` (array) Vended services - `services.vendor` (object) Enhanced reference to a vendor profile. Includes full vendor details in addition to id/key. - `services.vendor.id` (string, required) Vendor UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `services.vendor.friendlyId` (string, required) Human-readable vendor identifier Example: "V123456" - `services.vendor.name` (string, required) Vendor legal name Example: "ABC Warehouse Services" - `services.vendor.phone` (string,null) Primary phone number Example: "+1-555-123-4567" - `services.vendor.status` (string,null) Vendor status Example: "ACTIVE" - `services.vendor.currency` (string,null) Preferred currency code (ISO 4217) Example: "USD" - `services.vendor.createdAt` (string, required) When the vendor was created Example: "2025-01-15T10:00:00Z" - `services.vendor.updatedAt` (string, required) When the vendor was last updated Example: "2025-01-15T14:30:00Z" - `services.serviceType` (string) - `services.cost` (number,null) - `totalRevenue` (number,null) Sum of all order charges - `totalCost` (number,null) Sum of all load and service costs - `margin` (number,null) Revenue minus cost - `marginPercent` (number,null) Margin as percentage of revenue - `deliveredAt` (string,null) ## Response 400 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 401 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 422 fields (application/json): - `error` (string, required) Error code Example: "validation_error" - `message` (string, required) Human-readable error message - `details` (array, required) Validation error details - `details.field` (string, required) Field name that failed validation - `details.message` (string, required) Validation error message