OTR Book
Endpoint: POST /v1/otr/book
Create a binding transportation booking using a carrier rate from a previous OTR quote. You must supply the quoteNumber and rateNumber returned by the quote endpoint.
Authentication required. All requests to this endpoint require a valid bearer token. See Authentication.
Prerequisites
Before booking, you need:
- A
quoteNumberfrom a successfulPOST /v1/otr/quoteresponse - A
rateNumberfrom the selected carrier rate in that response
// From quote response:
{
"quoteNumber": 8916989,
"carrierQuotes": [
{ "rateNumber": 1525, "carrierName": "Carrier A" },
{ "rateNumber": 1550, "carrierName": "Carrier B" }
]
}
// To book Carrier A:
{ "quoteNumber": 8916989, "rateNumber": 1525 }
Request Body
These fields are required to submit a complete OTR book request.
| Field | Type | Required | Description |
|---|---|---|---|
quoteNumber | integer | Yes | From the quote response |
rateNumber | integer | Yes | Selected carrier rate from the quote response |
customerBsn | integer | Yes | Customer BSN — must match the value used in the quote |
customerNumber | integer | Yes | Business identifier for your customer. Retrieve from GET /v1/customers |
freightDirection | string/integer | Yes | Shipment direction (see below) |
movement | object | Yes | Shipment execution details |
isInsured | boolean | Yes | Whether the shipment includes insurance coverage |
customerBsn and customerNumber
Both values are retrieved from the GET /v1/customers endpoint. Use results[].customerNumber for customerNumber and results[].bsns[].customerBsn for customerBsn. They must match exactly what was used during the quote request.
Freight Direction
| Value | Name | Description |
|---|---|---|
1 | Inbound | Shipment arriving at the customer |
Outbound | Outbound | Shipment departing from the customer |
ThirdParty | ThirdParty | Customer is neither shipper nor consignee |
Movement Object
| Field | Description |
|---|---|
quote.uom | Unit of measure (must match the quote) |
estimatedPickupDate | Pickup datetime format |
commodities | Array of items (must match the quote exactly) |
pickupAddress | Full pickup address |
deliveryAddress | Full delivery address (must match quote origin/destination) |
pickupInformation.contact | Contact at pickup location |
deliveryInformation.contact | Contact at delivery location |
hazardousContact | Required, when any item has isHazardous: true otherwise isHazardous: false |
Commodities
Commodities must match the items submitted in the quote request. Any discrepancy will return an error.
Dimensions are required for booking
Even if you submitted a quote without dimensions (using volume), you must provide length, width, and height in the booking request.
Contact Object
{
"name": "John Doe",
"phone": "+15551234567",
"email": "john.doe@example.com"
}
Addresses
pickupAddress and deliveryAddress must match the origin and destination used during the quote.
{
"name": "Location Name",
"addressLine1": "456 Market Street",
"addressLine2": "",
"city": "Los Angeles",
"state": "CA",
"zipcode": "90001",
"country": "US"
}
Request Examples
- Standard Booking
- Hazardous + Insurance
{
"quoteNumber": 8916989,
"rateNumber": 1525,
"customerBsn": "YOUR_CUSTOMER_BSN",
"customerNumber": "YOUR_CUSTOMER_NUMBER",
"freightDirection": 1,
"movement": {
"quote": {
"uom": "US"
},
"estimatedPickupDate": "2026-05-12T10:00:00Z",
"commodities": [
{
"description": "Test Pallet",
"freightClass": "92.5",
"quantity": 1,
"weight": 1000,
"packageType": 100,
"length": 24,
"width": 29,
"height": 24,
"isHazardous": false,
"isStackable": false,
"levels": 1
}
],
"pickupAddress": {
"name": "Origin Location",
"addressLine1": "456 Market Street",
"addressLine2": "",
"city": "Los Angeles",
"state": "CA",
"zipcode": "90001",
"country": "US"
},
"deliveryAddress": {
"name": "Destination Location",
"addressLine1": "456 Market Street",
"addressLine2": "",
"city": "Los Angeles",
"state": "CA",
"zipcode": "90001",
"country": "US"
},
"pickupInformation": {
"contact": {
"name": "John Doe",
"phone": "+15551234567",
"email": "john.doe@example.com"
}
},
"deliveryInformation": {
"contact": {
"name": "John Doe",
"phone": "+15551234567",
"email": "john.doe@example.com"
}
}
},
"isInsured": false
}
{
"quoteNumber": 8916989,
"rateNumber": 1525,
"customerBsn": "YOUR_CUSTOMER_BSN",
"customerNumber": "YOUR_CUSTOMER_NUMBER",
"freightDirection": 1,
"movement": {
"quote": {
"uom": "US"
},
"estimatedPickupDate": "2026-05-12T10:00:00Z",
"commodities": [
{
"description": "Test Pallet",
"freightClass": "92.5",
"quantity": 1,
"weight": 1000,
"packageType": 100,
"length": 24,
"width": 29,
"height": 24,
"isHazardous": true,
"hazardousMaterial": {
"commercialName": "Gasoline includes gasoline mixed with ethyl alcohol, with not more than 10% alcohol",
"hazardousClass": "3",
"packingGroup": "II",
"unNumber": "1203"
},
"isStackable": false,
"levels": 1
}
],
"hazardousContact": {
"contactName": "CHEMTREC Emergency Contact",
"contactPhone": "800-424-9300",
"contractNumber": "CHEMTREC-123456"
},
"pickupAddress": {
"name": "Origin Location",
"addressLine1": "456 Market Street",
"addressLine2": "",
"city": "Los Angeles",
"state": "CA",
"zipcode": "90001",
"country": "US"
},
"deliveryAddress": {
"name": "Destination Location",
"addressLine1": "456 Market Street",
"addressLine2": "",
"city": "Los Angeles",
"state": "CA",
"zipcode": "90001",
"country": "US"
},
"pickupInformation": {
"contact": {
"name": "John Doe",
"phone": "+15551234567",
"email": "john.doe@example.com"
}
},
"deliveryInformation": {
"contact": {
"name": "John Doe",
"phone": "+15551234567",
"email": "john.doe@example.com"
}
}
},
"isInsured": true
}
Hazardous material lookup.
To retrieve specific UN number information, use:
GET https://api.primofabric.com/portal/v1/flow/hazmat/search?value={UNNumber}
Response
{
"data": {
"orderNumber": 20021775,
"bolNumber": "1354724",
"documents": [
{
"docType": "BillOfLading",
"url": "https://dev.shipprimus.com/Documents/BOL_1354724.pdf",
"fileName": "BOL_1354724.pdf",
"extension": ".pdf",
"contentType": "application/x-download"
},
{
"docType": "ShippingLabel",
"url": "https://dev.shipprimus.com/Documents/LABEL_1354724.pdf",
"fileName": "LABEL_1354724.pdf",
"extension": ".pdf",
"contentType": "application/x-download"
}
]
},
"errors": null
}
Key Response Fields
| Field | Description |
|---|---|
orderNumber | Unique identifier for the created booking order |
bolNumber | Bill of Lading number |
documents | Array of generated shipping documents (BOL, Label, Quotation) |
documents[].docType | Document type: "BillOfLading", "ShippingLabel", "Other" |
documents[].url | URL to download or access the document |
Next Steps
- Drayage Quote → — Explore container movement quoting
- Tools → — Reference data utilities