openapi: 3.0.1 info: version: 0.0.3 title: OneRail Delivery Cloud - Delivery API description: Allows authorized 3rd parties to request new deliveries through the OneRail network license: name: UNLICENSED security: - ApiKey: [] AppId: [] paths: /: x-exegesis-controller: Home get: summary: Root path showing app name and version number operationId: index security: [] tags: - Home responses: '200': description: Success content: application/json: schema: properties: info_payload: description: Basic app info type: object '400': description: Bad request head: operationId: healthCheck responses: '400': description: Bad request default: description: Health check passed. security: [] summary: Health check tags: - HealthCheck /user/authenticate: x-exegesis-controller: User post: summary: Creates and returns an authentication token operationId: authenticate security: [] requestBody: description: User credetials required: true content: application/json: schema: $ref: '#/components/schemas/UserCredentials' responses: '200': description: User token created content: application/json: schema: type: object required: - token properties: token: type: string '401': description: Unauthorized - invalid credentials content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/create: x-exegesis-controller: Delivery post: summary: Creates a new delivery operationId: createDelivery security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: The delivery to be created with all required components required: true content: application/json: schema: $ref: '#/components/schemas/Delivery' responses: '200': description: Success. The delivery has been created content: application/json: schema: $ref: '#/components/schemas/DeliveryCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/get-rates: x-exegesis-controller: Delivery post: summary: Fetches rates of delivery through OneRail network. If saveDraftDelivery is set to true then a delivery will be created. If set to false rates will be fetched without creating a delivery. operationId: getDeliveryRates security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: The delivery to be created with all required components required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/Delivery' - type: object properties: saveDraftDelivery: type: boolean nullable: true default: false responses: '200': description: Rates OneRail offers this moment in time content: application/json: schema: $ref: '#/components/schemas/RatesResponse' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/check-availability: x-exegesis-controller: Delivery post: summary: 'Check delivery availability using progressive input. Minimal requests can return top-level availability only; richer requests can include service-level details. ' operationId: checkDeliveryAvailability security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: 'Delivery data for availability check. Only pickUpData and dropOffData are required, and each may contain partial location data. ' required: true content: application/json: schema: $ref: '#/components/schemas/DeliveryAvailabilityRequest' responses: '200': description: Availability result for the supplied delivery data content: application/json: schema: $ref: '#/components/schemas/DeliveryAvailabilityResponse' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{id}/details: x-exegesis-controller: Delivery get: summary: Returns delivery details operationId: getDetails security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: id in: path description: delivery id required: true schema: type: string - name: numericSystem in: query schema: type: string default: IMPERIAL enum: - IMPERIAL - METRIC responses: '200': description: Returns delivery details content: application/json: schema: type: object description: Delivery properties: id: type: string format: uuid deliveryType: type: string enum: - BUSINESS - RESIDENTIAL notes: type: string triggeredBy: type: string state: type: string enum: - DRAFT - READY TO DISPATCH isReturn: type: boolean dispatchAt: type: string format: date-time deliverySpeedMin: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time shipperExtraData: type: object description: JSON blob that the customer can use to store additional info they may need. nullable: true contractedShipperCostCent: type: integer nullable: true actualShipperCostCent: type: integer nullable: true fromId: type: string format: uuid slaPickupBufferMinute: type: number slaDropoffBufferMinute: type: number computedDistanceMile: type: number computedDistanceKm: type: number deliveryAttemptId: type: string format: uuid nullable: true creationReason: type: string shipmentId: type: string deliveryDeadline: type: string format: date-time shipperContractSla: type: object description: Shipper Contract SLA properties: id: type: string format: uuid pickUpSla: description: Reference to Pick up speed (Acceptable time) type: object properties: id: type: string format: uuid name: type: string value: type: integer dropOffSla: description: Reference to Drop off speed (Acceptable time) type: object properties: id: type: string format: uuid name: type: string value: type: integer latePickupPenaltyPercent: type: number format: float description: Late pick up penalty percentage lateDeliveryPenaltyPercent: type: number format: float description: Late delivery penalty percentage pickUpDesc: type: string description: Pick up description dropOffDesc: type: string description: Drop off description mileageAvg: type: integer description: Mileage average rate mileageMax: type: integer description: Mileage max rate endOfDayTime: type: integer shippingMode: description: Reference to a Shipping Mode type: array items: type: object properties: id: type: string name: type: string shipperSignature: type: object description: Contract Signature properties: id: type: string format: uuid typedName: type: string ipAddress: type: string oneOf: - format: ipv4 - format: ipv6 signedOn: type: string format: date-time signedBy: type: object properties: id: type: string format: uuid firstName: type: string lastName: type: string oneRailSignature: $ref: '#/paths/~1delivery~1%7Bid%7D~1details/get/responses/200/content/application~1json/schema/properties/shipperContractSla/properties/shipperSignature' approvedBy: type: object properties: id: type: string format: uuid firstName: type: string lastName: type: string description: Reference to a OneRail User approvedOn: type: string format: date-time shipperContract: type: object description: Reference to Shipper Contract properties: id: type: string format: uuid name: type: string organization: type: object properties: id: type: string format: uuid name: type: string from: description: Pickup location $ref: '#/paths/~1delivery~1%7Bid%7D~1details/get/responses/200/content/application~1json/schema/properties/to' to: description: Drop off location type: object properties: location: $ref: '#/paths/~1delivery~1pre-validation/post/requestBody/content/application~1json/schema/properties/to/properties/location' id: type: string format: uuid name: type: string address: type: object properties: city: type: string label: type: string state: type: string county: type: string street: type: string street2: type: string stateCode: type: string postalCode: type: string countryCode: type: string countryName: type: string houseNumber: type: string accessCode: type: string nullable: true shippingInstructions: type: string nullable: true receivingInstructions: type: string nullable: true contactName: type: string phoneNumber: type: string nullable: true contactEmailAddress: type: string storeNumber: type: string nullable: true timezone: type: string timezoneOffset: type: number timezoneAbbreviataion: type: string msa: type: string nullable: true cutoffTimeMins: type: number nullable: true organizationId: type: string canDispatchDeliveries: type: boolean deliveryOptions: type: array items: type: object properties: id: type: string format: uuid name: type: string deliveryAttempts: type: array items: type: object properties: id: type: string format: uuid state: type: string failureReason: type: string durationMin: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time deliveryStatus: type: object properties: id: type: string format: uuid location: $ref: '#/paths/~1delivery~1pre-validation/post/requestBody/content/application~1json/schema/properties/to/properties/location' driverName: type: string driverPhone: type: string eta: type: string format: date-time driverNotes: type: string tmsLinkURL: type: string lpDeliveryId: type: string lpDeliveryData: type: object deliveryStateChanges: type: array items: type: object properties: state: type: string enum: - ACCEPTED_BY_LP - CANCELED_BY_LP - REVOKED_BY_ONERAIL - DRIVER_ASSIGNED - EN_ROUTE_TO_PICKUP - ARRIVED_FOR_PICKUP - PICKED_UP - EN_ROUTE_TO_DELIVERY - ARRIVED_FOR_DELIVERY - DELIVERED - FAILED - PERMANENTLY_FAILED location: $ref: '#/paths/~1delivery~1pre-validation/post/requestBody/content/application~1json/schema/properties/to/properties/location' happenedOn: type: string format: date-time capabilityTags: type: array items: type: object properties: id: type: string format: uuid name: type: string deliveryExceptions: type: array items: $ref: '#/components/schemas/DeliveryList/allOf/1/properties/data/items/properties/deliveryExceptions/items' deliveryRating: type: object properties: id: type: string format: uuid rating: type: integer feedback: type: string deliveryFiles: $ref: '#/components/schemas/DeliveryCreated/properties/deliveryFiles' order: type: object description: Order details properties: id: type: string format: uuid orderId: type: string description: External order ID netAmountCent: type: number description: Net Amount, in cents barCode: type: string orderItems: type: array items: type: object properties: id: type: string format: uuid description: type: string identifier: type: string priceCent: type: number lengthIn: type: number lengthCm: type: number widthIn: type: number widthCm: type: number heightIn: type: number heightCm: type: number weightLbs: type: number weightKg: type: number quantity: type: integer status: type: string organization: type: object description: Organization the order belongs to properties: id: type: string format: uuid name: type: string organizationTypes: description: The organization's type(s) type: array items: type: object properties: id: type: string format: uuid name: type: string suggestedFleetVehicle: nullable: true type: object properties: id: type: string format: uuid name: type: string vehicleType: type: string contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/get-historical-rates: x-exegesis-controller: Delivery get: summary: Get historical rates for a delivery operationId: getHistoricalDeliveryRates security: [] parameters: - name: deliveryId in: query description: Onerail uuid deliveryId or internal user deliveryId required: false schema: type: string - name: orderId in: query description: Onerail uuid deliveryId or internal user deliveryId required: false schema: type: string responses: '200': description: Success. The delivery historical rates content: application/json: schema: $ref: '#/components/schemas/HistoricalRateInfo' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: No record found content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{deliveryId}/reschedule: x-exegesis-controller: Delivery post: summary: Reschedule delivery operationId: rescheduleDelivery security: - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: deliveryId in: path description: target delivery required: true schema: type: string format: uuid requestBody: description: Reschedule delivery dispatch payload. content: application/json: schema: type: object required: - dispatchAt properties: dispatchAt: type: string description: datetime in ISO format format: date-time nullable: true numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC responses: '200': description: Returns delivery details content: application/json: schema: $ref: '#/paths/~1delivery~1%7Bid%7D~1details/get/responses/200/content/application~1json/schema' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{id}/cancel: x-exegesis-controller: Delivery post: summary: Cancel a delivery operationId: cancelDelivery security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: id in: path description: delivery id required: true schema: type: string requestBody: description: Reason content: application/json: schema: type: object properties: reason: type: object properties: title: type: string responses: '200': description: Success. The delivery has been cancelled. '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{id}/shipment-id: x-exegesis-controller: Delivery post: summary: Update the shipmentId on a delivery operationId: updateShipmentId security: - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: id in: path description: delivery id required: true schema: type: string requestBody: description: shipmentId content: application/json: schema: type: object properties: shipmentId: type: string responses: '200': description: ShipmentId has been updated or cleared content: application/json: schema: type: string '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/pre-validation: x-exegesis-controller: Delivery post: summary: Validate delivery before creation operationId: preValidateDelivery security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: The delivery to be created with all required parameters required: true content: application/json: schema: type: object description: pre Delivery properties: from: description: Pickup location $ref: '#/paths/~1delivery~1pre-validation/post/requestBody/content/application~1json/schema/properties/to' to: description: Drop off location type: object properties: location: type: object description: Geo Point with latitude and longitude required: - latitude - longitude properties: latitude: type: number longitude: type: number order: description: Order data type: object properties: orderItems: type: array items: type: object description: Order Item properties: lengthIn: type: number description: item length lengthCm: type: number description: item length widthIn: type: number description: item width widthCm: type: number description: item width heightIn: type: number description: item height heightCm: type: number description: item height weightLbs: type: number description: item weight weightKg: type: number format: float quantity: type: number description: item quantity includePrice: type: boolean description: Flag wether to calculate price or not responses: '200': description: Success. Shipper SLA found for that delivery content: application/json: schema: type: object description: pre Delivery properties: shipperSlaId: type: string description: Shipper's matched SLA ID based on parameters priceInCents: type: number description: calculated cost for delivery based on paramaters serviceLevelName: type: string description: Name of Service Level '422': description: Validation failed for the provided delivery data content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/pre-validation-multiple: x-exegesis-controller: Delivery post: summary: Validate delivery before creation operationId: preValidateDeliverySlas security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: The delivery to be created with all required parameters required: true content: application/json: schema: type: object description: pre Delivery properties: from: description: Pickup location $ref: '#/paths/~1delivery~1pre-validation-multiple/post/requestBody/content/application~1json/schema/properties/to' to: description: Drop off location type: object properties: location: $ref: '#/paths/~1delivery~1pre-validation/post/requestBody/content/application~1json/schema/properties/to/properties/location' order: description: Order data type: object properties: orderItems: type: array items: type: object description: Order Item properties: lengthIn: type: number description: item length lengthCm: type: number description: item length widthIn: type: number description: item width widthCm: type: number description: item width heightIn: type: number description: item height heightCm: type: number description: item height weightLbs: type: number description: item weight weightKg: type: number format: float quantity: type: number description: item quantity includePrice: type: boolean description: Flag wether to calculate price or not activeSLAs: type: array description: Active SLAs as set on Shopify App items: type: string responses: '200': description: Success. Shipper SLA found for that delivery content: application/json: schema: type: array items: type: object description: pre Delivery properties: shipperSlaId: type: string description: Shipper's matched SLA ID based on parameters priceInCents: type: number description: calculated cost for delivery based on paramaters serviceLevelName: type: string description: Name of Service Level serviceLevelId: type: string description: ID of Service Level '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /shipping-label/{id}: x-exegesis-controller: DeliveryLabel get: summary: Returns labels for all containers of the delivery operationId: labelInfo security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: id in: path description: Either a OneRail Delivery ID or a shipper-supplied Order ID required: true schema: type: string responses: '200': description: Shipping label URL for each container as well as summary about each container and the whole delivery content: application/json: schema: $ref: '#/components/schemas/LabelInfo' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /shipping-label/{id}/{containerId}: x-exegesis-controller: DeliveryLabel get: summary: Returns label for a specific container operationId: containerLabelInfo security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: id in: path description: Either a OneRail Delivery ID or a shipper-supplied Order ID required: true schema: type: string - name: containerId in: path description: Either a OneRail container ID or a shipper-supplied Order Container ID required: true schema: type: string responses: '200': description: Shipping label URL for the requested container as well and summary about this container content: application/json: schema: $ref: '#/components/schemas/ContainerLabelInfo' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /shipping-label/generate/{deliveryId}: x-exegesis-controller: DeliveryLabel get: summary: Returns labels for all containers of the delivery operationId: getLabelCached security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: deliveryId in: path description: OneRail Delivery ID required: true schema: type: string responses: '200': description: Shipping label URL for each container as well as summary about each container and the whole delivery content: application/json: schema: $ref: '#/components/schemas/LabelInfo' '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /assets/{image}: x-exegesis-controller: Image get: summary: Display image stored in Azure storage account operationId: viewImage security: [] parameters: - name: image in: path description: image name required: true schema: type: string - name: authentication in: query description: provide auth schema: type: string responses: '302': description: Success. Redirected to image blob with access token headers: Location: schema: type: string '400': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /set-redis-key/{key}: x-exegesis-controller: Redis post: summary: Display image stored in Azure storage account operationId: setPayload security: [] parameters: - name: key in: path description: redis key to set required: true schema: type: string requestBody: description: JSON Object to set required: true content: application/json: schema: type: object responses: '200': description: Success. content: application/json: schema: type: string '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /v2/order: x-exegesis-controller: Order post: tags: - Order summary: Create an order with deliveries and returns operationId: createV2 security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: 'The top-level parameter, `orderAction`, determines whether the contents of the `orderData` object will create a new order or will be used as a reference for the creation of deliveries and returns.

If `orderAction == "ADD"`, the given orderId must refer to an existing order with which to associate the deliveries being created. If `orderAction == "CREATE"`, the given `orderId` must be unique. Then if `orderAction === "RETURN"`, the given orderId must refer to an existing order with which to the associated returns being created

Deliveries can be created and associated in the same request that an order is created. ' content: application/json: schema: $ref: '#/components/schemas/v2OrderRequest' responses: '200': description: Success. The order and any deliveries and returns have been created content: application/json: schema: $ref: '#/components/schemas/v2OrderResponse' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /order/{orderId}/partial-update: x-exegesis-controller: Order patch: tags: - Order summary: Partial update an order with deliveries, appending items and containers operationId: patchPartialUpdate security: - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: orderId in: path description: order Id required: true schema: type: string requestBody: description: Order Info and its deliveries content: application/json: schema: $ref: '#/components/schemas/OrderPartialUpdate' responses: '200': description: Success. The order deliveries are updated content: application/json: schema: $ref: '#/components/schemas/OrderCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' put: tags: - Order summary: Partial update an order with deliveries, replacing items and containers operationId: putPartialUpdate security: - ApiKey: [] - OAuth: [] - AppId: [] parameters: - name: orderId in: path description: order Id required: true schema: type: string requestBody: description: Order Info and its deliveries content: application/json: schema: $ref: '#/components/schemas/OrderPartialUpdate' responses: '200': description: Success. The order and deliveries have been updated content: application/json: schema: $ref: '#/components/schemas/OrderCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /order/create: x-exegesis-controller: Order post: tags: - Order summary: Create an order with deliveries operationId: create security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: "Order Info and its deliveries\n
\nto get accessorials you should pass it in:\n
\n deliveries\ \ -> dropOffData -> capabilityTags or deliveries -> pickUpData -> capabilityTags\n
\nin request body as one of\ \ the these schemas:\n
\n1 => array of capabilityTags ids ['043e7f08-10f7-4c13-bfb1-76eaf96e4a24'];\n
\n2\ \ => array of capabilityTags names ['Pup'];\n
\n3 => array of name and quantity object [{ name : 'Pup', quantity\ \ : 20 }];\n
\n4 => array of id and quantity object [{ id : '043e7f08-10f7-4c13-bfb1-76eaf96e4a24', quantity\ \ : 20 }]\n" content: application/json: schema: $ref: '#/components/schemas/OrderCreate' responses: '200': description: Success. The order and deliveries have been created content: application/json: schema: $ref: '#/components/schemas/OrderCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /order/add-return: x-exegesis-controller: Order post: tags: - Order summary: Add return delivery to order operationId: addReturn security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: Order Info and its deliveries content: application/json: schema: $ref: '#/components/schemas/ReturnDeliveryCreate' responses: '200': description: Success. The return deliveries have been created content: application/json: schema: type: array items: $ref: '#/components/schemas/DeliveryCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /order/add-delivery: x-exegesis-controller: Order post: tags: - Order summary: Create an order with deliveries operationId: addDelivery security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: Success. The deliveries have been created content: application/json: schema: $ref: '#/components/schemas/OrderUpdate' responses: '200': description: Success. The return deliveries have been created content: application/json: schema: type: array items: $ref: '#/components/schemas/DeliveryCreated' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /visibility/create: x-exegesis-controller: Visibility post: operationId: createVisibility tags: - Visibility summary: Use the visibility endpoint security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: Visibility request body content: application/json: schema: type: object description: Visibility required: - orderData - deliveries properties: orderData: type: object description: Order Data required: - orderId properties: id: type: string orderId: type: string description: Order ID example: '123' deliveries: type: array items: type: object description: Delivery Information required: - deliveryType properties: deliveryType: type: string enum: - BUSINESS default: BUSINESS example: BUSINESS pickUpData: type: object properties: name: type: string description: The name of the location example: Example Location storeNumber: type: string description: The location number example: '12345' address1: type: string description: The first line of the location address example: 123 Main St address2: type: string description: The second line of the location address example: Suite 100 city: type: string description: The city where the location is situated example: Exampleville state: type: string description: The state where the location is situated example: Examplestate country: type: string description: The country where the location is situated example: Examplecountry zip: type: string description: The ZIP or postal code of the location example: '12345' contactName: type: string description: The name of the location contact person example: John Doe contactPhone: type: string description: The phone number of the location contact person example: 555-123-4567 contactEmailAddress: type: string description: The email address of the location contact person example: johndoe@example.com physicalLocation: type: object properties: altLocation: type: object properties: latitude: type: string description: The latitude of the alternate location example: '37.7749' longitude: type: string description: The longitude of the alternate location example: '-122.4194' dueDate: type: string description: Delivery due date windows: type: object description: Delivery window consisting of both opensOn and closesOn dates required: - opensOn - closesOn properties: opensOn: type: string description: datetime in ISO format closesOn: type: string description: datetime in ISO format dropOffData: $ref: '#/paths/~1visibility~1create/post/requestBody/content/application~1json/schema/properties/deliveries/items/properties/pickUpData' containers: type: array items: type: object description: Container Information properties: name: type: string description: The name of the container example: Container 1 trackingInfo: type: object description: Tracking information of the container properties: type: type: string enum: - LPN description: The type of tracking code example: LPN value: type: string description: The tracking code value example: '123' totalWeight: type: number description: The total weight of the container example: 100.5 shipperContainerId: type: string description: The identifier of the container provided by the shipper example: SHIP123 shipperExtraData: type: object description: Additional information provided by the shipper default: {} example: {} containers: type: array items: $ref: '#/paths/~1visibility~1create/post/requestBody/content/application~1json/schema/properties/deliveries/items/properties/containers/items' description: Nested containers within the current container items: type: array items: $ref: '#/paths/~1visibility~1create/post/requestBody/content/application~1json/schema/properties/deliveries/items/properties/items/items' description: Items within the current container nmfc: type: string description: NMFC (National Motor Freight Classification) code of the container example: 82790-11 freightClass: type: string description: Freight class of the container example: '50' trackingNumber: type: string description: Container tracking number example: ABC123 length: type: number description: Dimension of container example: 4 width: type: number description: Dimension of container example: 4 height: type: number description: Dimension of container example: 4 containerType: type: string description: Container type example: BOX enum: - BOX - BAG - BALE - BUCKET - BUNDLE - CAN - CARTON - CASE - COIL - CRATE - CYLINDER - DRUM - PAIL - PLT - PIECES - REEL - ROLL - SKID - TOTE - TUBE - MAGAZINE - POUND - PIECE - PACKAGE - TL - FTL - GAYLORD doNotRotate: type: boolean default: false items: type: array items: type: object description: Information about an item properties: id: type: string format: uuid description: The UUID of the item example: 4a3b2c1d-1234-5678-9abc-def012345678 description: type: string description: The description of the item example: Item 1 length: type: number description: The length of the item example: 10.2 width: type: number description: The width of the item example: 5.7 height: type: number description: The height of the item example: 3.8 weight: type: number description: The weight of the item example: 2.5 quantity: type: number description: The quantity of the item example: 3 identifier: type: string description: The identifier of the item example: ABC123 complexities: type: string description: The complexities associated with the item example: Complexity 1 priceCent: type: number description: The price of the item in cents example: 500 doNotRotate: type: boolean default: false carrierCode: type: string description: Carrier code example: ABC123 lpDeliveryId: type: string description: The LP Delivery ID example: mockLpDeliveryId12345 shipperExtraData: type: object description: JSON blob that the customer can use to store additional info they may need example: {} shipmentId: type: string description: String identifier value that represents the shipment example: ABC123 numericSystem: type: string description: Numerical system default: IMPERIAL enum: - IMPERIAL - METRIC responses: '200': description: Create visibility response content: application/json: schema: type: object description: Response '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{deliveryId}/scanData: post: x-exegesis-controller: Delivery summary: Create scan data records for containers. operationId: createScanData parameters: - name: deliveryId in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: type: object required: - scanEvent - scanData properties: scanEvent: type: string enum: - PICKED_UP - DELIVERED scanData: type: array items: $ref: '#/components/schemas/ScanData' responses: '200': description: Success. '404': description: Delivery could not be found default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /visibility/{orderId}/add-deliveries: x-exegesis-controller: Visibility post: operationId: addVisibility tags: - Visibility summary: Add visibility deliveries to order parameters: - name: orderId in: path required: true schema: type: string format: uuid security: - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: Visibility request body content: application/json: schema: $ref: '#/paths/~1visibility~1create/post/requestBody/content/application~1json/schema' responses: '200': description: Add visibility response content: application/json: schema: $ref: '#/paths/~1visibility~1create/post/responses/200/content/application~1json/schema' '422': description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /v1/routes: post: x-exegesis-controller: Routes summary: Create new orders within one or more routes. operationId: createRoutes tags: - Routes requestBody: description: Multiple orders with route options. content: application/json: schema: type: object required: - routes properties: routes: type: array items: type: object required: - orders properties: id: type: string minLength: 5 maxLength: 255 description: Custom route id - Will create default if none is given. pattern: ^[a-zA-Z0-9:_-]+$ dispatchToOnerail: type: boolean default: false description: Use if route needs to be dispatched to OneRail. skipOptimizer: type: boolean default: false description: Set to true to skip route optimization step and keep delivery sequence. overflowToOnerail: type: boolean default: false description: Set to true to allow the overflow of routed deliveries to external. orders: type: array items: type: object required: - orderId - deliveries properties: orderId: description: Unique order id identifying this order type: string netAmountCent: type: number description: Net Amount, in cents default: 0 barCode: type: string nullable: true state: type: string enum: - DRAFT - READY_TO_DISPATCH status: type: string description: Order's status. Defaults to PICKING enum: - PICKING - PACKING - SHIPPING default: PICKING deliveries: description: List of deliveries for the order type: array items: type: object description: Delivery required: - to - deliveryType - deliverySpeedMin - state properties: from: description: Pick up location. Pass in the id, or address info, or store number to look up the location type: object properties: id: type: string format: uuid nullable: true name: type: string nullable: true address: type: object nullable: true properties: address1: type: string address2: type: string city: type: string state: type: string postalCode: type: string country: type: string default: US description: Two charter uppercase country code by ISO-3166 latitude: type: number format: float nullable: true longitude: type: number format: float nullable: true storeNumber: type: string nullable: true instructions: type: string nullable: true contactName: type: string nullable: true phoneNumber: type: string nullable: true contactEmailAddress: type: string nullable: true windows: type: object nullable: true properties: opensOn: type: string description: datetime in ISO format closesOn: type: string description: datetime in ISO format appointment: type: object nullable: true properties: durationMins: type: number description: minutes as an integer description: type: string capabilityTags: type: array items: oneOf: - type: string format: uuid - type: object physicalLocation: type: object nullable: true properties: altLocation: type: object properties: latitude: type: number longitude: type: number to: description: Drop off location. Pass in complete location info. Lat/Long are optional and will be populated if not passed. type: object properties: id: type: string format: uuid nullable: true name: type: string nullable: true address: type: object properties: address1: type: string address2: type: string city: type: string state: type: string postalCode: type: string country: type: string default: US description: Two charter uppercase country code by ISO-3166 latitude: type: number format: float nullable: true longitude: type: number format: float nullable: true storeNumber: type: string nullable: true instructions: type: string nullable: true contactName: type: string nullable: true phoneNumber: type: string nullable: true contactEmailAddress: type: string nullable: true windows: type: object nullable: true properties: opensOn: type: string description: datetime in ISO format closesOn: type: string description: datetime in ISO format appointment: type: object nullable: true properties: durationMins: type: number description: minutes as an integer description: type: string capabilityTags: type: array items: oneOf: - type: string format: uuid - type: object physicalLocation: type: object nullable: true properties: altLocation: type: object properties: latitude: type: number longitude: type: number labelType: type: string description: The type of label to print on the delivery requestLabel: type: boolean default: false description: Indicates if a label should be requested for this delivery deliveryType: description: Select if delivery is for a BUSINESS or RESIDENTIAL type: string enum: - BUSINESS - RESIDENTIAL default: RESIDENTIAL deliveryOptions: description: Optional list of delivery options type: array items: type: string uniqueItems: true example: - REQUIRE_SIGNATURE - REQUIRE_OVER_21 - HIPAA - REQUEST_PARCEL_PICKUP - REQUEST_PROOF_OF_PICKUP notes: type: string nullable: true description: Optional delivery notes isReturn: type: boolean default: false description: Is it a return delivery? orderItems: description: List of items for the delivery type: array items: type: object required: - quantity properties: description: type: string nullable: true identifier: type: string nullable: true priceCent: description: Price in cents type: number nullable: true lengthIn: description: item length in inches. Smallest value is an inch. Float values are rounded up type: number nullable: true widthIn: description: item width in inches. Smallest value is an inch. Float values are rounded up type: number nullable: true heightIn: description: item height in inches. Smallest value is an inch. Float values are rounded up type: number nullable: true weightLbs: description: Item weight in pounds. Float values are rounded up type: number nullable: true quantity: description: How many of this item type: integer default: 1 sortOrdinal: type: integer nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true hazardousMaterialDetails: type: object nullable: true properties: identificationNumber: type: string description: Number to identify hazard as designated by shipper (example UN or NP numbers) nullable: true properShippingName: description: The proper shipping name identified by the Shipping Table as desingnated by the shipper type: string nullable: true packagingGroup: type: string nullable: true description: designation for the group of packages provided by the shipper packagingType: type: string nullable: true description: The type of package holding the hazardous material as designated by the shipper hazardClass: type: string nullable: true description: Value from the hazard classification system hazardSubClass: type: string nullable: true description: Value from the hazard classification system for the sub class technicalName: type: string nullable: true description: Technical description given by the shipper for the hazardous item dotLabeling: type: string nullable: true description: Type of label to be placed on the items fedExPackagingType: type: string description: Type of packagying type to be applied for fedex nullable: true doNotRotate: type: boolean default: false emergencyContact: type: object nullable: true properties: contactName: type: string nullable: true description: Emergency contact name contactTitle: type: string nullable: true description: Emergency contact title phoneNumber: type: string nullable: true description: Emergency contact phone number email: type: string nullable: true description: Emergency contact email capabilityTags: type: array items: type: string format: uuid description: List of capability IDs shipperContractSlaId: type: string format: uuid description: Shipper Contract SLA ID nullable: true deliverySpeedMin: type: number description: Delivery Speed, in minutes state: type: string description: State of the delivery order. Defaults to READY_TO_DISPATCH enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH shipperExtraData: type: object description: JSON blob that the customer can use to store additional info they may need. nullable: true serviceLevel: type: string description: Service Level name of sla to match this delivery nullable: true shipmentId: type: string description: Shipper's shipmentId to associate with the delivery nullable: true contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null containers: type: array items: type: object oneOf: - type: object required: - name - totalWeightLbs - items properties: name: type: string totalWeightLbs: type: number description: Weight of container and all items inside it shipperContainerId: type: string shipperExtraData: type: object description: Any additional shipping data in JSON format items: type: array items: $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/orderItems/items' subContainerQuantity: type: number nullable: true uniqueSubLabels: type: boolean nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 hazardousMaterialDetails: type: object nullable: true properties: signatoryContactField: type: string description: Person responsible for hazmat shipment compliance nullable: true emergencyContactNumber: type: string description: Phone number of emergency contact for hazmat shipment nullable: true signatoryContactTitle: type: string description: Professional title of person responsible for the hazmat shipment compliance nullable: true signatoryContactPlace: type: string description: Organization (company) name or code nullable: true offeror: type: string description: Organization (company) name or code nullable: true dotLabeling: type: string description: Type of label to be placed on the container nullable: true authorization: type: string description: Part of DOT Labeling nullable: true fedExPackagingType: type: string description: Type of packaging type to be applied for fedex nullable: true freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true containers: type: array items: oneOf: - $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/containers/items/oneOf/0' - $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/containers/items/oneOf/1' example: - name: inner-predefined-container totalWeightLbs: 5 items: - description: Widget quantity: 2 weightLbs: 2.5 - containerType: BOX lengthIn: 12 widthIn: 8 heightIn: 6 totalWeightLbs: 10 items: - description: Gadget quantity: 1 weightLbs: 10 - type: object required: - containerType - lengthIn - widthIn - heightIn - totalWeightLbs - items properties: containerType: type: string enum: - BOX - BAG - BALE - BUCKET - BUNDLE - CAN - CARTON - CASE - COIL - CRATE - CYLINDER - DRUM - PAIL - PLT - PIECES - REEL - ROLL - SKID - TOTE - TUBE - MAGAZINE - POUND - PIECE - PACKAGE - TL - FTL - GAYLORD lengthIn: type: number description: Length in inches of this item widthIn: type: number description: Width in inches of this item heightIn: type: number description: Height in inches of this item totalWeightLbs: type: number description: Weight of container and all items inside it shipperContainerId: type: string shipperExtraData: type: object description: Any additional shipping data in JSON format items: type: array items: $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/orderItems/items' subContainerQuantity: type: number nullable: true uniqueSubLabels: type: boolean nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true hazardousMaterialDetails: type: object nullable: true $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/containers/items/oneOf/0/properties/hazardousMaterialDetails' doNotRotate: type: boolean default: false containers: type: array items: oneOf: - $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/containers/items/oneOf/0' - $ref: '#/paths/~1v1~1routes/post/requestBody/content/application~1json/schema/properties/routes/items/properties/orders/items/properties/deliveries/items/properties/containers/items/oneOf/1' example: - name: inner-predefined-container totalWeightLbs: 5 items: - description: Widget quantity: 2 weightLbs: 2.5 - containerType: BOX lengthIn: 12 widthIn: 8 heightIn: 6 totalWeightLbs: 10 items: - description: Gadget quantity: 1 weightLbs: 10 dispatchAt: type: string description: datetime in ISO format format: date-time nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true deliveryFiles: $ref: '#/components/schemas/Delivery/properties/deliveryFiles' nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true originLocation: description: Origin location. Pass in the id, or address info, or store number to look up the location type: object nullable: true properties: id: type: string format: uuid nullable: true name: type: string nullable: true address: type: object nullable: true properties: address1: type: string address2: type: string city: type: string state: type: string postalCode: type: string country: type: string default: US description: Two charter uppercase country code by ISO-3166 latitude: type: number format: float nullable: true longitude: type: number format: float nullable: true storeNumber: type: string nullable: true instructions: type: string nullable: true contactName: type: string nullable: true phoneNumber: type: string nullable: true contactEmailAddress: type: string nullable: true responses: '200': description: Success content: application/json: schema: type: object properties: failedOrders: type: array items: type: object properties: orderId: type: string routeId: type: string reason: type: string failedRoutes: type: array items: type: string successfulRoutes: type: array items: type: object properties: orgSourcedIdentifer: type: string deliveryIds: type: array items: type: string format: uuid '422': description: Unexpected error content: application/json: schema: type: object default: description: Error content: application/json: schema: type: object required: - code - message properties: code: type: integer format: int32 message: type: string /oauth2/token: x-exegesis-controller: OAuth post: tags: - OAuth2 summary: 'An endpoint that processes a clientId and clientSecret, verifies the client''s credentials, and issues an access token for authorized API access upon successful validation. ' operationId: issueToken security: [] requestBody: description: OAuth client credentials required: true content: application/json: schema: $ref: '#/components/schemas/OAuthCredentials' responses: '200': description: Success. The delivery has been created content: application/json: schema: $ref: '#/components/schemas/OAuthTokenResponse' '401': description: Unauthorized - invalid credentials content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /delivery/{id}/documents: x-exegesis-controller: Documents get: tags: - Documents summary: Retrieve all documents associated with a specific delivery. This includes a variety of documents required for the shipment process, such as shipping labels, hazard labels, Bills of Lading (BOL), invoices, and additional delivery receipts. operationId: getDocuments description: Fetches all documents linked to a given delivery or order ID. These documents may include mandatory shipment documentation, regulatory compliance forms, hazardous materials labels (if applicable), and other related paperwork essential for tracking and verification purposes. This endpoint supports authentication and requires a valid `deliveryId` or `orderId` parameter to identify the delivery in question. security: - ApiKeyAndAppId: [] - ApiKey: [] AppId: [] parameters: - name: id in: path description: The unique identifier for the delivery, used to locate and retrieve its associated documents or order id . required: true schema: type: string - name: withBase64 in: query description: Indicates whether the documents should be returned as base64-encoded strings. required: false schema: type: boolean default: false - name: containerId in: query description: Optional shipper container ID to filter documents for a specific container within the delivery. required: false schema: type: string responses: '200': description: Successfully retrieved the documents associated with the specified delivery. content: application/json: schema: type: object properties: deliveryId: type: string description: The unique identifier for the delivery. example: 0a5f3e5f-63bd-4472-9eee-a99f17cfeb44 orderId: type: string description: The unique shipper's identifier for the order associated with this delivery. example: 999-637-9299 documents: type: array description: A list of documents associated with the delivery, providing important information like Bill of Lading (BOL), invoice, and any required compliance documents. items: type: object properties: fileType: type: string description: The type of document related to the delivery. Possible values include BOL, Invoice, Weight Inspection, Hazmat Document, and Delivery Receipt. enum: - BOL - Invoice - Weight Inspection - Hazmat Document - Delivery Receipt example: BOL subFileType: type: string nullable: true description: A specific subtype of the document, if applicable. This helps the shipper understand the exact document they have received, such as OP950 for hazardous materials. example: null fileLink: type: string description: A URL link to access or download the document. example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png fileBase64: type: string nullable: true description: The base64 encoded document, if applicable. Controlled by the withBase64 query parameter. example: iVBORw0KGg containers: type: array description: A list of containers or packages within the delivery. Each container includes information on shipping labels, container identifiers, and any hazardous material labeling. items: type: object properties: containerId: type: string description: The unique identifier for the container within the delivery. example: 93ca6ee6-d4ef-4879-8b5e-bb85a7ae2da7 containerTrackingId: type: string nullable: true description: The tracking ID for the container, if available. example: '794810563883' shipperContainerId: type: string nullable: true description: The identifier for the container as assigned by the shipper. example: '2222' shippingLabelLink: type: string nullable: true description: The shipping label for the container, if applicable. example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png hazmatLabelType: type: string nullable: true description: The type or classification of the hazardous material label, if applicable. example: OP900 hazmatLabelLink: type: string nullable: true description: A URL link to the hazardous material label image or documentation, if applicable. example: https://onerail-delivery-api-staging.azurewebsites.net/assets/2fa9bb66-c0a2-462f-9afa-5c045a6edb53_Image1733165563.png hazmatLabelBase64: type: string nullable: true description: The base64 encoded hazardous material label, if applicable. Controlled by the withBase64 query parameter. example: iVBORw0KGg... shippingLabelBase64: type: string nullable: true description: The base64 encoded shipping label, if applicable. Controlled by the withBase64 query parameter. example: iVBORw0KGg... '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /close-manifest: x-exegesis-controller: Manifest post: tags: - Manifest summary: Close a carrier manifest description: Close a carrier manifest. Required fields depend on `carrierCode`. operationId: closeManifest security: - ApiKeyAndAppId: [] - ApiKey: [] - OAuth: [] - AppId: [] requestBody: description: Manifest close request required: true content: application/json: schema: $ref: '#/components/schemas/CloseManifestRequest' responses: '200': description: Success. The manifest has been closed. '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' components: securitySchemes: ApiKey: type: apiKey in: header name: X-ONERAIL-API-KEY AppId: type: apiKey in: header name: X-ONERAIL-APP-ID ApiKeyAndAppId: type: apiKey in: header name: X-ONERAIL-API-KEY-AND-APP-ID schemas: Error: required: - message properties: code: type: integer format: int32 message: type: string errors: type: object errorDetails: type: array items: type: object properties: detail: type: string description: A human-readable explanation specific to this occurrence of the problem pointer: type: string description: A JSON Pointer [RFC6901] to the associated entity in the request document required: - detail CloseManifestRequest: type: object required: - carrierCode - closedAt - carrierServiceLevel properties: carrierCode: type: string enum: - FDEX - USPS - AMZN description: Carrier code closedAt: type: string format: date-time description: Close date example: '2026-06-25T14:30:00Z' carrierServiceLevel: type: string description: Carrier service level manifestId: type: string description: Manifest ID trackingNumber: type: string description: Tracking number accountNumber: type: string description: Account number locationId: type: string description: Location ID CapabilityTags: type: array items: oneOf: - type: string - type: object properties: id: type: string format: uuid nullable: true name: type: string nullable: true quantity: type: number UserCredentials: required: - username - password properties: username: type: string password: type: string password_is_token: type: boolean Delivery: required: - deliveryType - orderData - pickUpData - dropOffData properties: notes: type: string maxLength: 255 description: Delivery Notes contractId: type: string description: The OneRail contract to deliver this package under requestLabel: type: boolean default: false description: Request a shipping label be added to the response. Default false labelType: type: string enum: - png - pdf - zpl default: png description: Format of shipping label generated by Onerail. Represented as a base64-encoded string in the response carrierLabelType: type: string description: Format of shipping label generated by a carrier. nullable: true carrierCode: type: string description: 'Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. ' example: FDEX nullable: true carrierServiceName: type: string description: 'Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. ' example: FEDEX_EXPRESS_SAVER nullable: true deliveryType: $ref: '#/components/schemas/DeliveryType' deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' customerData: $ref: '#/components/schemas/CustomerData' orderData: $ref: '#/components/schemas/OrderData' pickUpData: $ref: '#/components/schemas/LocationInfo' dropOffData: $ref: '#/components/schemas/LocationInfo' shipperExtraData: type: object description: JSON blob that the customer can use to store additional info they may need. state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string nullable: true shipmentId: type: string nullable: true contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null dispatchAt: type: string description: 'datetime in ISO format, typically UTC (for example, ending in "Z") or another offset-aware date-time. Availability checks treat dispatchAt and any provided delivery window timestamps as absolute instants and convert them to the relevant local timezone before comparing against service-level times. When dispatchAt is omitted, availability checks use the current time as the dispatch time. If pickup windows are provided, service-level cutoff and end-of-day evaluation use the pickup window open time instead of dispatchAt. Service-level cutoff values are evaluated as minutes from midnight in the pickup location''s local timezone; service-level end-of-day values are evaluated as minutes from midnight in the dropoff location''s local timezone. ' format: date-time nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC deliveryFiles: description: Delivery Files type: array items: type: object required: - fileType - fileLink properties: fileType: type: string example: Invoice enum: - BOL - Weight Inspection - Pallet Label - Package Label - Delivery Receipt - Invoice - Hazmat Document description: allowed file types BOL, Weight Inspection, Pallet Label, Package Label, Delivery Receipt, Invoice and Hazmat Document fileLink: type: string example: https://oneraildev.blob.core.windows.net/dev/20221023-123613103-45672570-fb26-46a0-9cc0-21fc8eeed42f.pdf nullable: true emergencyContact: $ref: '#/components/schemas/EmergencyContact' deliveryInternationalDetails: type: object description: 'Export compliance information used for international shipments. Only one of the fields should be provided depending on the regulatory requirements: - If EEI filing in AES is required → provide `aesItn` - If EEI filing is not required → provide `ftrExemption` ' properties: ftrExemptionCode: type: string nullable: true description: 'FTR Exemption Statement indicating why EEI filing in AES is not required. Example: ''NO EEI 30.37(a)'' ' example: NO EEI 30.37(a) aesItn: type: string nullable: true description: 'Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: ''AES X20250427123456'' ' example: AES X20250427123456 itemCategory: type: string nullable: true description: Represents a classification/type of items. enum: - merchandise - returned_goods - documents - gift - sample - other example: merchandise itemDescription: type: string nullable: true description: A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). example: The items have air tight seals shippingRestriction: type: string nullable: true description: Represents any type of limitation (e.g., hazardous, embargoed). enum: - none - other - quarantine - sanitary_phytosanitary_inspection example: none restrictionNotes: type: string nullable: true description: Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). isCustomsCertified: type: boolean description: Boolean flag indicating certification status. nullable: true certifyingParty: type: string description: Name of the person or entity signing the customs form. nullable: true nonDeliveryBehavior: type: string nullable: true description: "Specifies the action to take if the shipment cannot be delivered. Accepted values are:\n - `return`:\ \ The package will be returned to the sender.\n - `abandon`: The package will not be returned and may be discarded\ \ or handled at the carrier's discretion.\n" enum: - return - abandon shopRates: type: boolean default: false description: Wait for delivery calculations to complete before returning the response. nullable: true DeliveryAvailabilityRequest: type: object required: - pickUpData - dropOffData properties: serviceLevels: type: array description: Optional list of service level names to check. items: type: string notes: type: string maxLength: 255 description: Delivery Notes contractId: type: string description: The OneRail contract to deliver this package under requestLabel: type: boolean default: false description: Request a shipping label be added to the response. Default false labelType: type: string enum: - png - pdf - zpl default: png description: Format of shipping label generated by Onerail. Represented as a base64-encoded string in the response carrierLabelType: type: string description: Format of shipping label generated by a carrier. nullable: true carrierCode: type: string description: 'Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. ' example: FDEX nullable: true carrierServiceName: type: string description: 'Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. ' example: FEDEX_EXPRESS_SAVER nullable: true deliveryType: $ref: '#/components/schemas/DeliveryType' deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' customerData: $ref: '#/components/schemas/CustomerData' orderData: $ref: '#/components/schemas/OrderData' pickUpData: $ref: '#/components/schemas/AvailabilityLocationInfo' dropOffData: $ref: '#/components/schemas/AvailabilityLocationInfo' shipperExtraData: type: object description: JSON blob that the customer can use to store additional info they may need. state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string nullable: true shipmentId: type: string nullable: true contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null dispatchAt: type: string description: datetime in ISO format format: date-time nullable: true nmfc: type: string description: The national motor freight code for this delivery. This is a convenience function to set the same NMFC code for all the containers or order items in this delivery. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this delivery. This is a convenience function to set the same freight class for all the containers or order items in this delivery. nullable: true numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC deliveryFiles: $ref: '#/components/schemas/Delivery/properties/deliveryFiles' emergencyContact: $ref: '#/components/schemas/EmergencyContact' deliveryInternationalDetails: type: object description: 'Export compliance information used for international shipments. Only one of the fields should be provided depending on the regulatory requirements: - If EEI filing in AES is required → provide `aesItn` - If EEI filing is not required → provide `ftrExemption` ' properties: ftrExemptionCode: type: string nullable: true description: 'FTR Exemption Statement indicating why EEI filing in AES is not required. Example: ''NO EEI 30.37(a)'' ' example: NO EEI 30.37(a) aesItn: type: string nullable: true description: 'Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: ''AES X20250427123456'' ' example: AES X20250427123456 itemCategory: type: string nullable: true description: Represents a classification/type of items. enum: - merchandise - returned_goods - documents - gift - sample - other example: merchandise itemDescription: type: string nullable: true description: A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). example: The items have air tight seals shippingRestriction: type: string nullable: true description: Represents any type of limitation (e.g., hazardous, embargoed). enum: - none - other - quarantine - sanitary_phytosanitary_inspection example: none restrictionNotes: type: string nullable: true description: Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). isCustomsCertified: type: boolean description: Boolean flag indicating certification status. nullable: true certifyingParty: type: string description: Name of the person or entity signing the customs form. nullable: true nonDeliveryBehavior: type: string nullable: true description: "Specifies the action to take if the shipment cannot be delivered. Accepted values are:\n - `return`:\ \ The package will be returned to the sender.\n - `abandon`: The package will not be returned and may be discarded\ \ or handled at the carrier's discretion.\n" enum: - return - abandon AvailabilityLocationInfo: type: object description: 'Location data for availability check. Provide any combination of address fields and/or a geopoint. ' properties: name: type: string maxLength: 100 nullable: true description: The name of the location storeNumber: type: string maxLength: 32 description: Store number or store identifier address1: type: string maxLength: 256 address2: type: string maxLength: 256 city: type: string maxLength: 64 state: type: string maxLength: 64 country: type: string maxLength: 32 default: US zip: type: string maxLength: 32 description: Zip Code or Postal Code instructions: type: string maxLength: 256 description: Instructions for a pickup or delivery code: type: string maxLength: 64 description: Gate code or other code required to access location contactName: type: string maxLength: 128 description: Person to contact at the location for pickup or dropoff contactPhone: type: string maxLength: 32 description: Phone number for the contact at the location contactEmailAddress: type: string maxLength: 128 description: Email address for the contact at the location dueDate: type: string description: Indicates when this location should be fulfilled by. Time format iso-8601 windows: type: object properties: opensOn: type: string description: Open window datetime in format iso-8601 closesOn: type: string description: Close window datetime in format iso-8601 appointment: type: object properties: durationMins: type: number description: The duration time in minutes (integer) description: type: string description: The description of the appointment maxLength: 255 physicalLocation: type: object properties: altLocation: type: object properties: latitude: type: number longitude: type: number altAddress: $ref: '#/components/schemas/LocationInfo/properties/physicalLocation/properties/altAddress' capabilityTags: $ref: '#/components/schemas/CapabilityTags' DeliveryAvailabilityResponse: type: object properties: availability: type: boolean nullable: true description: 'High-level availability result used for minimal requests. When returned, this indicates whether pickup/dropoff is serviceable without service-level detail. ' serviceLevels: type: array description: 'Detailed per-service-level availability. This may be omitted for minimal requests that only return the top-level availability field, but will be returned when service levels are explicitly requested. ' items: type: object required: - name - available properties: name: type: string description: Service level name (e.g. "TMSDD", "2 HR", "NEXT_DAY") available: type: boolean description: 'Whether at least one LP can fulfill this service level for the given locations and requested pickup time. Service levels are unavailable when the pickup window opens at or after the service level''s cutoff or end-of-day time. If no pickup window is provided, dispatchAt is used; if dispatchAt is also omitted, the current time is used. Incoming dispatchAt and delivery window timestamps may be UTC or offset-aware ISO date-times and are converted to local time before comparison. Cutoff times are evaluated in the pickup location''s local timezone; end-of-day times are evaluated in the dropoff location''s local timezone. ' estimatedPrice: type: number nullable: true description: 'Total estimated shipper price for this service level (when computed). When vehicle options are enabled, this reflects the recommended (lowest-cost fitting) vehicle''s price. ' message: type: string nullable: true description: Optional detail explaining why a service level is unavailable availableVehicles: type: array description: 'Matched vehicle options for this service level, returned when vehicle options are enabled. ' items: type: object required: - name properties: name: type: string description: Fleet vehicle name priceInCents: type: number nullable: true description: Estimated shipper price for this vehicle option, in cents isRecommended: type: boolean description: 'True for the lowest-cost vehicle option that fits the order within this service level. At most one option per service level is flagged. ' dataCompleteness: type: string enum: - MINIMAL - COMPLETE description: 'Indicates how much data was provided and what level of accuracy the availability results represent. MINIMAL = location data only, COMPLETE = full delivery body (rates possible). ' DeliveryOptions: type: string enum: - REQUIRE_SIGNATURE - REQUIRE_OVER_21 - HIPAA - REQUEST_PARCEL_PICKUP - REQUEST_PROOF_OF_PICKUP LocationInfo: required: - address1 - city - state - zip properties: name: type: string maxLength: 100 nullable: true description: The name of the location storeNumber: type: string maxLength: 32 description: Store number or store identifier address1: type: string maxLength: 256 address2: type: string maxLength: 256 city: type: string maxLength: 64 state: type: string maxLength: 64 country: type: string maxLength: 32 default: US zip: type: string maxLength: 32 description: Zip Code or Postal Code instructions: type: string maxLength: 256 description: Instructions for a pickup or delivery code: type: string maxLength: 64 description: Gate code or other code required to access location contactName: type: string maxLength: 128 description: Person to contact at the location for pickup or dropoff contactPhone: type: string maxLength: 32 description: Phone number for the contact at the location contactEmailAddress: type: string maxLength: 128 description: Email address for the contact at the location dueDate: type: string description: Indicates when this location should be fulfilled by. Time format iso-8601 windows: type: object properties: opensOn: type: string description: Open window datetime in format iso-8601 closesOn: type: string description: Close window datetime in format iso-8601 appointment: type: object properties: durationMins: type: number description: The duration time in minutes (integer) description: type: string description: The description of the appointment maxLength: 255 physicalLocation: type: object properties: altLocation: type: object properties: latitude: type: number longitude: type: number altAddress: type: object properties: label: type: string state: type: string county: nullable: true type: string street: nullable: true type: string street2: nullable: true type: string address1: nullable: true type: string address2: nullable: true type: string district: nullable: true type: string stateCode: type: string postalCode: type: string city: type: string countryCode: type: string countryName: type: string houseNumber: nullable: true type: string additionalData: type: array items: type: object properties: key: type: string value: type: string capabilityTags: $ref: '#/components/schemas/CapabilityTags' OrderData: required: - orderId properties: orderId: type: string description: The ID of the order from a partner's system maxLength: 128 pattern: \S+ netAmount: type: integer description: Order amount (in cents) barCode: type: string description: Bar/QR code for this order maxLength: 256 items: type: array items: $ref: '#/components/schemas/OrderItem' containers: $ref: '#/components/schemas/Containers' status: type: string lpName: type: string nullable: true nmfc: type: string description: The national motor freight code for this order item. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this order item. nullable: true originLocation: $ref: '#/components/schemas/OriginLocation' HazardousMaterialContainerDetails: type: object properties: signatoryContactField: type: string description: Person responsible for hazmat shipment compliance nullable: true emergencyContactNumber: type: string description: Phone number of emergency contact for hazmat shipment nullable: true signatoryContactTitle: type: string description: Professional title of person responsible for the hazmat shipment compliance nullable: true signatoryContactPlace: type: string description: Organization (company) name or code nullable: true offeror: type: string description: Organization (company) name or code nullable: true dotLabeling: type: string description: Type of label to be placed on the container nullable: true authorization: type: string description: Part of DOT Labeling nullable: true fedExPackagingType: type: string description: Type of packaging type to be applied for fedex nullable: true HazardousMaterialOrderItemDetails: type: object properties: identificationNumber: type: string description: Number to identify hazard as designated by shipper (example UN or NP numbers) nullable: true properShippingName: description: The proper shipping name identified by the Shipping Table as desingnated by the shipper type: string nullable: true packagingGroup: type: string nullable: true description: designation for the group of packages provided by the shipper packagingType: type: string nullable: true description: The type of package holding the hazardous material as designated by the shipper hazardClass: type: string nullable: true description: Value from the hazard classification system hazardSubClass: type: string nullable: true description: Value from the hazard classification system for the sub class technicalName: type: string nullable: true description: Technical description given by the shipper for the hazardous item dotLabeling: type: string nullable: true description: Type of label to be placed on the items EmergencyContact: type: object properties: contactName: type: string nullable: true description: Emergency contact name contactTitle: type: string nullable: true description: Emergency contact title phoneNumber: type: string nullable: true description: Emergency contact phone number email: type: string nullable: true description: Emergency contact email OrderItem: required: - description - length - width - height - weight - quantity properties: id: type: string description: OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. description: type: string maxLength: 256 description: Description of this item length: type: number description: Length in inches of this item width: type: number description: Width in inches of this item height: type: number description: Height in inches of this item weight: type: number description: Weight in pounds (As a floating point number. Fractional pounds are ok) quantity: type: integer description: The number of this same item included with the order identifier: type: string maxLength: 64 description: Product SKU, ID, or UPC complexities: type: string maxLength: 128 priceCent: type: integer description: Order amount (in cents) nmfc: type: string description: The national motor freight code for this order item. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this order item. nullable: true hazardousMaterialDetails: nullable: true type: object $ref: '#/components/schemas/HazardousMaterialOrderItemDetails' doNotRotate: type: boolean default: false DeliveryType: type: string enum: - BUSINESS - RESIDENTIAL CustomerData: required: - firstName - lastName - phone properties: firstName: type: string maxLength: 64 lastName: type: string maxLength: 64 phone: type: string maxLength: 32 emailAddress: type: string maxLength: 128 v2OrderRequest: required: - deliveries - orderAction - orderData properties: orderAction: type: string enum: - CREATE - ADD - RETURN default: CREATE shopRates: type: boolean default: false state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' orderData: $ref: '#/components/schemas/OrderInfo' deliveries: type: array items: $ref: '#/components/schemas/OrderDelivery' numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC capabilityTags: type: array items: oneOf: - type: string - type: object properties: id: type: string format: uuid nullable: true name: type: string nullable: true quantity: type: number v2OrderResponse: properties: responseCode: type: string description: Detail of API request message: type: string description: Information on request status id: type: string description: The order id rates: type: array description: Rates for the created deliveries items: $ref: '#/components/schemas/RatesResponse' deliveries: type: array description: The deliveries created items: $ref: '#/components/schemas/DeliveryData' OrderCreate: properties: state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' orderData: $ref: '#/components/schemas/OrderInfo' deliveries: type: array items: $ref: '#/components/schemas/OrderDelivery' numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC capabilityTags: type: array items: oneOf: - type: string - type: object properties: id: type: string format: uuid nullable: true name: type: string nullable: true quantity: type: number shopRates: type: boolean default: false description: Wait for delivery calculations to complete before returning the response. nullable: true OrderUpdate: required: - orderId properties: state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string status: type: string deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' orderId: type: string deliveries: type: array items: $ref: '#/components/schemas/OrderDelivery' numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC shopRates: type: boolean default: false description: Wait for delivery calculations to complete before returning the response. nullable: true ReturnDeliveryCreate: required: - orderId properties: state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH serviceLevel: type: string status: type: string deliveryOptions: type: array items: $ref: '#/components/schemas/DeliveryOptions' orderId: type: string deliveries: type: array items: $ref: '#/components/schemas/ReturnDelivery' shopRates: type: boolean default: false description: Wait for delivery calculations to complete before returning the response. nullable: true OrderPartialUpdate: properties: notes: description: Delivery Notes type: string maxLength: 255 contractId: description: The OneRail contract to deliver this package under type: string format: uuid requestLabel: description: Request a shipping label be added to the response. type: boolean default: false requestIndividualLabels: description: Request a shipping label be added to the response, with subcontainer labels broken out into separate items. type: boolean default: false labelType: description: Format of shipping label if requested. Represented as a base64-encoded string in the response if requested. type: string enum: - png - pdf - zpl default: png carrierLabelType: type: string description: Format of shipping label generated by a carrier. nullable: true carrierCode: type: string description: 'Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. ' example: FDEX nullable: true carrierServiceName: type: string description: 'Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. ' example: FEDEX_EXPRESS_SAVER nullable: true deliveryType: description: Type of delivery $ref: '#/components/schemas/DeliveryType' deliveryOptions: description: Optional delivery requirements type: array items: $ref: '#/components/schemas/DeliveryOptions' customerData: description: Pickup contact $ref: '#/components/schemas/CustomerData' orderData: $ref: '#/components/schemas/OrderData' pickUpData: $ref: '#/components/schemas/LocationInfo' dropOffData: $ref: '#/components/schemas/LocationInfo' emergencyContact: $ref: '#/components/schemas/EmergencyContact' shipperExtraData: description: Any additional shipping data in JSON format type: object state: description: State of delivery type: string nullable: true enum: - DRAFT - READY_TO_DISPATCH serviceLevel: type: string nullable: true shipmentId: type: string nullable: true lpName: type: string nullable: true contactPreference: type: string nullable: true enum: - EMAIL - SMS - BOTH nmfc: type: string description: The national motor freight code for this order. This is a convenience function to set the same NMFC code for all the containers or order items of all the deliveries in this order. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this order. This is a convenience function to set the same freight class for all the containers or order items of all the deliveries in this order. nullable: true numericSystem: type: string default: IMPERIAL enum: - IMPERIAL - METRIC deliveryFiles: $ref: '#/components/schemas/Delivery/properties/deliveryFiles' deliveryInternationalDetails: type: object nullable: true description: 'Export compliance information used for international shipments. Only one of the fields should be provided depending on the regulatory requirements: - If EEI filing in AES is required → provide `aesItn` - If EEI filing is not required → provide `ftrExemption` ' properties: ftrExemptionCode: type: string nullable: true description: 'FTR Exemption Statement indicating why EEI filing in AES is not required. Example: ''NO EEI 30.37(a)'' ' example: NO EEI 30.37(a) aesItn: type: string nullable: true description: 'Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: ''AES X20250427123456'' ' example: AES X20250427123456 itemCategory: type: string nullable: true description: Represents a classification/type of items. enum: - merchandise - returned_goods - documents - gift - sample - other example: merchandise itemDescription: type: string nullable: true description: A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). example: The items have air tight seals shippingRestriction: type: string nullable: true description: Represents any type of limitation (e.g., hazardous, embargoed). enum: - none - other - quarantine - sanitary_phytosanitary_inspection example: none restrictionNotes: type: string nullable: true description: Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). isCustomsCertified: type: boolean description: Boolean flag indicating certification status. nullable: true certifyingParty: type: string description: Name of the person or entity signing the customs form. nullable: true nonDeliveryBehavior: type: string nullable: true description: "Specifies the action to take if the shipment cannot be delivered. Accepted values are:\n - `return`:\ \ The package will be returned to the sender.\n - `abandon`: The package will not be returned and may be discarded\ \ or handled at the carrier's discretion.\n" enum: - return - abandon OrderInfo: properties: orderId: type: string description: The ID of the order from a partner's system pattern: \S+ maxLength: 128 contractId: type: string description: The OneRail contract to deliver this package under netAmount: type: integer description: Order amount (in cents) barCode: type: string description: Bar/QR code for this order maxLength: 256 status: type: string nmfc: type: string description: The national motor freight code for this order item. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this order item. nullable: true originLocation: $ref: '#/components/schemas/OriginLocation' OriginLocation: required: - address1 - city - state - zip properties: name: type: string maxLength: 100 nullable: true description: The name of the location storeNumber: type: string maxLength: 32 description: Store number or store identifier address1: type: string maxLength: 256 address2: type: string maxLength: 256 city: type: string maxLength: 64 state: type: string maxLength: 64 country: type: string maxLength: 32 default: US zip: type: string maxLength: 32 description: Zip Code or Postal Code instructions: type: string maxLength: 256 description: Instructions for a pickup or delivery code: type: string maxLength: 64 description: Gate code or other code required to access location contactName: type: string maxLength: 128 description: Person to contact at the location for pickup or dropoff contactPhone: type: string maxLength: 32 description: Phone number for the contact at the location contactEmailAddress: type: string maxLength: 128 description: Email address for the contact at the location OrderDelivery: required: - deliveryType - pickUpData - dropOffData properties: labelType: type: string description: The type of label to print on the delivery requestLabel: type: boolean default: false description: Indicates if a label should be requested for this delivery carrierLabelType: type: string description: Format of shipping label generated by a carrier. nullable: true carrierCode: type: string description: 'Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. ' example: FDEX nullable: true carrierServiceName: type: string description: 'Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. ' example: FEDEX_EXPRESS_SAVER nullable: true shipmentId: description: Shipment ID type: string nullable: true notes: type: string maxLength: 255 description: Delivery Notes contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null deliveryType: $ref: '#/components/schemas/DeliveryType' pickUpData: $ref: '#/components/schemas/LocationInfo' dropOffData: $ref: '#/components/schemas/LocationInfo' items: type: array items: $ref: '#/components/schemas/OrderItem' containers: $ref: '#/components/schemas/Containers' shipperExtraData: type: object dispatchAt: type: string description: datetime in ISO format format: date-time nullable: true nmfc: type: string description: The national motor freight code for this order. This is a convenience function to set the same NMFC code for all the containers or order items of all the deliveries in this order. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this order. This is a convenience function to set the same freight class for all the containers or order items of all the deliveries in this order. nullable: true deliveryFiles: $ref: '#/components/schemas/Delivery/properties/deliveryFiles' emergencyContact: $ref: '#/components/schemas/EmergencyContact' deliveryInternationalDetails: type: object description: 'Export compliance information used for international shipments. Only one of the fields should be provided depending on the regulatory requirements: - If EEI filing in AES is required → provide `aesItn` - If EEI filing is not required → provide `ftrExemption` ' properties: ftrExemptionCode: type: string nullable: true description: 'FTR Exemption Statement indicating why EEI filing in AES is not required. Example: ''NO EEI 30.37(a)'' ' example: NO EEI 30.37(a) aesItn: type: string nullable: true description: 'Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: ''AES X20250427123456'' ' example: AES X20250427123456 itemCategory: type: string nullable: true description: Represents a classification/type of items. enum: - merchandise - returned_goods - documents - gift - sample - other example: merchandise itemDescription: type: string nullable: true description: A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). example: The items have air tight seals shippingRestriction: type: string nullable: true description: Represents any type of limitation (e.g., hazardous, embargoed). enum: - none - other - quarantine - sanitary_phytosanitary_inspection example: none restrictionNotes: type: string nullable: true description: Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). isCustomsCertified: type: boolean description: Boolean flag indicating certification status. nullable: true certifyingParty: type: string description: Name of the person or entity signing the customs form. nullable: true nonDeliveryBehavior: type: string nullable: true description: "Specifies the action to take if the shipment cannot be delivered. Accepted values are:\n - `return`:\ \ The package will be returned to the sender.\n - `abandon`: The package will not be returned and may be discarded\ \ or handled at the carrier's discretion.\n" enum: - return - abandon parentId: type: string description: The return delivery's parent deliveryId, required for return deliveries ReturnDelivery: allOf: - $ref: '#/components/schemas/OrderDelivery' - type: object required: - parentId properties: parentId: type: string description: The return delivery's parent deliveryId DeliveryCreated: properties: delivery_id: type: string description: The delivery id pickUpData: type: object properties: address1: type: string address2: type: string city: type: string state: type: string zip: type: string description: Zip Code or Postal Code country: type: string default: US dropOffData: type: object properties: address1: type: string address2: type: string city: type: string state: type: string zip: type: string description: Zip Code or Postal Code country: type: string default: US responseCode: type: string description: Failure code of API request nullable: true message: type: string description: Failure status text of API request nullable: true isNewRecord: type: boolean description: Delivery creation status data: type: object $ref: '#/components/schemas/DeliveryData' shipmentId: type: string description: The delivery shipmentId contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null label: type: object nullable: true required: - trackingId - deliveryId - labelType - label - containers properties: trackingId: description: Master Tracking ID for whole delivery type: string deliveryId: description: Delivery/Shipping ID type: string labelType: description: label type, zpl, pdf or png type: string enum: - png - pdf - zpl default: png label: description: base64 encoded shipping label for the whole delivery type: string nullable: true statusCode: type: integer format: int32 enum: - 0 - 1 default: 0 statusDescription: description: Status type: string enum: - failure - success default: failure scac: description: scac type: string serviceCode: description: Carrier Service code type: string containers: type: array items: type: object properties: label: type: string description: base64 encoded shipping label containing a label for each container in the delivery individualLabels: type: array items: type: object properties: label: type: string subContainer: type: number containerType: description: Container type type: string containerTrackingId: description: Container-specific Tracking ID type: string containerId: description: ContainerId ID type: string shipperContainerId: description: shipper container Id type: string subContainerQuantity: type: number nullable: true uniqueSubLabels: type: boolean nullable: true deliveryFiles: type: array description: List of deliver files attached to a delivery items: type: object properties: id: type: string example: a990503f-4a10-422f-890f-b1986b1ca892 deliveryId: type: string example: 04d24d16-8bae-4e52-a8dd-0295085798a7 fileTypeId: type: string example: 82d5d924-3cfc-11ee-8b99-5654a12cf754 fileLink: type: string example: https://oneraildev.blob.core.windows.net/dev/20221023-123613103-45672570-fb26-46a0-9cc0-21fc8eeed42f-0.pdf createdAt: type: string example: '2023-08-24T08:32:15.000Z' updatedAt: type: string example: '2023-08-24T08:32:15.000Z' fileType: type: object properties: id: type: string example: 82d5d924-3cfc-11ee-8b99-5654a12cf754 fileType: type: string example: Invoice contractedShipperCostCent: type: integer description: Shipper cost in cents nullable: true DeliveryOrderItemCreated: type: object properties: weightLbs: type: integer description: Weight of the item in pounds. id: type: string format: uuid description: Unique identifier for the item. description: type: string description: Description of the item. identifier: type: string description: Identifier for the item provided by the shipper. priceCent: type: integer description: Price of the item in cents. lengthIn: type: integer description: Length of the item in inches. widthIn: type: integer description: Width of the item in inches. heightIn: type: integer description: Height of the item in inches. sortOrdinal: type: integer description: Ordinal value for sorting items. nmfc: type: string nullable: true description: National Motor Freight Classification (NMFC) code, if applicable. freightClass: type: string nullable: true description: Freight classification for the item, if applicable. isDummy: type: boolean nullable: true description: Indicates whether the item is a dummy entry. hazardousMaterialDetails: type: object $ref: '#/components/schemas/HazardousMaterialOrderItemDetails' doNotRotate: type: boolean default: false DeliveryData: type: object properties: id: type: string description: Delivery id deliveryType: description: Type of delivery $ref: '#/components/schemas/DeliveryType' notes: type: string description: Delivery Notes maxLength: 255 state: type: string enum: - DRAFT - READY_TO_DISPATCH default: READY_TO_DISPATCH dispatchAt: type: string description: datetime in ISO format format: date-time nullable: true deliveryInternationalDetails: type: object properties: ftr: type: string description: 'FTR Exemption Statement indicating why EEI filing in AES is not required. Example: ''NO EEI 30.37(a)'' ' example: NO EEI 30.37(a) aes: type: string description: 'Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: ''AES X20250427123456'' ' example: AES X20250427123456 itemCategory: type: string nullable: true description: Represents a classification/type of items. enum: - merchandise - returned_goods - documents - gift - sample - other example: merchandise itemDescription: type: string nullable: true description: A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). example: The items have air tight seals shippingRestriction: type: string nullable: true description: Represents any type of limitation (e.g., hazardous, embargoed). enum: - none - other - quarantine - sanitary_phytosanitary_inspection example: none restrictionNotes: type: string nullable: true description: Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). isCustomsCertified: type: boolean description: Boolean flag indicating certification status. nullable: true certifyingParty: type: string description: Name of the person or entity signing the customs form. nullable: true to: type: object properties: address: type: object properties: city: type: string label: type: string state: type: string county: type: string street: type: string district: type: string stateCode: type: string postalCode: type: string countryCode: type: string countryName: type: string houseNumber: type: string location: type: object properties: longitude: type: number format: float latitude: type: number format: float id: type: string format: uuid name: type: string accessCode: type: string nullable: true shippingInstructions: type: string nullable: true receivingInstructions: type: string nullable: true contactName: type: string phoneNumber: type: string contactEmailAddress: type: string format: email storeNumber: type: string nullable: true timezone: type: string timezoneOffset: type: integer timezoneAbbreviation: type: string msa: type: string cutOffTimeMins: type: integer nullable: true version: type: integer hasLoadingDock: type: boolean primaryContact: type: string nullable: true from: type: object properties: address: type: object properties: city: type: string label: type: string state: type: string county: type: string street: type: string district: type: string stateCode: type: string postalCode: type: string countryCode: type: string countryName: type: string houseNumber: type: string location: type: object properties: longitude: type: number format: float latitude: type: number format: float id: type: string format: uuid name: type: string accessCode: type: string nullable: true shippingInstructions: type: string nullable: true receivingInstructions: type: string nullable: true contactName: type: string phoneNumber: type: string contactEmailAddress: type: string format: email storeNumber: type: string nullable: true timezone: type: string timezoneOffset: type: integer timezoneAbbreviation: type: string msa: type: string cutOffTimeMins: type: integer nullable: true version: type: integer hasLoadingDock: type: boolean primaryContact: type: string nullable: true emergencyContact: type: object properties: contactName: type: string description: Person responsible for questions or issues pertaining the hazmat delivery phoneNumber: type: string description: Phone number of the emergency contact person email: type: string format: email description: Email address of the emergency contact person contactTitle: type: string format: uuid description: Professional title of the emergency contact orderItems: type: array items: $ref: '#/components/schemas/DeliveryOrderItemCreated' deliveryContainers: type: array items: type: object properties: id: type: string format: uuid lengthIn: type: integer widthIn: type: integer heightIn: type: integer deliveryId: type: string format: uuid orderId: type: string format: uuid totalWeightLbs: type: integer containerTypeId: type: string format: uuid trackingNumber: type: string shipperContainerId: type: string shipperExtraData: type: object labelURL: type: string nullable: true subContainerQuantity: type: integer uniqueSubLabels: type: boolean nmfc: type: string nullable: true freightClass: type: string nullable: true predefinedContainer: type: string nullable: true containerType: type: object properties: id: type: string format: uuid name: type: string hazardousMaterialDetails: type: object nullable: true $ref: '#/components/schemas/HazardousMaterialContainerDetails' orderItems: type: array items: $ref: '#/components/schemas/DeliveryOrderItemCreated' doNotRotate: type: boolean default: false nonDeliveryBehavior: type: string nullable: true contractedShipperCostCent: type: integer description: Shipper cost in cents nullable: true DeliveryList: allOf: - allOf: - type: object description: Pagination required: - total properties: total: type: number - type: object description: Pagination Parameters required: - limit properties: offset: type: number limit: type: number - type: object properties: filters: type: object properties: fromLocations: description: List of distinct from locations for entire result set to use in filtering type: array items: type: object properties: id: type: string name: type: string storeNumber: type: string data: type: array items: type: object description: Deliveries properties: id: type: string format: uuid organizationName: type: string from: description: Pickup location allOf: - type: object properties: id: type: string msa: type: string nullable: true - type: object description: Location required: - name properties: name: type: string nullable: true address: type: object location: type: object description: Geo Point with latitude and longitude required: - latitude - longitude properties: latitude: type: number longitude: type: number storeNumber: type: string nullable: true to: description: Drop off location allOf: - type: object properties: id: type: string msa: type: string nullable: true - type: object description: Location required: - name properties: name: type: string nullable: true address: type: object location: type: object description: Geo Point with latitude and longitude required: - latitude - longitude properties: latitude: type: number longitude: type: number storeNumber: type: string nullable: true state: type: string nullable: true mappedState: type: string nullable: true dispatchAt: type: string format: date-time nullable: true shipper: type: object nullable: true properties: id: type: string nullable: true name: type: string nullable: true shipperContractSla: type: object properties: id: type: string nullable: true serviceLevel: type: object properties: id: type: string nullable: true name: type: string nullable: true endOfDayMinutes: type: number nullable: true requireWindows: type: number nullable: true pickUpSpeed: type: object properties: name: type: string nullable: true value: type: number nullable: true dropOffSpeed: type: object properties: name: type: string nullable: true value: type: number nullable: true lp: type: object nullable: true properties: id: type: string nullable: true name: type: string nullable: true order: type: object properties: id: type: string nullable: true orderId: type: string nullable: true risk: type: number nullable: true deliverySpeedMin: type: integer nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time finalAttempt: type: object properties: id: type: string nullable: true updatedAt: type: string format: date-time nullable: true state: type: string nullable: true lpContractSla: type: object properties: id: type: string nullable: true organization: type: object nullable: true properties: id: type: string nullable: true name: type: string nullable: true shipperContractSla: type: object properties: id: type: string nullable: true pickupSla: type: number nullable: true dropOffSla: type: number nullable: true deliveryStatus: type: object properties: id: type: string nullable: true eta: type: string format: date-time nullable: true deliveryExceptions: type: array items: type: object properties: id: type: string format: uuid reason: type: object properties: id: type: string format: uuid title: type: string deliveryBillableToShipper: type: boolean deliveryPayableToLp: type: boolean shipperSlaWaived: type: boolean lpSlaWaived: type: boolean severity: type: string enum: - LOW - MEDIUM - HIGH resolved: type: boolean default: false notes: type: string nullable: true damageInfo: type: object properties: id: type: string format: uuid quantity: type: string orderItem: $ref: '#/paths/~1delivery~1%7Bid%7D~1details/get/responses/200/content/application~1json/schema/properties/order/properties/orderItems/items' createdAt: type: string format: date-time updatedAt: type: string format: date-time creationReason: type: string nullable: true shipmentId: type: string nullable: true isLeader: type: boolean windows: type: array items: type: object properties: id: type: string format: uuid deliverySegment: type: string enum: - PICK_UP - DROP_OFF opensOn: type: string description: datetime in ISO format closesOn: type: string description: datetime in ISO format customFields: type: array description: Custom fields from shipper data extra unique to each shipper items: type: object nullable: true properties: fieldName: type: string value: type: string contactPreference: type: string enum: - EMAIL - SMS - BOTH - null nullable: true default: null OrderCreated: properties: responseCode: type: string description: Detail of API request message: type: string description: Information on request status id: type: string description: The order id deliveries: type: array description: The deliveries created $ref: '#/components/schemas/DeliveryData' Containers: type: array items: type: object oneOf: - $ref: '#/components/schemas/PredefinedContainer' - $ref: '#/components/schemas/CustomContainer' PredefinedContainerBase: type: object required: - name - totalWeight - items properties: name: type: string trackingInfo: type: object nullable: true properties: type: type: string value: type: string totalWeight: type: number description: Weight of container and all items inside it shipperContainerId: type: string shipperExtraData: type: object description: Any additional shipping data in JSON format items: type: array items: $ref: '#/components/schemas/ContainerOrderItem' hazardousMaterialDetails: type: object nullable: true $ref: '#/components/schemas/HazardousMaterialContainerDetails' subContainerQuantity: type: number nullable: true uniqueSubLabels: type: boolean nullable: true nmfc: type: string description: The national motor freight code for this container. nullable: true example: 82790-11 freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this container. nullable: true PredefinedContainer: allOf: - $ref: '#/components/schemas/PredefinedContainerBase' - type: object type: object properties: containers: nullable: true type: array items: $ref: '#/components/schemas/ChildPredefinedContainer' ChildPredefinedContainer: allOf: - $ref: '#/components/schemas/PredefinedContainerBase' - type: object type: object properties: containers: nullable: true type: array items: $ref: '#/components/schemas/GrandChildPredefinedContainer' GrandChildPredefinedContainer: allOf: - $ref: '#/components/schemas/PredefinedContainerBase' - type: object type: object properties: containers: nullable: true type: array items: type: object CustomContainerBase: type: object required: - containerType - length - width - height - totalWeight properties: trackingInfo: type: object nullable: true properties: type: type: string value: type: string containerType: type: string enum: - BOX - BAG - BALE - BUCKET - BUNDLE - CAN - CARTON - CASE - COIL - CRATE - CYLINDER - DRUM - PAIL - PLT - PIECES - REEL - ROLL - SKID - TOTE - TUBE - MAGAZINE - POUND - PIECE - PACKAGE - TL - FTL - GAYLORD length: type: number description: Length in inches of this item width: type: number description: Width in inches of this item height: type: number description: Height in inches of this item totalWeight: type: number description: Weight of container and all items inside it shipperContainerId: type: string shipperExtraData: type: object description: Any additional shipping data in JSON format items: type: array nullable: true items: $ref: '#/components/schemas/ContainerOrderItem' subContainerQuantity: type: number nullable: true uniqueSubLabels: type: boolean nullable: true nmfc: type: string description: The national motor freight code for this container. nullable: true example: 82790-11 hazardousMaterialDetails: type: object nullable: true $ref: '#/components/schemas/HazardousMaterialContainerDetails' freightClass: type: string enum: - '50' - '55' - '60' - '65' - '70' - '77.5' - '85' - '92.5' - '100' - '110' - '125' - '150' - '175' - '200' - '250' - '300' - '400' - '500' - null description: The freight class for this container. nullable: true doNotRotate: type: boolean default: false CustomContainer: allOf: - $ref: '#/components/schemas/CustomContainerBase' - type: object type: object properties: containers: nullable: true type: array items: $ref: '#/components/schemas/ChildCustomContainer' ChildCustomContainer: allOf: - $ref: '#/components/schemas/CustomContainerBase' - type: object type: object properties: containers: nullable: true type: array items: $ref: '#/components/schemas/GrandChildCustomContainer' GrandChildCustomContainer: allOf: - $ref: '#/components/schemas/CustomContainerBase' - type: object type: object properties: containers: nullable: true type: array items: type: object LabelInfo: properties: trackingId: type: string deliveryId: type: string type: type: string statusCode: type: integer statusDescription: type: string scac: type: string serviceCode: type: string containers: type: array items: type: object properties: label: type: string containerId: type: string containerTrackingId: type: string shipperContainerId: type: string ContainerLabelInfo: properties: trackingId: type: string deliveryId: type: string type: type: string statusCode: type: integer statusDescription: type: string scac: type: string serviceCode: type: string label: type: string containerId: type: string containerTrackingId: type: string shipperContainerId: type: string HistoricalRateInfo: properties: deliveryId: type: string shipperDeliveryId: type: string orderId: type: string shipperOrderId: type: string shipperOrganizationId: type: string lpOrganizationId: type: string lpOrganizationName: type: string serviceLevelRequestedName: type: string serviceLevelRequestedId: type: string lpServiceLevelChosen: type: string lpServiceLevelChosenCostCents: type: number deliveryAttemptId: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time rateData: type: object description: JSON blob for delivery rates. nullable: true ContainerOrderItem: required: - description - length - width - height - weight - quantity properties: id: type: string description: OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. description: type: string maxLength: 256 description: Description of this item length: type: number description: Length in inches of this item width: type: number description: Width in inches of this item height: type: number description: Height in inches of this item weight: type: number description: Weight in pounds (As a floating point number. Fractional pounds are ok) quantity: type: integer description: The number of this same item included with the order identifier: type: string maxLength: 64 description: Product SKU, ID, or UPC complexities: type: string maxLength: 128 priceCent: type: integer description: Order amount (in cents) hsCode: type: string description: Harmonized System (HS) code for classifying goods. nullable: true countryOfManufacture: type: string description: The country code where the item was manufactured example: US nullable: true hazardousMaterialDetails: nullable: true type: object $ref: '#/components/schemas/HazardousMaterialOrderItemDetails' doNotRotate: type: boolean default: false ScanData: type: object required: - evidenceValue properties: evidenceType: type: string enum: - LPN - Other default: Other evidenceValue: type: string OAuthCredentials: type: object required: - client_id - client_secret - grant_type properties: client_id: type: string client_secret: type: string grant_type: type: string OAuthTokenResponse: type: object required: - access_token - token_type - expires_in properties: access_token: type: string token_type: type: string expires_in: description: Access token TTL in seconds type: number RatesResponse: type: object properties: total: type: number description: Total price in cents lpName: type: string description: Name of the LP Selected potentialLps: type: array items: type: object properties: name: type: string rate: type: number breakdown: type: array items: type: object properties: value: type: number type: type: string description: type of charge deliveryId: type: string format: uuid description: id of the delivery that was created nullable: true