Copyright © FleetRunnr, Inc.
This is the documentation for version 1.0
of the API. Last update on May 30, 2022.
https://{workspace}.fleetrunnr.com/api/v1
Copyright © FleetRunnr, Inc.
This is the documentation for version 1.0
of the API. Last update on May 30, 2022.
https://{workspace}.fleetrunnr.com/api/v1
Send a bearer token in the Authorization
HTTP header to authenticate with the API.
To generate an access token, please go to the Settings page in the FleetRunnr portal, click on Access Tokens, and create a new one from there (https://app.fleetrunnr.com/settings/access-tokens).
All API requests return HTTP status codes that can tell you more about the response.
The client doesn't have proper authentication headers.
The account doesn't have a valid subscription or has overdue payments.
The requested resource is not accessible.
The requested resource was not found.
The request body contains semantic errors. This is typically caused by incorrect formatting, omitting required fields, or logical errors.
The client has exceeded the API rate limit.
An internal error occurred in FleetRunnr. Contact support for more information.
// 401
{
"message": "Unauthorized."
}
// 402
{
"message": "Payment Required."
}
// 403
{
"message": "Forbidden."
}
// 404
{
"message": "Not found."
}
// 422
{
"message": "The given data was invalid."
"errors": {
...
}
}
// 429
{
"message": "Too many requests."
}
// 5xx
{
"message": "Internal server error."
}
Carriers Found.
The carrier's id used by FleetRunnr.
The carrier's name.
The carrier's avatar.
The carrier's workspace.
The carrier's shipping methods.
The shipping method id used by FleetRunnr.
The shipping method name.
The shipping method workflow.
The shipping method base fee.
The shipping method base fee formatted.
The shipping method currency.
The shipping method lateness threshold.
The shipping method lateness threshold formatted.
The shipping method weight threshold.
The shipping method weight surcharge.
The shipping method weight surcharge formatted.
The shipping method is active.
The shipping method coverage areas.
curl \
-X GET https://{workspace}.fleetrunnr.com/api/v1/carriers \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"message": "string",
"data": {
"id": 2,
"name": "Nader-Lehner",
"avatar": null,
"workspace": "nader-lehner1646923360",
"shipping_methods": [
{
"id": 1,
"name": "Oscar Mertz V",
"workflow": 1,
"base_fee": 20,
"base_fee_formatted": "$20.00",
"currency": "USD",
"lateness_threshold": 0,
"lateness_threshold_formatted": null,
"weight_threshold": 15,
"weight_surcharge": 5,
"weight_surcharge_formatted": "$5.00",
"is_active": true
}
]
}
}
Retrieve all carriers and calculate the rates of an order for each shipping method depending on the chosen: (total weight of packages, source/destination coordinates).
Post the necessary fields for the API to calculate the rate.
The order's source location.
The order's destination location.
The order's total weight(kg).
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/carriers/rates \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sources":{"latitude":-90,"longitude":-180},"destination":{"latitude":-90,"longitude":-180},"total_weight":20}'
{
"sources": {
"latitude": -90,
"longitude": -180
},
"destination": {
"latitude": -90,
"longitude": -180
},
"total_weight": 20
}
{
"message": "string",
"data": {
"id": 2,
"name": "Welch-Harvey",
"avatar": null,
"workspace": "welch-harvey1646923662",
"shipping_methods": [
{
"id": 1,
"name": "Coralie Pagac II",
"rate": 50
},
{
"id": 2,
"name": "Brandi Ziemann",
"rate": 150
}
]
}
}
Retrieve customer by id, phone, email or external_id. Set the location parameter to true in order to also retrieve the customer’s location information.
Fetch customer by id.
Fetch customer by phone_number.
Fetch customer by email address.
Fetch customer by external_id
Fetch customer associated with locations.
Customer Found
The unique customer's id used by FleetRunnr.
The unique customer's external id.
The customer's first name.
The customer's last name
The unique customer's email.
The unique customer's phone number.
The locations saved by this customer.
The unique location's id used by FleetRunnr.
The location's name.
The location's first line.
The location's second line.
The location's city.
The location's region.
The location's country.
The location's coordinates.
The location's zip code.
curl \
-X GET https://{workspace}.fleetrunnr.com/api/v1/customers \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"message": "success",
"data": {
"id": 1,
"external_id": 1,
"first_name": "Shannon",
"last_name": "Fisher",
"email": "example@hotmail.com",
"phone": "+12099216581"
}
}
{
"message": "string",
"data": {
"id": 1,
"external_id": 1,
"first_name": "Shannon",
"last_name": "Fisher",
"email": "example@hotmail.com",
"phone": "+12099216581",
"locations": [
{
"id": 1,
"name": "Prof. Ethyl Jones",
"line_1": "946 Nelda Divide Alleneville, GA 90543-7001",
"line_2": "7570 Elaina Mill",
"city": "Antonettaville",
"region": "sunt",
"country": "FRA",
"coordinates": {
"lat": -90,
"lng": -180
},
"zip_code": 77449
}
]
}
}
Post the necessary fields for the API to create a customer.
The customer's first name.
The customer's last name.
The unique customer's external id.
The unique customer's email.
Required if phone is not provided.
The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.
Required if email is not provided.
The customer's notes.
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/customers \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name":"john","last_name":"Ondricka","external_id":1,"email":"vladimir.kertzmann@barrows.info","phone":"+12163547758","notes":"Interested in your Fleet account"}'
{
"first_name": "john",
"last_name": "Ondricka",
"external_id": 1,
"email": "vladimir.kertzmann@barrows.info",
"phone": "+12163547758",
"notes": "Interested in your Fleet account"
}
{
"message": "success"
}
Post the necessary fields for the API to update customer.
The customer's first name.
The customer's last name.
The unique customer's email.
Required if phone is not provided.
The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.
Required if email is not provided.
The customer's notes.
Customer Updated
The customer's first name.
The customer's last name.
The unique customer's external id.
The unique customer's email.
The unique customer's phone number.
The customer's notes.
curl \
-X PUT https://{workspace}.fleetrunnr.com/api/v1/customers/{id} \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name":"Julian","last_name":"Jacobi","phone":"+9616171513","email":"lorena.langworth@beer.info","notes":"Qui sunt hic quis consequatur officiis aut dolores. Pariatur dolorem recusandae quam voluptas quisquam iusto. Nihil sunt rerum autem sint fugiat. Laboriosam ut iusto quo voluptas."}'
{
"first_name": "Julian",
"last_name": "Jacobi",
"phone": "+9616171513",
"email": "lorena.langworth@beer.info",
"notes": "Qui sunt hic quis consequatur officiis aut dolores. Pariatur dolorem recusandae quam voluptas quisquam iusto. Nihil sunt rerum autem sint fugiat. Laboriosam ut iusto quo voluptas."
}
{
"message": {
"first_name": "john",
"last_name": "Ondricka",
"external_id": 1,
"email": "vladimir.kertzmann@barrows.info",
"phone": "+12163547758",
"notes": "Interested in your Fleet account"
}
}
Locations Found
The unique location's id used by FleetRunnr.
The location's name.
The location's first line.
The location's second line.
The location's city.
The location's region.
The location's country.
The location's coordinates.
The location's zip code.
curl \
-X GET https://{workspace}.fleetrunnr.com/api/v1/locations \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"message": "success",
"data": {
"id": 1,
"name": "Prof. Ethyl Jones",
"line_1": "946 Nelda Divide Alleneville, GA 90543-7001",
"line_2": "7570 Elaina Mill",
"city": "Antonettaville",
"region": "sunt",
"country": "FRA",
"coordinates": {
"lat": -90,
"lng": -180
},
"zip_code": 77449
}
}
Fetch order by external id
Fetch order by number
Order Found
The order's uuid
The order number
The unique order's external id.
The order's created date.
The order's requirements
The requirement skill.
The requirement proof of delivery.
The order's pickup time: From->To.
The order's delivery time: From->To.
The order's source contact
The order's destination contact
The order's notes
The order's array of collections.
The collection uuid
The collection amount
The collection currency
The collection amount formatted
The collection type
The collection prepayment flag
The order's flag is late.
True if the delivery scheduled to is in the past
The order flags.
return true if this order can be assigned, unassigned or cancelled.
The order's flag in coverage.
curl \
-X GET https://{workspace}.fleetrunnr.com/api/v1/orders \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"message": "success",
"data": {
"order": {
"uuid": "20c48af2-cb48-40e7-9d1f-372f9ec5bfbc",
"order_number": "364237070308212736",
"external_id": "22322423345678",
"status": "1",
"created_date": "2022-05-09T10:36:12.000000Z",
"requirements": {
"skills": [
null
],
"proof_of_delivery": {
"image": true,
"signature": true
}
},
"pickup_time_window": {
"from": "2019-08-24 06:15:22",
"to": "2019-08-24 06:15:22"
},
"delivery_time_window": {
"from": "2019-08-24 06:15:22",
"to": "2019-08-24 06:15:22"
},
"source_contact": {
"name": "Jeromy Glover",
"phone": "+19892508138",
"email": "example@hotmail.com"
},
"destination_contact": {
"name": "Afton Hermann",
"phone": "+15042010052",
"email": "example@hotmail.com"
},
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
"collections": [
{
"uuid": "67caae46-d397-4068-a9a2-c6fc02eef93a",
"amount": 300,
"currency": "USD",
"amount_formatted": "$300.00",
"type": 1,
"is_prepayment": true
}
],
"is_late": true,
"flags": {
"can_assign": true,
"can_unassign": false,
"can_cancel": true
},
"in_coverage": false
}
}
}
Post the necessary fields for the API to create a new order.
The customer of this order.
If the customer already exists then it is only required to provide the cutomer’s id or phone or email. Alternatively, if the customer does not already exist, one can be created on the fly by providing external_id, first_name, last_name, email or phone.
The existing customer’s id used by FleetRunnr.
Required if no other customer fields are included.
The id used to uniquely identify the customer outside of Fleetrunnr.
The customer’s first name.
Required to create a new customer
The customer’s last name.
Required to create a new customer
The customer’s email,
To create a new customer:
Required if id and phone are not provided.
The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.
To create a new customer:
Required if id and email are not provided.
Additional notes for this customer.
The unique order's external id.
The boolean order's return.
The source location of this order.
If the source location already exists then it is only required to provide the source location’s id. Alternatively, if the source location does not already exist, one can be created on the fly by providing name, line_1, city, region, country and coordinates.
The existing source id used by FleetRunnr.
Required if no other source location fields are included.
The source name.
Required if source id is not provided.
The source line1.
Required if source id is not provided.
The source city.
Required if source id is not provided.
The source region.
Required if source id is not provided.
The source country.
Required if source id is not provided.
The source coordinates.
Required if source id is not provided.
The source contact.
The destination location of this order.
If the destination location already exists then it is only required to provide the destination location’s id. Alternatively, if the destination location does not already exist, one can be created on the fly by providing name, line_1, city, region, country and coordinates.
The existing destination id used by FleetRunnr.
Required if no other destination location fields are included.
The destination name.
Required if destination id is not provided.
The destination line1.
Required if destination id is not provided.
The destination city.
Required if destination id is not provided.
The destination region.
Required if destination id is not provided.
The destination country.
Required if destination id is not provided.
The destination coordinates
Required if destination id is not provided.
The destination contact.
The order's array of collections.
The collection prepayment flag.
The collection amount.
Minimum value is 0
.
The collection currency of this amount.
The collection type.
Values are CASH
, CHEQUE
, or CREDIT_CARD
.
The order's requirements.
The requirement proof of delivery.
The requirement skill.
The order's array of packages.
The package name.
The package barcode.
The package type.
Values are ENVELOPE
, BAG
, or BOX
.
The package width.
The package length.
The package height.
The package weight.
The package quantity.
The order's pickup scheduled from.
Must be in UTC timezone.
The order's pickup scheduled to.
Must be in UTC timezone.
The order's delivery scheduled from.
Must be in UTC timezone.
The order's delivery scheduled to.
Must be in UTC timezone.
The order's notes.
Order Created.
The order's uuid
The order number
The unique order's external id.
The order's created date.
The order's requirements
The requirement skill.
The requirement proof of delivery.
The order's pickup time: From->To.
The order's delivery time: From->To.
The order's source contact
The order's destination contact
The order's notes
The order's array of collections.
The collection uuid
The collection amount
The collection currency
The collection amount formatted
The collection type
The collection prepayment flag
The order's flag is late.
True if the delivery scheduled to is in the past
The order flags.
return true if this order can be assigned, unassigned or cancelled.
The order's flag in coverage.
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/orders \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"customer":{"external_id":1,"first_name":"Afton","last_name":"Hermann","email":"daniel.malachi@davis.com","phone":"+9616326692","notes":"new customer"},"external_id":"223","is_return":false,"source":{"name":"Karina Franecki","line_1":"84695 Samanta Road Apt. 816","city":"Rueckerfort","region":"rem","country":"KEN","coordinates":{"lat":35.22,"lng":-13.22},"contact":{"name":"Jeromy Glover","phone":"+19892508138","email":"example@hotmail.com"}},"destination":{"name":"Dr. Marian Dare II","attach_to_customer":1,"line_1":"97073 Ryan Pine","city":"North Bobbyhaven","region":"nihil","country":"HRV","coordinates":{"lat":40.3,"lng":89.2},"contact":{"name":"Afton Hermann","phone":"+15042010052","email":"example@hotmail.com"}},"collections":[{"is_prepayment":true,"amount":300,"currency":"USD","type":1}],"requirements":{"proof_of_delivery":{"signature":true,"image":false},"skills":[null]},"packages":[{"name":"bag","type":1,"width":0.1,"length":0.1,"quantity":2}],"pickup_scheduled_from":"2021-08-24 14:15","pickup_scheduled_to":"2021-08-24 14:15","delivery_scheduled_from":"2021-08-24 14:15","delivery_scheduled_to":"2021-08-24 14:15","tags":[null],"notes":"Aliquam atque iusto est maxime nam ea incidunt qui."}'
{
"customer": {
"external_id": 1,
"first_name": "Afton",
"last_name": "Hermann",
"email": "daniel.malachi@davis.com",
"phone": "+9616326692",
"notes": "new customer"
},
"external_id": "223",
"is_return": false,
"source": {
"name": "Karina Franecki",
"line_1": "84695 Samanta Road Apt. 816",
"city": "Rueckerfort",
"region": "rem",
"country": "KEN",
"coordinates": {
"lat": 35.22,
"lng": -13.22
},
"contact": {
"name": "Jeromy Glover",
"phone": "+19892508138",
"email": "example@hotmail.com"
}
},
"destination": {
"name": "Dr. Marian Dare II",
"attach_to_customer": 1,
"line_1": "97073 Ryan Pine",
"city": "North Bobbyhaven",
"region": "nihil",
"country": "HRV",
"coordinates": {
"lat": 40.3,
"lng": 89.2
},
"contact": {
"name": "Afton Hermann",
"phone": "+15042010052",
"email": "example@hotmail.com"
}
},
"collections": [
{
"is_prepayment": true,
"amount": 300,
"currency": "USD",
"type": 1
}
],
"requirements": {
"proof_of_delivery": {
"signature": true,
"image": false
},
"skills": [
null
]
},
"packages": [
{
"name": "bag",
"type": 1,
"width": 0.1,
"length": 0.1,
"quantity": 2
}
],
"pickup_scheduled_from": "2021-08-24 14:15",
"pickup_scheduled_to": "2021-08-24 14:15",
"delivery_scheduled_from": "2021-08-24 14:15",
"delivery_scheduled_to": "2021-08-24 14:15",
"tags": [
null
],
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui."
}
{
"customer": {
"id": 1
},
"external_id": "223",
"is_return": false,
"source": {
"id": 1,
"contact": {
"name": "Jeromy Glover",
"phone": "+19892508138"
}
},
"destination": {
"id": 2,
"contact": {
"name": "Afton Hermann",
"phone": "+15042010052"
}
},
"collections": [
{
"is_prepayment": true,
"amount": 300,
"currency": "USD",
"type": 2
}
],
"requirements": {
"proof_of_delivery": {
"signature": false,
"image": true
},
"skills": [
null
]
},
"packages": [
{
"name": "bag",
"type": 1,
"width": 0.1,
"length": 0.1,
"quantity": 2
}
],
"pickup_scheduled_from": "2021-08-24 14:15",
"pickup_scheduled_to": "2021-08-24 14:15",
"delivery_scheduled_from": "2021-08-24 14:15",
"delivery_scheduled_to": "2021-08-24 14:15",
"tags": [
null
],
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui."
}
{
"message": "success",
"data": {
"order": {
"uuid": "20c48af2-cb48-40e7-9d1f-372f9ec5bfbc",
"order_number": "364237070308212736",
"external_id": "22322423345678",
"status": "1",
"created_date": "2022-05-09T10:36:12.000000Z",
"requirements": {
"skills": [
null
],
"proof_of_delivery": {
"image": true,
"signature": true
}
},
"pickup_time_window": {
"from": "2019-08-24 06:15:22",
"to": "2019-08-24 06:15:22"
},
"delivery_time_window": {
"from": "2019-08-24 06:15:22",
"to": "2019-08-24 06:15:22"
},
"source_contact": {
"name": "Jeromy Glover",
"phone": "+19892508138",
"email": "example@hotmail.com"
},
"destination_contact": {
"name": "Afton Hermann",
"phone": "+15042010052",
"email": "example@hotmail.com"
},
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
"collections": [
{
"uuid": "67caae46-d397-4068-a9a2-c6fc02eef93a",
"amount": 300,
"currency": "USD",
"amount_formatted": "$300.00",
"type": 1,
"is_prepayment": true
}
],
"is_late": true,
"flags": {
"can_assign": true,
"can_unassign": false,
"can_cancel": true
},
"in_coverage": false
}
}
}
Post the necessary fields for the API to generate labels.
array of order uuid's.
The shipping label id.
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/orders/generate-labels \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"orders":["8eb8168d-07e3-4bf9-a678-636689d1a876"],"shipping_label_id":1}'
{
"orders": [
"8eb8168d-07e3-4bf9-a678-636689d1a876"
],
"shipping_label_id": 1
}
{
"message": "success",
"data": {
"url": "https://s3.eu-west-1.amazonaws.com/media.fleetrunnr/6e92736d-7f41-46de-9c72-6c8b74990722.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3GLSPZCROCOCUP7S%2F20220401%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220401T094455Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=51eda1ef262f8a0e21786814735a6144e6e157b867250892182fcbf0f04ca414"
}
}
Post the necessary fields for the API to update order.
The order's unique external id.
The order's picked schedule from date.
Must be in UTC timezone.
The order's picked schedule to date.
Must be in UTC timezone.
The order's delivery schedule from date.
Must be in UTC timezone.
The order's delivery schedule to date.
Must be in UTC timezone.
The order's notes.
The order's shipping method id.
The order's requirements.
The requirement proof of delivery.
The requirement skills.
Order Updated.
The order's uuid
The order number
The unique order's external id.
The order's notes
The order's shipping method name
The order's shipping method fee
The order's requirements
The requirement skill.
The requirement proof of delivery.
The order's pickup time: From->To.
The order's delivery time: From->To.
curl \
-X PATCH https://{workspace}.fleetrunnr.com/api/v1/orders/{id} \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tags":[null],"external_id":"44332","pickup_scheduled_from":"2021-08-24 14:15","pickup_scheduled_to":"2021-08-24 14:15","delivery_scheduled_from":"2021-08-24 14:15","delivery_scheduled_to":"2021-08-24 14:15","notes":"Aliquam atque iusto est maxime nam ea incidunt qui.","shipping_method_id":1,"requirements":{"proof_of_delivery":{"signatue":true,"image":false},"skills":[null]}}'
{
"tags": [
null
],
"external_id": "44332",
"pickup_scheduled_from": "2021-08-24 14:15",
"pickup_scheduled_to": "2021-08-24 14:15",
"delivery_scheduled_from": "2021-08-24 14:15",
"delivery_scheduled_to": "2021-08-24 14:15",
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
"shipping_method_id": 1,
"requirements": {
"proof_of_delivery": {
"signatue": true,
"image": false
},
"skills": [
null
]
}
}
{
"message": "success",
"data": {
"order": {
"uuid": "0a4bbb2b-eb1c-48cb-b294-c5ebfd017449",
"order_number": "363248405377449984",
"external_id": "22378",
"tags": null,
"notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
"shipping_method_name": null,
"shipping_method_fee": 0,
"requirements": {
"skills": [
null
],
"proof_of_delivery": {
"image": true,
"signature": true
}
},
"pickup_time_window": {
"from": "2019-08-24 14:15:22",
"to": "2019-08-24 14:15:22"
},
"delivery_time_window": {
"from": "2019-08-24 14:15:22",
"to": "2019-08-24 14:15:22"
}
}
}
}
Post the necessary fields for the API to assign order.
The carrier id
The shipping method id
Order Assigned
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/orders/{id}/assign \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"carrier_account_id":1,"shipping_method_id":1}'
{
"carrier_account_id": 1,
"shipping_method_id": 1
}
{
"message": "success",
"data": {
"order_uuid": "1ebfc1c4-46a1-4a10-95f9-8db9a3edcaeb"
}
}
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/orders/{id}/cancel \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"message": "success"
}