Overview
The OneRail Delivery API engine is your complete integration solution for sending orders through the platform, offering a focused and streamlined experience. In addition to accepting orders dynamically from your organization's chosen application, it is also capable of producing webhook requests which can automatically provide alerts for deliveries to connected applications.
An order is what we receive from a shipper, it represents the shipper's request and contains all the details needed to fulfill it. Deliveries are the individual shipments sent to make the order happen. When calling the API, both order and delivery details are provided together in the request body. All API interactions in this guide are built around this model.
Integrating your organization's operation via API allows for immediate processing and updates, without the need for manual intervention/monitoring.
Note: Generally, we want to first test our integration in a manner that will allow us to test various functionalities without impacting production operations. Ensure that any processes that would trigger an order to dispatch or be otherwise processed are disabled during any testing procedures.
Authentication
Client authentication with the OneRail API Engine can be classified by distinct two methods: user-based and org-based. The process of establishing authentication between your app and the OR API will depend on the desired auth method. The following subsections outline the steps to implement each of the available authentication methods:
User-Based Authentication
In this method, individual user credentials configured for your account are presented to the platform by your client application. Upon successful authentication, your client application would then act on the behalf of the user's credentials that were used to authenticate.
To perform authentication with this method, your client app will need to perform a POST request to the "user/authenticate" endpoint. This endpoint requires the desired user's username and their associated password.
Important: To use user-based authentication, the user must already be configured as a user on the OneRail platform before attempting to authenticate. If the user does not yet exist on the platform, contact your implementation manager to have the account created prior to integrating.
For full details regarding this endpoint, refer to the following Swagger reference:
No parameters
{
"username": "string",
"password": "string",
"password_is_token": true
}
| Field | Type | Description |
|---|---|---|
| usernamerequired | string | — |
| passwordrequired | string | — |
| password_is_token | boolean | — |
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
User token created
{
"token": "string"
}
|
|||||||||||||||||||||
| default |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
Org-Based Authentication
Organization-based authentication utilizes a pair of values (App ID and API Key) that are attached to the header of requests intended for the OneRail API Engine. The App ID and API Key are created for each shipper on an individual basis by our product team and then distributed for production use. When using this method, any of your organization's applications connecting to the API will connect with a set of authentication credentials that represents each individual shipper.
To obtain the App ID and API Key for a shipper, you must first contact the OneRail customer success team. They will produce a response obtained from product resources, containing the App ID and API Key values/credentials generated specifically for your shipper's organization. Each shipper defined for your account will need a set of API credentials that identifies orders associated with a particular shipper. Ensure that requests sent to the Delivery API by your application are utilizing the correct credentials when sending a shipper's order.
These credentials can now be used to authenticate any request intended for your organization's OneRail account. To implement these credentials, their values will need to be added to the header of any request intended for the OneRail API Engine. The following code blocks shows the headers and their associated values:
X-ONERAIL-APP-ID: App ID provided by your implementation manager
X-ONERAIL-API-KEY: API Key provided by your implementation managerOrder & Delivery Functions
Following authentication, your application can send functional requests to the OneRail API Engine on behalf of your organization or user (depending on the method of authentication being utilized). The endpoints below follow the order-first model: you create an order from shipper details, and OneRail generates the deliveries from it.
Get Delivery Rates
Prior to sending a request to create a particular delivery, the rate for sending this delivery at the current time can be gathered without having to send/process the delivery in question. The "Get Rates" endpoint will receive rates for all qualified carriers applicable to the delivery.
To get rates for a particular delivery, a GET request is sent to the /delivery/get-rates endpoint that contains important metadata for the delivery. The response from the endpoint will describe the price to send the delivery.
For full details regarding this endpoint, refer to the following Swagger reference:
No parameters
{
"notes": "string",
"contractId": "string",
"requestLabel": true,
"labelType": "png",
"carrierLabelType": "string",
"carrierCode": "string",
"carrierServiceName": "string",
"deliveryType": "BUSINESS",
"deliveryOptions": [
"REQUIRE_SIGNATURE"
],
"customerData": {
"firstName": "string",
"lastName": "string",
"phone": "string",
"emailAddress": "string"
},
"orderData": {
"orderId": "string",
"netAmount": 0,
"barCode": "string",
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"nmfc": "string",
"freightClass": "50",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"containers": [
{
"name": "string",
"trackingInfo": {
"type": "string",
"value": "string"
},
"totalWeight": 0,
"shipperContainerId": "string",
"shipperExtraData": {},
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"hsCode": "string",
"countryOfManufacture": "string",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "50"
}
],
"status": "string",
"lpName": "string",
"nmfc": "string",
"freightClass": "50",
"originLocation": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string"
}
},
"pickUpData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"dropOffData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"shipperExtraData": {},
"state": "DRAFT",
"serviceLevel": "string",
"shipmentId": "string",
"contactPreference": "EMAIL",
"dispatchAt": "2024-01-01T00:00:00Z",
"nmfc": "string",
"freightClass": "50",
"numericSystem": "IMPERIAL",
"deliveryFiles": "string",
"emergencyContact": {
"contactName": "string",
"contactTitle": "string",
"phoneNumber": "string",
"email": "string"
},
"deliveryInternationalDetails": {
"ftrExemptionCode": "string",
"aesItn": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"nonDeliveryBehavior": "return",
"saveDraftDelivery": true
}
| Field | Type | Description |
|---|---|---|
| notes | string | Delivery Notes |
| contractId | string | The OneRail contract to deliver this package under |
| requestLabel | boolean | Request a shipping label be added to the response. Default false |
| labelType | string |
Format of shipping label generated by
Onerail. Represented as a base64-encoded
string in the response
Enum:
png,
pdf,
zpl
|
| carrierLabelType | string | Format of shipping label generated by a carrier. |
| carrierCode | string | Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. |
| carrierServiceName | string | Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. |
| deliveryTyperequired | string |
—
Enum:
BUSINESS,
RESIDENTIAL
|
| deliveryOptions | Array of strings | — |
| customerData | object | — |
| firstNamerequired | string | — |
| lastNamerequired | string | — |
| phonerequired | string | — |
| emailAddress | string | — |
| orderDatarequired | object | — |
| orderIdrequired | string | The ID of the order from a partner's system |
| netAmount | integer | Order amount (in cents) |
| barCode | string | Bar/QR code for this order |
| items | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| containers | Array of objects | — |
| namerequired | string | — |
| trackingInfo | object | — |
| type | string | — |
| value | string | — |
| totalWeightrequired | number | Weight of container and all items inside it |
| shipperContainerId | string | — |
| shipperExtraData | object | Any additional shipping data in JSON format |
| itemsrequired | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| hsCode | string | Harmonized System (HS) code for classifying goods. |
| countryOfManufacture | string | The country code where the item was manufactured |
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| hazardousMaterialDetails | object | — |
| signatoryContactField | string | Person responsible for hazmat shipment compliance |
| emergencyContactNumber | string | Phone number of emergency contact for hazmat shipment |
| signatoryContactTitle | string | Professional title of person responsible for the hazmat shipment compliance |
| signatoryContactPlace | string | Organization (company) name or code |
| offeror | string | Organization (company) name or code |
| dotLabeling | string | Type of label to be placed on the container |
| authorization | string | Part of DOT Labeling |
| fedExPackagingType | string | Type of packaging type to be applied for fedex |
| subContainerQuantity | number | — |
| uniqueSubLabels | boolean | — |
| nmfc | string | The national motor freight code for this container. |
| freightClass | string |
The freight class for this container.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| status | string | — |
| lpName | string | — |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| originLocation | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| pickUpDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| dropOffDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| shipperExtraData | object | JSON blob that the customer can use to store additional info they may need. |
| state | string |
—
Enum:
DRAFT,
READY_TO_DISPATCH
|
| serviceLevel | string | — |
| shipmentId | string | — |
| contactPreference | string |
—
Enum:
EMAIL,
SMS,
BOTH,
None
|
| dispatchAt | string | 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. |
| nmfc | string | 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. |
| freightClass | string |
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.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| numericSystem | string |
—
Enum:
IMPERIAL,
METRIC
|
| deliveryFiles | record.yaml | — |
| emergencyContact | object | — |
| contactName | string | Emergency contact name |
| contactTitle | string | Emergency contact title |
| phoneNumber | string | Emergency contact phone number |
| string | Emergency contact email | |
| deliveryInternationalDetails | object | 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` |
| ftrExemptionCode | string | FTR Exemption Statement indicating why EEI filing in AES is not required. Example: 'NO EEI 30.37(a)' |
| aesItn | string | Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: 'AES X20250427123456' |
| itemCategory | string |
Represents a classification/type of items.
Enum:
merchandise,
returned_goods,
documents,
gift,
sample,
other
|
| itemDescription | string | A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). |
| shippingRestriction | string |
Represents any type of limitation (e.g.,
hazardous, embargoed).
Enum:
none,
other,
quarantine,
sanitary_phytosanitary_inspection
|
| restrictionNotes | string | Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). |
| isCustomsCertified | boolean | Boolean flag indicating certification status. |
| certifyingParty | string | Name of the person or entity signing the customs form. |
| nonDeliveryBehavior | string |
Specifies the action to take if the shipment
cannot be delivered. Accepted values
are:
- `return`: The package will be returned
to the sender.
- `abandon`: The package will not be
returned and may be discarded or handled
at the carrier's discretion.
Enum:
return,
abandon
|
| saveDraftDelivery | boolean | — |
| Code | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
Rates OneRail offers this moment in time
{
"total": 0,
"lpName": "string",
"potentialLps": [
{
"name": "string",
"rate": 0
}
],
"breakdown": [
{
"value": 0,
"type": "string"
}
],
"deliveryId": "00000000-0000-0000-0000-000000000000"
}
|
||||||||||||||||||||||||||||||
| 400 |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
Creating an Order
The /order/create endpoint is the default endpoint for creating orders in your organization's OneRail account. The request body contains both orderData — representing the shipper's overall transaction — and a deliveries array, which defines the individual shipments that will fulfill the order. This endpoint accepts POST requests with a JSON body containing both sets of details.
Upon successful processing, the response will provide the UUIDs for both the order and each of the deliveries created from it. These UUIDs can be used to reference and track the order and its associated deliveries in subsequent requests.
For full details on this endpoint, refer to the following Swagger reference:
No parameters
to get accessorials you should pass it in:
deliveries -> dropOffData -> capabilityTags or deliveries -> pickUpData -> capabilityTags
in request body as one of the these schemas:
1 => array of capabilityTags ids ['043e7f08-10f7-4c13-bfb1-76eaf96e4a24'];
2 => array of capabilityTags names ['Pup'];
3 => array of name and quantity object [{ name : 'Pup', quantity : 20 }];
4 => array of id and quantity object [{ id : '043e7f08-10f7-4c13-bfb1-76eaf96e4a24', quantity : 20 }]
{
"state": "DRAFT",
"serviceLevel": "string",
"deliveryOptions": [
"REQUIRE_SIGNATURE"
],
"orderData": {
"orderId": "string",
"contractId": "string",
"netAmount": 0,
"barCode": "string",
"status": "string",
"nmfc": "string",
"freightClass": "50",
"originLocation": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string"
}
},
"deliveries": [
{
"labelType": "string",
"requestLabel": true,
"carrierLabelType": "string",
"carrierCode": "string",
"carrierServiceName": "string",
"shipmentId": "string",
"notes": "string",
"contactPreference": "EMAIL",
"deliveryType": "BUSINESS",
"pickUpData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"dropOffData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"nmfc": "string",
"freightClass": "50",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"containers": [
{
"name": "string",
"trackingInfo": {
"type": "string",
"value": "string"
},
"totalWeight": 0,
"shipperContainerId": "string",
"shipperExtraData": {},
"items": [
{
"id": "string",
"description": "string",
"length": "string",
"width": "string",
"height": "string",
"weight": "string",
"quantity": "string",
"identifier": "string",
"complexities": "string",
"priceCent": "string",
"hsCode": "string",
"countryOfManufacture": "string",
"hazardousMaterialDetails": "string",
"doNotRotate": "string"
}
],
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "50"
}
],
"shipperExtraData": {},
"dispatchAt": "2024-01-01T00:00:00Z",
"nmfc": "string",
"freightClass": "50",
"deliveryFiles": "string",
"emergencyContact": {
"contactName": "string",
"contactTitle": "string",
"phoneNumber": "string",
"email": "string"
},
"deliveryInternationalDetails": {
"ftrExemptionCode": "string",
"aesItn": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"nonDeliveryBehavior": "return",
"parentId": "string"
}
],
"numericSystem": "IMPERIAL",
"capabilityTags": [
"string"
]
}
| Field | Type | Description |
|---|---|---|
| state | string |
—
Enum:
DRAFT,
READY_TO_DISPATCH
|
| serviceLevel | string | — |
| deliveryOptions | Array of strings | — |
| orderData | object | — |
| orderId | string | The ID of the order from a partner's system |
| contractId | string | The OneRail contract to deliver this package under |
| netAmount | integer | Order amount (in cents) |
| barCode | string | Bar/QR code for this order |
| status | string | — |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| originLocation | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| deliveries | Array of objects | — |
| labelType | string | The type of label to print on the delivery |
| requestLabel | boolean | Indicates if a label should be requested for this delivery |
| carrierLabelType | string | Format of shipping label generated by a carrier. |
| carrierCode | string | Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. |
| carrierServiceName | string | Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. |
| shipmentId | string | Shipment ID |
| notes | string | Delivery Notes |
| contactPreference | string |
—
Enum:
EMAIL,
SMS,
BOTH,
None
|
| deliveryTyperequired | string |
—
Enum:
BUSINESS,
RESIDENTIAL
|
| pickUpDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| dropOffDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| items | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| containers | Array of objects | — |
| namerequired | string | — |
| trackingInfo | object | — |
| type | string | — |
| value | string | — |
| totalWeightrequired | number | Weight of container and all items inside it |
| shipperContainerId | string | — |
| shipperExtraData | object | Any additional shipping data in JSON format |
| itemsrequired | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| hsCode | string | Harmonized System (HS) code for classifying goods. |
| countryOfManufacture | string | The country code where the item was manufactured |
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| hazardousMaterialDetails | object | — |
| signatoryContactField | string | Person responsible for hazmat shipment compliance |
| emergencyContactNumber | string | Phone number of emergency contact for hazmat shipment |
| signatoryContactTitle | string | Professional title of person responsible for the hazmat shipment compliance |
| signatoryContactPlace | string | Organization (company) name or code |
| offeror | string | Organization (company) name or code |
| dotLabeling | string | Type of label to be placed on the container |
| authorization | string | Part of DOT Labeling |
| fedExPackagingType | string | Type of packaging type to be applied for fedex |
| subContainerQuantity | number | — |
| uniqueSubLabels | boolean | — |
| nmfc | string | The national motor freight code for this container. |
| freightClass | string |
The freight class for this container.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| shipperExtraData | object | — |
| dispatchAt | string | datetime in ISO format |
| nmfc | string | 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. |
| freightClass | string |
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.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| deliveryFiles | record.yaml | — |
| emergencyContact | object | — |
| contactName | string | Emergency contact name |
| contactTitle | string | Emergency contact title |
| phoneNumber | string | Emergency contact phone number |
| string | Emergency contact email | |
| deliveryInternationalDetails | object | 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` |
| ftrExemptionCode | string | FTR Exemption Statement indicating why EEI filing in AES is not required. Example: 'NO EEI 30.37(a)' |
| aesItn | string | Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: 'AES X20250427123456' |
| itemCategory | string |
Represents a classification/type of items.
Enum:
merchandise,
returned_goods,
documents,
gift,
sample,
other
|
| itemDescription | string | A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). |
| shippingRestriction | string |
Represents any type of limitation (e.g.,
hazardous, embargoed).
Enum:
none,
other,
quarantine,
sanitary_phytosanitary_inspection
|
| restrictionNotes | string | Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). |
| isCustomsCertified | boolean | Boolean flag indicating certification status. |
| certifyingParty | string | Name of the person or entity signing the customs form. |
| nonDeliveryBehavior | string |
Specifies the action to take if the shipment
cannot be delivered. Accepted values
are:
- `return`: The package will be returned
to the sender.
- `abandon`: The package will not be
returned and may be discarded or handled
at the carrier's discretion.
Enum:
return,
abandon
|
| parentId | string | The return delivery's parent deliveryId, required for return deliveries |
| numericSystem | string |
—
Enum:
IMPERIAL,
METRIC
|
| capabilityTags | Array of objects | — |
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
Success. The order and deliveries have been created
{
"responseCode": "string",
"message": "string",
"id": "string",
"deliveries": {
"id": "string",
"deliveryType": "BUSINESS",
"notes": "string",
"state": "DRAFT",
"dispatchAt": "2024-01-01T00:00:00Z",
"deliveryInternationalDetails": {
"ftr": "string",
"aes": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"to": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"from": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"emergencyContact": {
"contactName": "string",
"phoneNumber": "string",
"email": "user@example.com",
"contactTitle": "00000000-0000-0000-0000-000000000000"
},
"orderItems": [
{
"weightLbs": 0,
"id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"identifier": "string",
"priceCent": 0,
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"sortOrdinal": 0,
"nmfc": "string",
"freightClass": "string",
"isDummy": true,
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"deliveryContainers": [
{
"id": "00000000-0000-0000-0000-000000000000",
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"deliveryId": "00000000-0000-0000-0000-000000000000",
"orderId": "00000000-0000-0000-0000-000000000000",
"totalWeightLbs": 0,
"containerTypeId": "00000000-0000-0000-0000-000000000000",
"trackingNumber": "string",
"shipperContainerId": "string",
"shipperExtraData": {},
"labelURL": "string",
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "string",
"predefinedContainer": "string",
"containerType": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string"
},
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"orderItems": [
{
"weightLbs": 0,
"id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"identifier": "string",
"priceCent": 0,
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"sortOrdinal": 0,
"nmfc": "string",
"freightClass": "string",
"isDummy": true,
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"doNotRotate": true
}
],
"nonDeliveryBehavior": "string"
}
}
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
Order Partial Update
The function of this endpoint provides a partial update to the details of a specifically requested order. This functionality can also add or replace items and containers to an existing order (if that update is needed).
Note: This endpoint cannot be used after an order has been dispatched. Ensure any partial updates are submitted prior to dispatch.
This endpoint will append items and containers to an existing order when requests are made with the PATCH request method. This endpoint will replace items and containers for an existing order when requests are made with the PUT request method.
For further details regarding this endpoint, refer to the following Swagger reference:
| Name | Type | Description |
|---|---|---|
| orderIdrequired | string(path) | order Id |
{
"notes": "string",
"contractId": "00000000-0000-0000-0000-000000000000",
"requestLabel": true,
"requestIndividualLabels": true,
"labelType": "png",
"carrierLabelType": "string",
"carrierCode": "string",
"carrierServiceName": "string",
"deliveryType": "BUSINESS",
"deliveryOptions": [
"REQUIRE_SIGNATURE"
],
"customerData": {
"firstName": "string",
"lastName": "string",
"phone": "string",
"emailAddress": "string"
},
"orderData": {
"orderId": "string",
"netAmount": 0,
"barCode": "string",
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"nmfc": "string",
"freightClass": "50",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"containers": [
{
"name": "string",
"trackingInfo": {
"type": "string",
"value": "string"
},
"totalWeight": 0,
"shipperContainerId": "string",
"shipperExtraData": {},
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"hsCode": "string",
"countryOfManufacture": "string",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "50"
}
],
"status": "string",
"lpName": "string",
"nmfc": "string",
"freightClass": "50",
"originLocation": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string"
}
},
"pickUpData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"dropOffData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"emergencyContact": {
"contactName": "string",
"contactTitle": "string",
"phoneNumber": "string",
"email": "string"
},
"shipperExtraData": {},
"state": "DRAFT",
"serviceLevel": "string",
"shipmentId": "string",
"lpName": "string",
"contactPreference": "EMAIL",
"nmfc": "string",
"freightClass": "50",
"numericSystem": "IMPERIAL",
"deliveryFiles": "string",
"deliveryInternationalDetails": {
"ftrExemptionCode": "string",
"aesItn": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"nonDeliveryBehavior": "return"
}
| Field | Type | Description |
|---|---|---|
| notes | string | Delivery Notes |
| contractId | string | The OneRail contract to deliver this package under |
| requestLabel | boolean | Request a shipping label be added to the response. |
| requestIndividualLabels | boolean | Request a shipping label be added to the response, with subcontainer labels broken out into separate items. |
| labelType | string |
Format of shipping label if requested.
Represented as a base64-encoded string
in the response if requested.
Enum:
png,
pdf,
zpl
|
| carrierLabelType | string | Format of shipping label generated by a carrier. |
| carrierCode | string | Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. |
| carrierServiceName | string | Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. |
| deliveryType | string |
Type of delivery
Enum:
BUSINESS,
RESIDENTIAL
|
| deliveryOptions | Array of strings | Optional delivery requirements |
| customerData | object | Pickup contact |
| firstNamerequired | string | — |
| lastNamerequired | string | — |
| phonerequired | string | — |
| emailAddress | string | — |
| orderData | object | — |
| orderIdrequired | string | The ID of the order from a partner's system |
| netAmount | integer | Order amount (in cents) |
| barCode | string | Bar/QR code for this order |
| items | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| containers | Array of objects | — |
| namerequired | string | — |
| trackingInfo | object | — |
| type | string | — |
| value | string | — |
| totalWeightrequired | number | Weight of container and all items inside it |
| shipperContainerId | string | — |
| shipperExtraData | object | Any additional shipping data in JSON format |
| itemsrequired | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| hsCode | string | Harmonized System (HS) code for classifying goods. |
| countryOfManufacture | string | The country code where the item was manufactured |
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| hazardousMaterialDetails | object | — |
| signatoryContactField | string | Person responsible for hazmat shipment compliance |
| emergencyContactNumber | string | Phone number of emergency contact for hazmat shipment |
| signatoryContactTitle | string | Professional title of person responsible for the hazmat shipment compliance |
| signatoryContactPlace | string | Organization (company) name or code |
| offeror | string | Organization (company) name or code |
| dotLabeling | string | Type of label to be placed on the container |
| authorization | string | Part of DOT Labeling |
| fedExPackagingType | string | Type of packaging type to be applied for fedex |
| subContainerQuantity | number | — |
| uniqueSubLabels | boolean | — |
| nmfc | string | The national motor freight code for this container. |
| freightClass | string |
The freight class for this container.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| status | string | — |
| lpName | string | — |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| originLocation | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| pickUpData | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| dropOffData | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| emergencyContact | object | — |
| contactName | string | Emergency contact name |
| contactTitle | string | Emergency contact title |
| phoneNumber | string | Emergency contact phone number |
| string | Emergency contact email | |
| shipperExtraData | object | Any additional shipping data in JSON format |
| state | string |
State of delivery
Enum:
DRAFT,
READY_TO_DISPATCH
|
| serviceLevel | string | — |
| shipmentId | string | — |
| lpName | string | — |
| contactPreference | string |
—
Enum:
EMAIL,
SMS,
BOTH
|
| nmfc | string | 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. |
| freightClass | string |
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.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| numericSystem | string |
—
Enum:
IMPERIAL,
METRIC
|
| deliveryFiles | record.yaml | — |
| deliveryInternationalDetails | object | 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` |
| ftrExemptionCode | string | FTR Exemption Statement indicating why EEI filing in AES is not required. Example: 'NO EEI 30.37(a)' |
| aesItn | string | Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: 'AES X20250427123456' |
| itemCategory | string |
Represents a classification/type of items.
Enum:
merchandise,
returned_goods,
documents,
gift,
sample,
other
|
| itemDescription | string | A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). |
| shippingRestriction | string |
Represents any type of limitation (e.g.,
hazardous, embargoed).
Enum:
none,
other,
quarantine,
sanitary_phytosanitary_inspection
|
| restrictionNotes | string | Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). |
| isCustomsCertified | boolean | Boolean flag indicating certification status. |
| certifyingParty | string | Name of the person or entity signing the customs form. |
| nonDeliveryBehavior | string |
Specifies the action to take if the shipment
cannot be delivered. Accepted values
are:
- `return`: The package will be returned
to the sender.
- `abandon`: The package will not be
returned and may be discarded or handled
at the carrier's discretion.
Enum:
return,
abandon
|
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
Success. The order deliveries are updated
{
"responseCode": "string",
"message": "string",
"id": "string",
"deliveries": {
"id": "string",
"deliveryType": "BUSINESS",
"notes": "string",
"state": "DRAFT",
"dispatchAt": "2024-01-01T00:00:00Z",
"deliveryInternationalDetails": {
"ftr": "string",
"aes": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"to": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"from": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"emergencyContact": {
"contactName": "string",
"phoneNumber": "string",
"email": "user@example.com",
"contactTitle": "00000000-0000-0000-0000-000000000000"
},
"orderItems": [
{
"weightLbs": 0,
"id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"identifier": "string",
"priceCent": 0,
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"sortOrdinal": 0,
"nmfc": "string",
"freightClass": "string",
"isDummy": true,
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"deliveryContainers": [
{
"id": "00000000-0000-0000-0000-000000000000",
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"deliveryId": "00000000-0000-0000-0000-000000000000",
"orderId": "00000000-0000-0000-0000-000000000000",
"totalWeightLbs": 0,
"containerTypeId": "00000000-0000-0000-0000-000000000000",
"trackingNumber": "string",
"shipperContainerId": "string",
"shipperExtraData": {},
"labelURL": "string",
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "string",
"predefinedContainer": "string",
"containerType": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string"
},
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"orderItems": [
{
"weightLbs": 0,
"id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"identifier": "string",
"priceCent": 0,
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"sortOrdinal": 0,
"nmfc": "string",
"freightClass": "string",
"isDummy": true,
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"doNotRotate": true
}
],
"nonDeliveryBehavior": "string"
}
}
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
Add a Delivery to an Existing Order
The functionality of this endpoint creates a new individual delivery (or multiple deliveries) for an existing order.
For further details regarding this endpoint, refer to the following Swagger reference:
No parameters
{
"state": "DRAFT",
"serviceLevel": "string",
"status": "string",
"deliveryOptions": [
"REQUIRE_SIGNATURE"
],
"orderId": "string",
"deliveries": [
{
"labelType": "string",
"requestLabel": true,
"carrierLabelType": "string",
"carrierCode": "string",
"carrierServiceName": "string",
"shipmentId": "string",
"notes": "string",
"contactPreference": "EMAIL",
"deliveryType": "BUSINESS",
"pickUpData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"dropOffData": {
"name": "string",
"storeNumber": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string",
"instructions": "string",
"code": "string",
"contactName": "string",
"contactPhone": "string",
"contactEmailAddress": "string",
"dueDate": "string",
"windows": {
"opensOn": "string",
"closesOn": "string"
},
"appointment": {
"durationMins": 0,
"description": "string"
},
"physicalLocation": {
"altLocation": {
"latitude": 0,
"longitude": 0
},
"altAddress": "string"
},
"capabilityTags": [
"string"
]
},
"items": [
{
"id": "string",
"description": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"quantity": 0,
"identifier": "string",
"complexities": "string",
"priceCent": 0,
"nmfc": "string",
"freightClass": "50",
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"containers": [
{
"name": "string",
"trackingInfo": {
"type": "string",
"value": "string"
},
"totalWeight": 0,
"shipperContainerId": "string",
"shipperExtraData": {},
"items": [
{
"id": "string",
"description": "string",
"length": "string",
"width": "string",
"height": "string",
"weight": "string",
"quantity": "string",
"identifier": "string",
"complexities": "string",
"priceCent": "string",
"hsCode": "string",
"countryOfManufacture": "string",
"hazardousMaterialDetails": "string",
"doNotRotate": "string"
}
],
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "50"
}
],
"shipperExtraData": {},
"dispatchAt": "2024-01-01T00:00:00Z",
"nmfc": "string",
"freightClass": "50",
"deliveryFiles": "string",
"emergencyContact": {
"contactName": "string",
"contactTitle": "string",
"phoneNumber": "string",
"email": "string"
},
"deliveryInternationalDetails": {
"ftrExemptionCode": "string",
"aesItn": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"nonDeliveryBehavior": "return",
"parentId": "string"
}
],
"numericSystem": "IMPERIAL"
}
| Field | Type | Description |
|---|---|---|
| state | string |
—
Enum:
DRAFT,
READY_TO_DISPATCH
|
| serviceLevel | string | — |
| status | string | — |
| deliveryOptions | Array of strings | — |
| orderIdrequired | string | — |
| deliveries | Array of objects | — |
| labelType | string | The type of label to print on the delivery |
| requestLabel | boolean | Indicates if a label should be requested for this delivery |
| carrierLabelType | string | Format of shipping label generated by a carrier. |
| carrierCode | string | Code identifying the carrier requested to perform the delivery (e.g., FDEX, UPS). Contact OneRail to obtain a list of valid carrier codes. |
| carrierServiceName | string | Name of the specific carrier service level requested for the delivery. Contact OneRail to obtain a list of valid carrier service names. |
| shipmentId | string | Shipment ID |
| notes | string | Delivery Notes |
| contactPreference | string |
—
Enum:
EMAIL,
SMS,
BOTH,
None
|
| deliveryTyperequired | string |
—
Enum:
BUSINESS,
RESIDENTIAL
|
| pickUpDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| dropOffDatarequired | object | — |
| name | string | The name of the location |
| storeNumber | string | Store number or store identifier |
| address1required | string | — |
| address2 | string | — |
| cityrequired | string | — |
| staterequired | string | — |
| country | string | — |
| ziprequired | string | Zip Code or Postal Code |
| instructions | string | Instructions for a pickup or delivery |
| code | string | Gate code or other code required to access location |
| contactName | string | Person to contact at the location for pickup or dropoff |
| contactPhone | string | Phone number for the contact at the location |
| contactEmailAddress | string | Email address for the contact at the location |
| dueDate | string | Indicates when this location should be fulfilled by. Time format iso-8601 |
| windows | object | — |
| opensOn | string | Open window datetime in format iso-8601 |
| closesOn | string | Close window datetime in format iso-8601 |
| appointment | object | — |
| durationMins | number | The duration time in minutes (integer) |
| description | string | The description of the appointment |
| physicalLocation | object | — |
| altLocation | object | — |
| latitude | number | — |
| longitude | number | — |
| altAddress | alt-address.yaml | — |
| capabilityTags | Array of objects | — |
| items | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| nmfc | string | The national motor freight code for this order item. |
| freightClass | string |
The freight class for this order item.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| containers | Array of objects | — |
| namerequired | string | — |
| trackingInfo | object | — |
| type | string | — |
| value | string | — |
| totalWeightrequired | number | Weight of container and all items inside it |
| shipperContainerId | string | — |
| shipperExtraData | object | Any additional shipping data in JSON format |
| itemsrequired | Array of objects | — |
| id | string | OneRail internal item id. if this id is valid OneRail line item it will be ignored during delivery creation. |
| descriptionrequired | string | Description of this item |
| lengthrequired | number | Length in inches of this item |
| widthrequired | number | Width in inches of this item |
| heightrequired | number | Height in inches of this item |
| weightrequired | number | Weight in pounds (As a floating point number. Fractional pounds are ok) |
| quantityrequired | integer | The number of this same item included with the order |
| identifier | string | Product SKU, ID, or UPC |
| complexities | string | — |
| priceCent | integer | Order amount (in cents) |
| hsCode | string | Harmonized System (HS) code for classifying goods. |
| countryOfManufacture | string | The country code where the item was manufactured |
| hazardousMaterialDetails | object | — |
| identificationNumber | string | Number to identify hazard as designated by shipper (example UN or NP numbers) |
| properShippingName | string | The proper shipping name identified by the Shipping Table as desingnated by the shipper |
| packagingGroup | string | designation for the group of packages provided by the shipper |
| packagingType | string | The type of package holding the hazardous material as designated by the shipper |
| hazardClass | string | Value from the hazard classification system |
| hazardSubClass | string | Value from the hazard classification system for the sub class |
| technicalName | string | Technical description given by the shipper for the hazardous item |
| dotLabeling | string | Type of label to be placed on the items |
| doNotRotate | boolean | — |
| hazardousMaterialDetails | object | — |
| signatoryContactField | string | Person responsible for hazmat shipment compliance |
| emergencyContactNumber | string | Phone number of emergency contact for hazmat shipment |
| signatoryContactTitle | string | Professional title of person responsible for the hazmat shipment compliance |
| signatoryContactPlace | string | Organization (company) name or code |
| offeror | string | Organization (company) name or code |
| dotLabeling | string | Type of label to be placed on the container |
| authorization | string | Part of DOT Labeling |
| fedExPackagingType | string | Type of packaging type to be applied for fedex |
| subContainerQuantity | number | — |
| uniqueSubLabels | boolean | — |
| nmfc | string | The national motor freight code for this container. |
| freightClass | string |
The freight class for this container.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| shipperExtraData | object | — |
| dispatchAt | string | datetime in ISO format |
| nmfc | string | 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. |
| freightClass | string |
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.
Enum:
50,
55,
60,
65,
70,
77.5,
85,
92.5,
100,
110,
125,
150,
175,
200,
250,
300,
400,
500,
None
|
| deliveryFiles | record.yaml | — |
| emergencyContact | object | — |
| contactName | string | Emergency contact name |
| contactTitle | string | Emergency contact title |
| phoneNumber | string | Emergency contact phone number |
| string | Emergency contact email | |
| deliveryInternationalDetails | object | 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` |
| ftrExemptionCode | string | FTR Exemption Statement indicating why EEI filing in AES is not required. Example: 'NO EEI 30.37(a)' |
| aesItn | string | Automated Export System Internal Transaction Number (ITN) returned after EEI submission. Format: 'AES X20250427123456' |
| itemCategory | string |
Represents a classification/type of items.
Enum:
merchandise,
returned_goods,
documents,
gift,
sample,
other
|
| itemDescription | string | A free-text explanation of what the contents are (only applicable if "itemCategory" is "other"). |
| shippingRestriction | string |
Represents any type of limitation (e.g.,
hazardous, embargoed).
Enum:
none,
other,
quarantine,
sanitary_phytosanitary_inspection
|
| restrictionNotes | string | Free-text comments clarifying or explaining the restriction (only applicable if "shippingRestriction" is not "none"). |
| isCustomsCertified | boolean | Boolean flag indicating certification status. |
| certifyingParty | string | Name of the person or entity signing the customs form. |
| nonDeliveryBehavior | string |
Specifies the action to take if the shipment
cannot be delivered. Accepted values
are:
- `return`: The package will be returned
to the sender.
- `abandon`: The package will not be
returned and may be discarded or handled
at the carrier's discretion.
Enum:
return,
abandon
|
| parentId | string | The return delivery's parent deliveryId, required for return deliveries |
| numericSystem | string |
—
Enum:
IMPERIAL,
METRIC
|
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
Success. The return deliveries have been created
[
{
"delivery_id": "string",
"pickUpData": {
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string"
},
"dropOffData": {
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string"
},
"responseCode": "string",
"message": "string",
"isNewRecord": true,
"data": {
"id": "string",
"deliveryType": "BUSINESS",
"notes": "string",
"state": "DRAFT",
"dispatchAt": "2024-01-01T00:00:00Z",
"deliveryInternationalDetails": {
"ftr": "string",
"aes": "string",
"itemCategory": "merchandise",
"itemDescription": "string",
"shippingRestriction": "none",
"restrictionNotes": "string",
"isCustomsCertified": true,
"certifyingParty": "string"
},
"to": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"from": {
"address": {
"city": "string",
"label": "string",
"state": "string",
"county": "string",
"street": "string",
"district": "string",
"stateCode": "string",
"postalCode": "string",
"countryCode": "string",
"countryName": "string",
"houseNumber": "string"
},
"location": {
"longitude": 0,
"latitude": 0
},
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"accessCode": "string",
"shippingInstructions": "string",
"receivingInstructions": "string",
"contactName": "string",
"phoneNumber": "string",
"contactEmailAddress": "user@example.com",
"storeNumber": "string",
"timezone": "string",
"timezoneOffset": 0,
"timezoneAbbreviation": "string",
"msa": "string",
"cutOffTimeMins": 0,
"version": 0,
"hasLoadingDock": true,
"primaryContact": "string"
},
"emergencyContact": {
"contactName": "string",
"phoneNumber": "string",
"email": "user@example.com",
"contactTitle": "00000000-0000-0000-0000-000000000000"
},
"orderItems": [
{
"weightLbs": 0,
"id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"identifier": "string",
"priceCent": 0,
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"sortOrdinal": 0,
"nmfc": "string",
"freightClass": "string",
"isDummy": true,
"hazardousMaterialDetails": {
"identificationNumber": "string",
"properShippingName": "string",
"packagingGroup": "string",
"packagingType": "string",
"hazardClass": "string",
"hazardSubClass": "string",
"technicalName": "string",
"dotLabeling": "string"
},
"doNotRotate": true
}
],
"deliveryContainers": [
{
"id": "00000000-0000-0000-0000-000000000000",
"lengthIn": 0,
"widthIn": 0,
"heightIn": 0,
"deliveryId": "00000000-0000-0000-0000-000000000000",
"orderId": "00000000-0000-0000-0000-000000000000",
"totalWeightLbs": 0,
"containerTypeId": "00000000-0000-0000-0000-000000000000",
"trackingNumber": "string",
"shipperContainerId": "string",
"shipperExtraData": {},
"labelURL": "string",
"subContainerQuantity": 0,
"uniqueSubLabels": true,
"nmfc": "string",
"freightClass": "string",
"predefinedContainer": "string",
"containerType": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string"
},
"hazardousMaterialDetails": {
"signatoryContactField": "string",
"emergencyContactNumber": "string",
"signatoryContactTitle": "string",
"signatoryContactPlace": "string",
"offeror": "string",
"dotLabeling": "string",
"authorization": "string",
"fedExPackagingType": "string"
},
"orderItems": [
{
"weightLbs": "string",
"id": "string",
"description": "string",
"identifier": "string",
"priceCent": "string",
"lengthIn": "string",
"widthIn": "string",
"heightIn": "string",
"sortOrdinal": "string",
"nmfc": "string",
"freightClass": "string",
"isDummy": "string",
"hazardousMaterialDetails": "string",
"doNotRotate": "string"
}
],
"doNotRotate": true
}
],
"nonDeliveryBehavior": "string"
},
"shipmentId": "string",
"contactPreference": "EMAIL",
"label": {
"trackingId": "string",
"deliveryId": "string",
"labelType": "png",
"statusCode": 0,
"statusDescription": "failure",
"scac": "string",
"serviceCode": "string",
"containers": [
{
"label": "string",
"individualLabels": [
{
"label": "string",
"subContainer": "string"
}
],
"containerType": "string",
"containerTrackingId": "string",
"containerId": "string",
"shipperContainerId": "string",
"subContainerQuantity": 0,
"uniqueSubLabels": true
}
]
},
"deliveryFiles": "string"
}
]
|
|||||||||||||||||||||
| default |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
|||||||||||||||||||||
Canceling a Delivery
An individual delivery can be canceled prior to it being dispatched. This can be designated by your organization or the organization sending the order (depending on your configuration).
Note: This function is only applicable for shipper cancellations.
To cancel a delivery, a POST request can be sent to the "/delivery/{id}/cancel" endpoint. The "{id}" within the URL should be replaced with the ID of the delivery that is being canceled.
For full details on this endpoint, refer to the following Swagger reference:
| Name | Type | Description |
|---|---|---|
| idrequired | string(path) | delivery id |
{
"reason": {
"title": "string"
}
}
| Field | Type | Description |
|---|---|---|
| reason | object | — |
| title | string | — |
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
Success. The delivery has been cancelled.
|
|||||||||||||||||||||
| default |
Unexpected error
{
"code": 0,
"message": "string",
"errors": {},
"errorDetails": [
{
"detail": "string",
"pointer": "string"
}
]
}
|
Comments
0 comments
Please sign in to leave a comment.