Required Fields
This guide outlines the required fields for creating an order using the MyCarrier API. Ensuring all required fields are included will help you successfully create and manage orders.
Root Level
- orders (array): An array of order objects. Each order object contains the details of a shipment.
Order Object
Each order object must include the following required fields:
Origin Stop
The origin stop details where the shipment will be picked up. The details can be entered in the individual fields or notated through a location ID. This location ID must be created in your MyCarrier account. (Read more about adding a location here).
Destination Stop
The destination stop details where the shipment will be delivered. This address must be different than the Origin Stop.
- city (string): The city of the destination stop.
- state (string): The state of the destination stop.
- zip (string): The ZIP code of the destination stop.
Quote Units
Details about the handling units in the shipment.
- quoteUnits (array): An array of handling unit objects. Each handling unit object must include:
- quoteCommodities (array, required if auto-dispatch): An array of commodity objects. Each commodity object must include:
- commodityClass (string): The class of the commodity.
- commodityDescription (string): The description of the commodity.
- commodityWeight (string): The weight of the commodity.
- unitHeight (string): The height of the unit.
- unitLength (string): The length of the unit.
- unitWidth (string): The width of the unit.
- quoteCommodities (array, required if auto-dispatch): An array of commodity objects. Each commodity object must include:
Other Required Fields
Additional fields required for processing the order.
- paymentDirection (string): The payment direction. This is required for auto dispatch.
- pickupDate (string): The pickup date. This is required for auto dispatch.
- quoteReferenceID (string): The customer's order number used to index or reference the transaction by the shipper.
Example
Here is an example of a minimal order object with all required fields:
{
"orders": [
{
"destinationStop": {
"city": "Phoenix",
"state": "AZ",
"zip": "85014"
},
"originStop": {
"locationID": "Example Demo"
},
"quoteUnits": [
{
"quoteCommodities": [
{
"commodityClass": "70",
"commodityDescription": "test",
"commodityWeight": "200"
}
],
"unitHeight": "48",
"unitLength": "48",
"unitWidth": "48"
}
],
"paymentDirection": "Prepaid",
"pickupDate": "11-11-2024",
"quoteReferenceID": "testing123"
}
]
}
Updated 2 months ago