Body
If the order uses the standard workflow (
is_return
is false), then thesource_location
should include theuuid
of one of your account's locations.If the order uses the return workflow (
is_return
is true), then thedestination_location
should include theuuid
of one of your account's locations.For packages, please check your account preferences for the measurement system your account is using (https://app.fleetrunnr.dev/settings/account)
-
external_id string
The order ID generated from a third-party system such as a CRM, POS, or accounting software
-
customer object Required
-
source_location object Required
-
source_contact object
-
destination_location object Required
-
destination_contact object
-
collections array[object]
-
packages array[object] Required
-
requirements array[string]
Values are
cooler
,freezer
,narcotics
,heater
,pos_machine
,driver_assistant
, orlift
. -
proof_of_delivery object
-
pickup_schedule object
-
delivery_schedule object
-
is_return boolean
Indicates that the order is using the return workflow (sourced from a customer)
-
notes string
POST /orders
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/orders \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"external_id":"XYZ987","customer":{"external_id":"ABCDE12345","first_name":"John","last_name":"Ondricka","email":"john.ondricka@example.com","phone":"+12163547758","notes":"Some notes here..."},"source_location":{"uuid":"27df9695-5565-4091-b888-ca321b8566ff"},"source_contact":{"name":"Amanda Murrin","email":"amanda.murrin@example.com","phone":"+12025550159"},"destination_location":{"name":null,"line_1":"4840 Sun Valley Road","line_2":"Flat 302","city":"Prescott","region":"Washington","country":"US","zip_code":"99348","coordinates":{"lat":46.371826,"lng":-118.496391}},"destination_contact":{"name":"John Ondricka","email":"john.ondricka@example.com","phone":"+12163547758"},"collections":[{"amount":120.75,"currency":"USD","type":"CASH"}],"packages":[{"external_id":"12hj","barcode":"383176549899173888","type":"PARCEL","length":20,"width":30,"height":1,"weight":0.25,"quantity":1}],"requirements":["narcotics"],"proof_of_delivery":{"signature":true,"image":false},"pickup_schedule":{"from":"2022-01-20 13:30","to":"2022-01-20 15:00"},"delivery_schedule":{"from":"2022-01-23 09:00","to":"2022-01-23 11:30"},"is_return":false,"notes":"These notes are internal and not visible to customers...","tags":["tag1","tag2"]}'
Request examples
Standard order with new customer and destination location
{
"external_id": "XYZ987",
"customer": {
"external_id": "ABCDE12345",
"first_name": "John",
"last_name": "Ondricka",
"email": "john.ondricka@example.com",
"phone": "+12163547758",
"notes": "Some notes here..."
},
"source_location": {
"uuid": "27df9695-5565-4091-b888-ca321b8566ff"
},
"source_contact": {
"name": "Amanda Murrin",
"email": "amanda.murrin@example.com",
"phone": "+12025550159"
},
"destination_location": {
"name": null,
"line_1": "4840 Sun Valley Road",
"line_2": "Flat 302",
"city": "Prescott",
"region": "Washington",
"country": "US",
"zip_code": "99348",
"coordinates": {
"lat": 46.371826,
"lng": -118.496391
}
},
"destination_contact": {
"name": "John Ondricka",
"email": "john.ondricka@example.com",
"phone": "+12163547758"
},
"collections": [
{
"amount": 120.75,
"currency": "USD",
"type": "CASH"
}
],
"packages": [
{
"external_id": "12hj",
"barcode": "383176549899173888",
"type": "PARCEL",
"length": 20,
"width": 30,
"height": 1,
"weight": 0.25,
"quantity": 1
}
],
"requirements": [
"narcotics"
],
"proof_of_delivery": {
"signature": true,
"image": false
},
"pickup_schedule": {
"from": "2022-01-20 13:30",
"to": "2022-01-20 15:00"
},
"delivery_schedule": {
"from": "2022-01-23 09:00",
"to": "2022-01-23 11:30"
},
"is_return": false,
"notes": "These notes are internal and not visible to customers...",
"tags": [
"tag1",
"tag2"
]
}
{
"external_id": "XYZ987",
"customer": {
"uuid": "69e93118-a581-4a13-afea-b6d4a2d2c40c"
},
"source_location": {
"uuid": "27df9695-5565-4091-b888-ca321b8566ff"
},
"source_contact": {
"name": "Amanda Murrin",
"email": "amanda.murrin@example.com",
"phone": "+12025550159"
},
"destination_location": {
"uuid": "84e249df-8d50-4212-8329-6059fc002563"
},
"destination_contact": {
"name": "John Ondricka",
"email": "john.ondricka@example.com",
"phone": "+12163547758"
},
"collections": [
{
"amount": 120.75,
"currency": "USD",
"type": "CASH"
}
],
"packages": [
{
"external_id": "12hj",
"barcode": "383176549899173888",
"type": "PARCEL",
"length": 20,
"width": 30,
"height": 1,
"weight": 0.25,
"quantity": 1
}
],
"requirements": [
"heater"
],
"proof_of_delivery": {
"signature": true,
"image": false
},
"pickup_schedule": {
"from": "2022-01-20 13:30",
"to": "2022-01-20 15:00"
},
"delivery_schedule": {
"from": "2022-01-23 09:00",
"to": "2022-01-23 11:30"
},
"is_return": false,
"notes": "These notes are internal and not visible to customers...",
"tags": [
"tag1",
"tag2"
]
}
Response examples (200)
{
"message": "success",
"data": {
"order_uuid": "e56795c7-0bc3-4742-a52f-988d2af8608f",
"order_number": "520025509673828352"
}
}