Create An Order
This guide will walk you through the steps to create an order using the MyCarrier API. Follow these instructions to ensure your order is successfully created and processed.
API Reference for Creating Orders
Step 1: Set Up Your Environment
Before you begin, ensure you have setup your environment.
Step 2: Authentication
The MyCarrier API uses Basic Authentication. Make sure you have access to your API Key.
Step 3: Create Your Order
Required Fields
Ensure your order object includes the following required fields:
- orders (array): An array of order objects.
- destinationStop:
- address line 1 (string): Street address of destination 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.
- originStop:
- locationID (string): The location ID of the origin stop.
- quoteUnits (array): An array of handling unit objects.
- quoteCommodities (array, required if auto-dispatch): An array of commodity objects.
- 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.
- 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 Order Object
"orders": [
{
"quoteReferenceID": "1234567",
"serviceType": "LTL",
"pickupDate": "9/30/2024",
"paymentDirection": "",
"carrier": "",
"carrierService": "Standard",
"specialInstructions": "",
"emergencyContactPersonName": "",
"emergencyContactPhone": "",
"readyToDispatch": "",
"timeCreated": "",
"isVicsBol": "",
"vicsBolPrefix": "",
"proNumber": "",
"cargoValue": "",
"references": {
"customerBOLNumber": "",
"poNumber": "",
"referenceNumber": ""
},
"originAccessorials": {
"insidePickup": "No",
"liftgatePickup": "No",
"protectFromFreeze": "No",
"singleShipment": "No",
"inBondFreight": "No"
},
"destinationAccessorials": {
"notifyBeforeDelivery": "No",
"liftgateDelivery": "No",
"sortOrSegregateDelivery": "No",
"insideDelivery": "No",
"deliveryAppointment": "No"
},
"originStop": {
"companyName": "",
"streetLine1": "",
"streetLine2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"locationType": "",
"contactFirstName": "",
"contactLastName": "",
"contactEmail": "",
"contactPhone": "",
"ext": "",
"readyTime": "",
"closeTime": "",
"instructions": "",
"locationID": "MyCompany" //This is a TMS identifier and can be found in the MyCarrier platform after creating a new shipping location
},
"destinationStop": {
"companyName": "Destination Company",
"streetLine1": "62 W Wallaby Street",
"streetLine2": "",
"city": "Lancaster",
"state": "PA",
"zip": "17601",
"country": "USA",
"locationType": "",
"contactFirstName": "",
"contactLastName": "",
"contactEmail": "",
"contactPhone": "",
"ext": "",
"readyTime": "",
"closeTime": "",
"instructions": "",
"locationID": ""
},
"billingStop": {
"companyName": "",
"streetLine1": "",
"streetLine2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"locationID": "",
"contactFirstName": "",
"contactLastName": "",
"contactEmail": "",
"contactPhone": "",
"locationType": "",
"ext": "",
"readyTime": "",
"closeTime": "",
"instructions": ""
},
"quoteUnits": [
{
"shippingUnitType": "Pallet",
"shippingUnitCount": "1",
"unitLength": "40",
"unitWidth": "40",
"unitHeight": "48",
"unitStackable": "No",
"quoteCommodities": [
{
"productID": "",
"commodityDescription": "Cheese",
"commodityNMFC": "55470",
"commoditySub": "",
"commodityClass": "400",
"commodityPieces": "",
"commodityWeight": "",
"commodityPackingType": "",
"commodityHazMat": "",
"hazmatIDNumber": "",
"hazmatProperShippingName": "",
"hazmatHazardClass": "",
"hazmatPackingGroup": "",
"customerOrderNumber": ""
}
]
}
]
}
]
}
Step 4: Send the Request
Use Postman, cURL, or any HTTPS client to send the POST request to the MyCarrier API endpoint.
Endpoint
Learn more about the environment endpoints here.
Response
Upon successful creation, the API will respond with a status code 200 OK.
{
"isSuccess": true,
"errorMessages": []
}
Updated 3 months ago
What’s Next