# Filter shipments Search for shipments using filter criteria. ## Common Filters - Active shipments: { "filter": { "status": { "notIn": ["DELIVERED", "CANCELED"] } } } - Delivered today: { "filter": { "deliveredAt": { "greaterThanOrEqualTo": "2025-01-15T00:00:00Z" } } } - By customer: { "filter": { "customerId": { "equalTo": "uuid" } } } Endpoint: POST /shipments/filter Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `filter` (object) - `filter.id` (object) Filter options for UUID fields (all operations) - `filter.id.equalTo` (string) Exact match - `filter.id.notEqualTo` (string) Not equal to - `filter.id.in` (array) Matches any UUID in the array - `filter.id.notIn` (array) Does not match any UUID in the array - `filter.id.isNull` (boolean) Field is null (true) or not null (false) - `filter.key` (object) Filter options for string fields - `filter.key.in` (array) Matches any value in the array - `filter.key.notIn` (array) Does not match any value in the array - `filter.key.includes` (string) Contains substring (case-insensitive) - `filter.key.notIncludes` (string) Does not contain substring (case-insensitive) - `filter.key.startsWith` (string) Starts with prefix (case-insensitive) - `filter.key.notStartsWith` (string) Does not start with prefix (case-insensitive) - `filter.key.endsWith` (string) Ends with suffix (case-insensitive) - `filter.key.notEndsWith` (string) Does not end with suffix (case-insensitive) - `filter.status` (object) - `filter.status.equalTo` (string) 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" - `filter.status.notEqualTo` (string) 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" - `filter.status.in` (array) 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" - `filter.status.notIn` (array) 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" - `filter.customerId` (object) Filter options for UUID fields (all operations) - `filter.customerRepId` (object) Filter options for UUID fields (all operations) - `filter.createdAt` (object) Filter options for datetime fields - `filter.createdAt.lessThan` (string) Before this datetime - `filter.createdAt.lessThanOrEqualTo` (string) On or before this datetime - `filter.createdAt.greaterThan` (string) After this datetime - `filter.createdAt.greaterThanOrEqualTo` (string) On or after this datetime - `filter.updatedAt` (object) Filter options for datetime fields - `filter.deliveredAt` (object) Filter options for datetime fields - `filter.and` (array) - `filter.or` (array) - `filter.not` (object) - `pageSize` (integer) - `cursor` (string) ## Response 200 fields (application/json): - `data` (array, required) - `data.id` (string, required) Example: "550e8400-e29b-41d4-a716-446655440000" - `data.key` (string, required) Human-readable shipment ID (e.g., "SHP-12345") Example: "SHP-12345" - `data.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" - `data.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. - `data.customer.id` (string, required) Customer UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.customer.key` (string,null) Client-defined reference ID if set Example: "ERP-CUSTOMER-ACME" - `data.customer.name` (string, required) Customer company name Example: "Acme Manufacturing Corp" - `data.customer.friendlyId` (string, required) Human-readable customer identifier Example: "A123456" - `data.customer.status` (string, required) Customer status Enum: "PROSPECT", "ACTIVE", "INACTIVE", "CHURNED" - `data.customer.phoneNumber` (string,null) Primary phone number Example: "+1-555-123-4567" - `data.customer.website` (string,null) Customer website URL Example: "https://acme-manufacturing.com" - `data.customer.createdAt` (string, required) When the customer was created Example: "2025-01-15T10:00:00Z" - `data.customer.updatedAt` (string, required) When the customer was last updated Example: "2025-01-15T14:30:00Z" - `data.customer.deletedAt` (string,null) When the customer was soft deleted (null if active) - `data.customerRep` (object) Customer representative - `data.customerRep.id` (string, required) User UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.customerRep.email` (string, required) User's email address Example: "john.doe@example.com" - `data.customerRep.name` (string,null) User's full name Example: "John Doe" - `data.customerRep.phone` (string,null) User's phone number Example: "+1-555-123-4567" - `data.customerRep.phoneExt` (string,null) Phone extension Example: "123" - `data.customerRep.status` (string, required) User account status Enum: "PENDING", "ACTIVE", "INACTIVE" - `data.customerRep.avatarId` (string,null) Profile avatar document ID Example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" - `data.customerRep.createdAt` (string, required) When the user was created Example: "2025-01-15T10:00:00Z" - `data.customerRep.updatedAt` (string, required) When the user was last updated Example: "2025-01-15T14:30:00Z" - `data.customerRep.deletedAt` (string,null) When the user was soft deleted (null if active) - `data.orders` (array) Orders in this shipment - `data.orders.key` (string,null) Friendly order ID - `data.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" - `data.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" - `data.orders.stops` (array) Flattened stops array - `data.orders.stops.type` (string) Enum: "PICKUP", "DELIVERY", "CROSS_DOCK" - `data.orders.stops.sequence` (integer) Stop order in the route - `data.orders.stops.location` (object) Reference to another resource (returned in responses) - `data.orders.stops.location.id` (string, required) Resource UUID - `data.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. - `data.orders.stops.address.line1` (string, required) Primary street address line Example: "123 Main St" - `data.orders.stops.address.line2` (string,null) Secondary address line (suite, floor, etc.) Example: "Suite 400" - `data.orders.stops.address.city` (string, required) City name Example: "Chicago" - `data.orders.stops.address.country` (string, required) Country name or code Example: "USA" - `data.orders.stops.address.market` (string, required) Market or region identifier Example: "CHI" - `data.orders.stops.address.latitude` (string,null) Latitude coordinate Example: "41.8781" - `data.orders.stops.address.longitude` (string,null) Longitude coordinate Example: "-87.6298" - `data.orders.stops.address.isAirportOrAirbase` (boolean, required) Whether this location is an airport or airbase - `data.orders.stops.address.isConstructionOrUtilitySite` (boolean, required) Whether this location is a construction or utility site - `data.orders.stops.address.isSmartyValidated` (boolean, required) Whether address has been validated by SmartyStreets Example: true - `data.orders.stops.address.obeysDst` (boolean, required) Whether this location observes daylight saving time Example: true - `data.orders.stops.address.cityId` (string,null) Reference to standardized city record (internal use) - `data.orders.stops.requestedStartDate` (string,null) - `data.orders.stops.requestedEndDate` (string,null) - `data.orders.stops.requestedStartTime` (string,null) - `data.orders.stops.requestedEndTime` (string,null) - `data.orders.stops.actualArrival` (string,null) - `data.orders.stops.actualDeparture` (string,null) - `data.orders.stops.appointmentRequired` (boolean) - `data.orders.stops.notes` (string,null) - `data.orders.freight` (object) - `data.orders.freight.handlingUnitQuantity` (integer,null) - `data.orders.freight.handlingUnitType` (string,null) - `data.orders.freight.weight` (number,null) Weight in pounds - `data.orders.freight.volume` (number,null) Volume in cubic feet - `data.orders.freight.length` (number,null) - `data.orders.freight.width` (number,null) - `data.orders.freight.height` (number,null) - `data.orders.freight.commodityDescription` (string,null) - `data.orders.freight.hazmat` (boolean) - `data.orders.freight.stackable` (boolean) - `data.orders.references` (array) - `data.orders.references.type` (string) Reference type (e.g., BOL_NUMBER) - `data.orders.references.value` (string) Reference value - `data.orders.charges` (array) - `data.orders.charges.chargeCode` (object) Reference to another resource (returned in responses) - `data.orders.charges.description` (string,null) - `data.orders.charges.amount` (number) - `data.orders.charges.quantity` (number) - `data.orders.charges.rate` (number,null) - `data.orders.equipment` (array) Example: [{"id":"550e8400-e29b-41d4-a716-446655440000","key":"ERP-USER-12345"}] - `data.orders.specialRequirements` (array) Example: [{"id":"550e8400-e29b-41d4-a716-446655440000","key":"ERP-USER-12345"}] - `data.orders.mileage` (number,null) - `data.orders.totalRevenue` (number,null) Sum of all charges - `data.orders.createdAt` (string) - `data.orders.updatedAt` (string,null) - `data.loads` (array) Loads for carrier execution - `data.loads.key` (string,null) - `data.loads.carriers` (array) Flattened carriers array - `data.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. - `data.loads.carriers.carrier.id` (string, required) Carrier UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.loads.carriers.carrier.name` (string, required) Carrier company name Example: "Swift Transportation" - `data.loads.carriers.carrier.email` (string,null) Primary email address Example: "dispatch@swifttrans.com" - `data.loads.carriers.carrier.createdAt` (string, required) When the carrier was created Example: "2025-01-15T10:00:00Z" - `data.loads.carriers.carrier.updatedAt` (string, required) When the carrier was last updated Example: "2025-01-15T14:30:00Z" - `data.loads.carriers.carrier.deletedAt` (string,null) When the carrier was soft deleted (null if active) - `data.loads.carriers.status` (string) Enum: "ACTIVE", "TONU", "BOUNCED" - `data.loads.carriers.bookedAt` (string,null) - `data.loads.carriers.dispatchedAt` (string,null) - `data.loads.carriers.totalCost` (number,null) - `data.services` (array) Vended services - `data.services.vendor` (object) Enhanced reference to a vendor profile. Includes full vendor details in addition to id/key. - `data.services.vendor.id` (string, required) Vendor UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.services.vendor.friendlyId` (string, required) Human-readable vendor identifier Example: "V123456" - `data.services.vendor.name` (string, required) Vendor legal name Example: "ABC Warehouse Services" - `data.services.vendor.phone` (string,null) Primary phone number Example: "+1-555-123-4567" - `data.services.vendor.status` (string,null) Vendor status Example: "ACTIVE" - `data.services.vendor.currency` (string,null) Preferred currency code (ISO 4217) Example: "USD" - `data.services.vendor.createdAt` (string, required) When the vendor was created Example: "2025-01-15T10:00:00Z" - `data.services.vendor.updatedAt` (string, required) When the vendor was last updated Example: "2025-01-15T14:30:00Z" - `data.services.serviceType` (string) - `data.services.cost` (number,null) - `data.totalRevenue` (number,null) Sum of all order charges - `data.totalCost` (number,null) Sum of all load and service costs - `data.margin` (number,null) Revenue minus cost - `data.marginPercent` (number,null) Margin as percentage of revenue - `data.deliveredAt` (string,null) - `pagination` (object, required) - `pagination.pageSize` (integer, required) Number of items per page Example: 50 - `pagination.hasNextPage` (boolean, required) Whether there are more pages Example: true - `pagination.hasPreviousPage` (boolean) Whether there are previous pages - `pagination.endCursor` (string,null) Cursor for the next page (null if no next page) Example: "eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9" ## 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