book a shipment
Request parameters
| Name | Type | Required/Optional | Description |
|---|---|---|---|
| quoteId | String | Required unless WARP has enabled booking without a quote for your account | The quote_id returned by a previous call to POST /freights/quote. The quote must not be expired and must not have been used by an earlier booking. The booking must match the quote exactly: pickup/delivery zipcodes, every item's height, length, width, sizeUnit, totalWeight, weightUnit and quantity, and the pickup/delivery/additional service lists - otherwise the request is rejected with 400 invalid_field_data (e.g. Pickup Zipcode 90001 does not match with quoting request 90058.). For PARCEL quotes send the items in IN and lbs on both the quote and the booking. |
| shipmentType | String ("LTL", "FTL" or "PARCEL") | Optional | Default is "LTL". Ignored when quoteId is provided: the shipment type of the quote is used. |
| pickupInfo | Object <StopInfo> | Required | The details of the pick up stop. |
| deliveryInfo | Object <StopInfo> | Required | The details of the delivery stop. |
| listItems | Array<Item> | Required | The list of commodities being shipped. Same Item schema as POST /freights/quote; height must be <= 108 and temperature_limit is accepted here (stored on the shipment). |
| pickupServices | Array<PickupService> | Optional | Any pickup services required to service the shipment in the pickup location. |
| deliveryServices | Array<DeliveryService> | Optional | Any delivery services required to service the shipment in the delivery location. |
| additionalServices | Array<AdditionalService> | Optional | Any additional services required to service the shipment. |
| dedicatedLane | String | Optional | Only relevant for accounts that WARP has configured for dedicated-lane booking (the value is the lane code provided by WARP). Dedicated lanes are set up by WARP for the account - please contact the Warp team. |
| vehicleType | VehicleType | Optional | The vehicle. If not provided, the system will automatically select the best vehicle based on the items. |
| refNum | String | Optional | An optional external reference assigned by the customer when creating the shipment. This identifier helps link the shipment in this platform with records maintained in other systems such as order management, warehouse, transportation, or accounting systems. |
| insuranceQuoteId | String | Optional | The insuranceQuoteId returned in the insurance block of POST /freights/quote. Provide it to purchase insurance for this shipment. |
If the customer balance is not enough to cover this booking, the order is still created but it is put on hold: the shipment is not processed until the payment is completed. In that case the response returns paymentLink together with the message "Your booking has been created successfully. Please add funds to your balance to complete payment and continue with the shipment."
Always check for paymentLink in the response - when it is present, open the link to add funds and complete the payment.
<br /> **Pay by saved card** <br />If an admin of your organization turned on Pay by card for API bookings in the customer portal (Settings > API Access), a booking that the balance cannot cover is charged to the selected saved card instead: the amount charged is the booking total plus the card processing fee, and the response includes payment. If the card cannot be charged, no order is created and the API returns:
| HTTP | code | Meaning |
|---|---|---|
| 402 | CHARGE_FAILED | The card was declined. Update the card in the customer portal and retry. |
| 402 | PAYMENT_ACTION_REQUIRED | The card requires authentication (3D Secure) and cannot be charged automatically. |
| 409 | BOOKING_IN_PROGRESS | Another booking request for the same quote is still being processed. |
| 400 | CARD_INSURANCE_NOT_SUPPORTED | insuranceQuoteId cannot be used on a booking paid by saved card. |
Request
- Base URL: https://stg.wearewarp.com/api/v1
- URL: https://stg.wearewarp.com/api/v1/freights/booking
- Auth: API key in header apikey
Request body
Example request
{
"quoteId": "W01KH5PB2V9QJ6Z8M4T3R7X1C0D",
"pickupInfo": {
"locationName": "Location Name/ Shipper Name / Consignee Name",
"contactName": "Poppy",
"contactPhone": "234566533",
"phoneExtension": "123",
"contactEmail": "test@testmail.com",
"address": {
"street": "1220 Satterwhite Rd",
"city": "Buda",
"state": "TX",
"zipcode": "12345"
},
"requiresAppointment": true,
"appointmentInfo": {
"from": "2023-01-04T16:04:40.000Z",
"to": "2023-01-04T16:06:42.000Z"
},
"windowTime": {
"from": "2023-01-13T15:03:07.000Z",
"to": "2023-01-13T15:07:07.000Z"
},
"instructions": "Driver needs to pull up to the back door and ring the bell 4 times.",
"refNum": "reference number"
},
"deliveryInfo": {
"locationName": "Location Name/ Shipper Name / Consignee Name",
"contactName": "Poppy",
"contactPhone": "234566533",
"phoneExtension": "123",
"contactEmail": "test@testmail.com",
"address": {
"street": "1220 Satterwhite Rd",
"city": "Buda",
"state": "TX",
"zipcode": "12345"
},
"requiresAppointment": true,
"appointmentInfo": {
"from": "2023-01-04T16:04:40.000Z",
"to": "2023-01-04T16:06:42.000Z"
},
"windowTime": {
"from": "2023-01-13T15:03:07.000Z",
"to": "2023-01-13T15:07:07.000Z"
},
"instructions": "Driver needs to pull up to the back door and ring the bell 4 times.",
"refNum": "reference number"
},
"listItems": [
{
"name": "Item Name",
"height": 48,
"length": 48,
"width": 40,
"sizeUnit": "IN",
"totalWeight": 500,
"weightUnit": "lbs",
"quantity": 1,
"packaging": "Pallet",
"stackable": false,
"notes": "Notes here"
}
],
"pickupServices": [
{
"quantity": 1,
"service": "photo-required-pickup"
}
],
"deliveryServices": [
{
"quantity": 1,
"service": "photo-required-delivery"
}
],
"additionalServices": [
{
"quantity": 1,
"service": "photo-required"
}
],
"insuranceQuoteId": "01J8ZQ7X8N2R6V5F3C4B9D0E1F",
"vehicleType": {
"code": "CARGO_VAN"
},
"refNum": "PO-123456"
}Response
successful operation
Example response
{
"message": "Success",
"trackingNumber": "S-00524-2635",
"orderNumber": "P-01723-2449",
"orderId": "01H3W439G5J5Y282KQFQTAQGTD",
"shipmentId": "01H4YJBE0NP5NGEN3W07Z6YPM4",
"shipmentNumber": "S-00524-2635",
"refNum": "PO-123456, DO-123456",
"insuranceStatus": "booked",
"paymentLink": "https://customer.wearewarp.com/dashboard/pay-orders"
}Changes
No recorded changes to this operation across all 1 revision of this API.