API
Authorization
To get started, please contact us to get an API token, or go to client web-app using a provided AxleHire account to retrieve your api token. All the requests then should include the following headers
Authorization: Token <YOUR_TOKEN>
Accept: application/json
Accept-Charset: utf-8
Content-Type: application/json
Submit Shipment
Code
curl -X POST \
https://api.axlehire.com/v3/shipments \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"name": "John Doe",
"email": "john.d@example.com",
"phone_number": "123-456-7890"
},
"internal_id": "123",
"workload": 1,
"delivery_items": "One egg, two carrots, three tacos",
"pickup_address": {
"street": "1937 Davis Street",
"street2": "Suite A",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577"
},
"pickup_earliest_ts": "2018-10-13T15:36:50.052Z",
"pickup_latest_ts": "2018-10-13T16:23:50.052Z",
"pickup_note": "Parking lot #3",
"pickup_buffer": 300,
"dropoff_address": {
"street": "2250 Shattuck Avenue",
"street2": "Penthouse",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704"
},
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"dropoff_buffer": 360,
"delivery_proof_photo_required": true,
"signature_required": true,
"sms_enabled": true,
"id_required": true,
"rdi": "COMMERCIAL",
"tags": [
"meal kit", "vip", "fragile", "perishable"
],
"parcels": [
{
"dimensions": {
"height": 10,
"length": 25,
"unit": "in",
"width": 15
},
"weight": {
"unit": "lb",
"value": 1
}
}
],
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)",
"code": "LS01"
}'
import requests
url = "https://api.axlehire.com/v3/shipments"
payload = '''
{
"customer": {
"name": "John Doe",
"email": "john.d@example.com",
"phone_number": "123-456-7890"
},
"internal_id": "123",
"workload": 1,
"delivery_items": "One egg, two carrots, three tacos",
"pickup_address": {
"street": "1937 Davis Street",
"street2": "Suite A",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577"
},
"pickup_earliest_ts": "2018-10-13T15:36:50.052Z",
"pickup_latest_ts": "2018-10-13T16:23:50.052Z",
"pickup_note": "Parking lot #3",
"pickup_buffer": 300,
"dropoff_address": {
"street": "2250 Shattuck Avenue",
"street2": "Penthouse",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704"
},
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"dropoff_buffer": 360,
"delivery_proof_photo_required": true,
"signature_required": true,
"sms_enabled": true,
"id_required": true,
"rdi": "COMMERCIAL",
"tags": [
"meal kit", "vip", "fragile", "perishable"
],
"parcels": [
{
"dimensions": {
"height": 10,
"length": 25,
"unit": "in",
"width": 15
},
"weight": {
"unit": "lb",
"value": 1
}
}
],
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)",
"code": "LS01"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
{ customer:
{ name: 'John Doe',
email: 'john.d@example.com',
phone_number: '123-456-7890' },
internal_id: '123',
workload: 1,
delivery_items: 'One egg, two carrots, three tacos',
pickup_address:
{ street: '1937 Davis Street',
street2: 'Suite A',
city: 'San Leandro',
state: 'CA',
zipcode: '94577' },
pickup_earliest_ts: "2018-10-13T15:36:50.052Z",
pickup_latest_ts: "2018-10-13T16:23:50.052Z",
pickup_note: 'Parking lot #3',
pickup_buffer: 300,
dropoff_address:
{ street: '2250 Shattuck Avenue',
street2: 'Penthouse',
city: 'Berkeley',
state: 'CA',
zipcode: '94704' },
dropoff_earliest_ts: '2018-10-14T16:00:00.052Z',
dropoff_latest_ts: '2018-10-14T17:23:50.052Z',
dropoff_note: 'Please leave at the door, do not ring the bell!',
dropoff_buffer: 360,
delivery_proof_photo_required: true,
signature_required: true,
sms_enabled: true,
id_required: true,
rdi: "COMMERCIAL",
tags: [ 'meal kit', 'vip', 'fragile', 'perishable' ],
parcels: [ { dimensions: { height: 10, length: 25, unit: 'in', width: 15 },
weight: { unit: 'lb', value: 1 } } ],
tracking_code: "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)",
code: 'LS01'},
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns AxleHire's shipment ID
{"id": `<SHIPMENT_ID>`, "tracking_code": `<AUTO_GENERATED_TRACKING_CODE>`}
Payload Specification
Parameter | Data Type | Validation | Description |
---|---|---|---|
customer | Customer | required | Customer information |
internal_id | String | optional | Your unique identifier of the shipment |
workload | Number | optional | Number of bags / boxes, default to 0 |
delivery_items | String | optional | Delivery contents or packaging info for sortation teams |
pickup_address | Address | required | Customer pickup address |
pickup_earliest_ts | String | optional | The earliest timestamp (ISO-8601 format) that pickup could be done |
pickup_latest_ts | String | optional | The latest timestamp (ISO-8601 format) that pickup could be done |
pickup_note | String | optional | Pickup instruction |
pickup_buffer | Number | optional | Approximate pickup duration in seconds, AxleHire will auto-populate if omitted |
dropoff_address | Address | required | Dropoff address object |
dropoff_earliest_ts | String | optional | The earliest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_latest_ts | String | optional | The latest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_buffer | Number | optional | Approximate dropoff duration in seconds, AxleHire will auto-populate if omitted |
dropoff_note | String | optional | Dropoff instruction |
delivery_proof_photo_required | Boolean | optional | The flag to mandate taking photo at dropoff, default to false |
signature_required | Boolean | optional | The flag to mandate collecting recipient signature, default to true |
id_required | Boolean | optional | The flag to mandate checking recipient personal ID, default to true |
tags | Array of String | optional | Miscellaneous tags, default to empty [] |
parcels | Array of Parcel | optional | List of parcels included in shipment |
tracking_code | String | optional | Tracking code, auto-generated by AxleHire (highly-recommended), unless requested otherwise (please talk to our engineers first) |
code | String | optional | For branded shipments, the alphanumeric code corresponding to the brand, which is configured in the client portal. Branded shipments can override the name, logo, and other shipment information displayed on labels, tracking pages, and notifications. |
Retrieve Specific Shipment
curl -X GET \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID> \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns the shipment object
{
"id": <SHIPMENT_ID>,
"internal_id": "123",
"workload": 0,
"customer": {
"name": "John Doe",
"phone_number": "123-456-7890",
"email": "john.d@example.com"
},
"status": "CREATED",
"pickup_address": {
"street2": "Suite A",
"street": "1937 Davis Street",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577",
"lat": 0,
"lng": 0
},
"pickup_earliest_ts": "2018-10-13T15:36:50.052Z",
"pickup_latest_ts": "2018-10-13T16:23:50.052Z",
"pickup_note": "Parking lot #3",
"pickup_buffer": 300,
"dropoff_address": {
"street2": "Suite A",
"street": "1937 Davis Street",
"city": "Berkeley",
"state": "CA",
"zipcode": "94577",
"lat": 0,
"lng": 0
},
"dropoff_earliest_ts": "2018-10-13T17:36:50.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"dropoff_buffer": 360,
"delivery_proof_photo_required": false,
"signature_required": true,
"sms_enabled": true,
"assignment_id": <ASSIGNMENT_ID>,
"is_cancelled": false,
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (auto-generated most of the time)",
"tracking_url": "https://someAxleHireTrackingURL/xyz789",
"rdi": "COMMERCIAL",
"remark": {
"pickup": "pickup remark left by driver/dispatcher if any",
"dropoff": "dropoff remark left by driver/dispatcher if any",
"return": "return remark left by driver/dispatcher if any"
},
"parcels": [
{
"dimensions": {
"unit": "in",
"height": 10,
"width": 15,
"length": 25
},
"weight": {
"value": 1,
"unit": "lb"
}
}
]
}
Please see the shipment model for the response format
Retrieve Specific Assignment
curl -X GET \
https://api.axlehire.com/v3/assignments/<ASSIGNMENT_ID> \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
import requests
url = "https://api.axlehire.com/v3/assignments/<ASSIGNMENT_ID>"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/assignments/<ASSIGNMENT_ID>',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns the chosen assignment
{
"id": <ASSIGNMENT_ID>,
"driver":{
"name":"Jason Statham",
"phone_number":"123456789",
"profile_photo":"https://someExpirableUrl.com"
},
"vehicle":{
"make":"Ford",
"model":"Fiesta",
"color":"Silver",
"license_plate":"CA 6XRT009"
},
"shipment_ids": [<SHIPMENT_ID_1>, <SHIPMENT_ID_2>]
}
Please see the assignment model for the response format
Cancel Shipment
For example, we only activate the return flow if the status of the shipment status is after PICKUP_SUCCEEDED
curl --request POST \
--url https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/cancel \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/cancel"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/cancel',
headers:
{ 'Cache-Control': 'no-cache',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield response code 202 (ACCEPTED)
Update Shipment Workload
Update the workload of shipment
curl --request POST \
--url https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/workload \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
--data '2'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/workload"
payload = '2'
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/workload',
headers:
{ 'Cache-Control': 'no-cache',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body: '2',
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield response code 202 (ACCEPTED) or code 412 (PRECONDITION_FAILED) if failed
Retrieve Shipment Photos and Signature
curl --request GET \
--url https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pod \
--header 'Accept: application/json' \
--header 'Accept-Charset: utf-8' \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pod"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pod',
headers:
{ 'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns all photos and signature taken
{
"images": [{url: "`<PHOTO_1>`"}, {url: "`<PHOTO_2>`"}],
"signature": [{data: "`<SIGNATURE_1>`"}, {data: "`<SIGNATURE_2>`"}]
}
Update Instruction Notes
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/notes \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"pickup_note": "pickup instruction",
"dropoff_note": "dropoff instruction"
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/notes"
payload = '''
{
"street": "2320 Warring street",
"street2": "#101",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"longitude": -122.2516053
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_TOKEN",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/notes',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>>',
'Content-Type': 'application/json' },
body:
{ pickup_note: 'pickup instruction',
dropoff_note: 'dropoff instruction' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script return response with status code 204
Update Pickup Address
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pickup_address \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"street": "2320 Warring street",
"street2": "#102",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"latitude": -122.2516053
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pickup_address"
payload = '''
{
"street": "2320 Warring street",
"street2": "#101",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"longitude": -122.2516053
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_TOKEN",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/pickup_address',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>>',
'Content-Type': 'application/json' },
body:
{ street: "2320 Warring street",
street2: "#102",
city: "Berkeley",
state: "CA",
zipcode: "94704",
latitude: 37.8686945,
latitude: -122.2516053 },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script return response with status code 204
Update Dropoff Address
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff_address \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"street": "2320 Warring street",
"street2": "#102",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"latitude": -122.2516053
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff_address"
payload = '''
{
"street": "2320 Warring street",
"street2": "#101",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"longitude": -122.2516053
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_TOKEN",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff_address',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>>',
'Content-Type': 'application/json' },
body:
{ street: "2320 Warring street",
street2: "#102",
city: "Berkeley",
state: "CA",
zipcode: "94704",
latitude: 37.8686945,
latitude: -122.2516053 },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script return response with status code 204
Update Dropoff Time
We are enabling this feature for special clients with a cutoff time, if you want to enable this feature, please contact AxleHire!
Code
curl -X POST \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff-time \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z"
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff-time"
payload = '''
{
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff-time',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
{ dropoff_earliest_ts: '2018-10-14T16:00:00.052Z',
dropoff_latest_ts: '2018-10-14T17:23:50.052Z',
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns the shipment object
{
"id": <SHIPMENT_ID>,
"internal_id": "123",
"workload": 1,
"customer": {
"name": "John Doe",
"phone_number": "123-456-7890",
"email": "john.d@example.com"
},
"status": "GEOCODED",
"pickup_address": {
"street2": "Suite A",
"street": "1937 Davis Street",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577",
"lat": 0,
"lng": 0
},
"dropoff_address": {
"street2": "Suite A",
"street": "1937 Davis Street",
"city": "Berkeley",
"state": "CA",
"zipcode": "94577",
"lat": 0,
"lng": 0
},
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"delivery_proof_photo_required": false,
"signature_required": true,
"sms_enabled": true,
"is_cancelled": false,
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (auto-generated most of the time)",
"tracking_url": "https://someAxleHireTrackingURL/xyz789",
"parcels": [
{
"dimensions": {
"unit": "in",
"height": 10,
"width": 15,
"length": 25
},
"weight": {
"value": 1,
"unit": "lb"
}
}
]
}
Http Request
POST https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/dropoff-time
Payload Specification
Parameter | Data Type | Validation | Description |
---|---|---|---|
dropoff_earliest_ts | String | required | The earliest timestamp (ISO-8601 format) that the customer would accept the dropoff. |
dropoff_latest_ts | String | required | The latest timestamp (ISO-8601 format) that the customer would accept the dropoff. |
HTTP status and error codes
HTTP Status | Message | Description |
---|---|---|
403 | You do not allow to update time window! | Please contact AxleHire if you want to enable this feature. |
403 | It's too late to update delivery time! | You must update the time window before the cutoff time & before we route your order. |
400 | Dropoff latest timestamp must be after dropoff earliest timestamp! | dropoff_latest_ts must be after dropoff_earliest_ts. |
Mark shipment as shipped
Code
curl -X POST \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/mark-shipped \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"data_field_1": "data_field_1_value",
"data_field_2": "data_field_2_value"
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/mark-shipped"
payload = '''
{
"data_field_1": "data_field_1_value",
"data_field_2": "data_field_2_value"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/mark-shipped',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
{
"data_field_1": "data_field_1_value",
"data_field_2": "data_field_2_value"
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script returns no of updated shipments.
{
"updated": 1
}
Http Request
POST https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/mark-shipped
Payload Specification
You can send multiple fields with value or empty payload.
Parameter | Data Type | Description |
---|---|---|
your_field_name | String | The data you want to send to us when you mark shipment as shipped. |
your_field_name | String | The data you want to send to us when you mark shipment as shipped. |
HTTP status and error codes
HTTP Status | Response | Description |
---|---|---|
200 | {"updated": 0} | Shipment does not exist or already marked as shipped or we received shipment. |
200 | {"updated": 1} | Shipment has been marked as shipped successfully. |
Update Customer
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/customer \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"street": "2320 Warring street",
"street2": "#102",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704",
"latitude": 37.8686945,
"latitude": -122.2516053
}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/customer"
payload = '''
{
"name": "Joana Doe",
"email": "joana@doe.com",
"phone_number": "1113335555"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_TOKEN",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/customer',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>>',
'Content-Type': 'application/json' },
body:
{ name: "2320 Warring street",
email: "joana@doe.com",
phone_number: "1113335555" },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
The above script return response with status code 204
Retrieve Shipment Label
curl --request GET \
--url https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/label?format=PDF \
--header 'Accept: application/json' \
--header 'Accept-Charset: utf-8' \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'cache-control: no-cache'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/label"
querystring = {"format":"PDF"}
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/label',
qs: { format: 'PDF' },
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
{
"label": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlL1hPYmplY3QvU3VidHlwZS9JbWFnZS9XaWR0aCAyMDAvSGVpZ2h0IDIwMC9MZW5ndGggMjQ4L0NvbG9yU3BhY2UvRGV2aWNlR3JheS9EZWNvZGVQYXJtczw8L0JpdHNQZXJDb21wb25lbnQgMS9QcmVkaWN0b3IgMTUvQ29sdW1ucyAyMDAvQ29sb3JzIDE+Pi9CaXRzUGVyQ29tcG9uZW50IDEvRmlsdGVyL0ZsYXRlRGVjb2RlPj5zdHJlYW0KeNrdmEESgyAMRcN04ZIjcBSPpkfrUTiCSxeMKUkIU1rctjPfjchzk8/nByW+u+hX5CS7IvNFvK+5Pa945KEV56i3SnwASC6pOEcZ6CuiCjTpGuCTEtjEgCXu61JnNp45HoR4VqmvpykGQnq/aTt40plAiLlYqlYNvBEhEvH1Tsnq3p7pWMzgcEQqlo2rGlRCtFhoAZJaOokGRXduOohCdzwUqRWrr22RXYMNkPSskq3sjWhMMQzy2X8knlk1gCN+phg/AhiR+NnfjofZxcAlFs/af0JbbV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MDAwMDA3NTQwIDAwMDAwIG4gCjAwMDAwMTI3NjUgMDAwMDAgbiAKMDAwMDAwNjM1MCAwMDAwMCBuIAowMDAwMDEyODk5IDAwMDAwIG4gCjAwMDAwMDY2MjUgMDAwMDAgbiAKMDAwMDAxMjk5MCAwMDAwMCBuIAowMDAwMDA3NjM4IDAwMDAwIG4gCjAwMDAwMTE5NTkgMDAwMDAgbiAKMDAwMDAxMjE0MiAwMDAwMCBuIAowMDAwMDEyNDE2IDAwMDAwIG4gCjAwMDAwMTMwNDIgMDAwMDAgbiAKMDAwMDAxMzA4OSAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgMTcvUm9vdCAxNSAwIFIvSW5mbyAxNiAwIFIvSUQgWzw2MzNlZDJjYzhiNmFkZDU2Mjc3NDcyNmQ4OTI4NTJkZT48NjMzZWQyY2M4YjZhZGQ1NjI3NzQ3MjZkODkyODUyZGU+XT4+CiVpVGV4dC01LjUuMTEKc3RhcnR4cmVmCjEzMjM2CiUlRU9GCg=="
}
Retrieve Shipment Fee
curl -X GET \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/fee \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/fee"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/fee',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
{
"base": 10.6,
"pre_delivery_adjustment": -0.5,
"post_delivery_adjustment": 0.1
}
Please see Price
Track Shipment
curl -X GET \
https://api.axlehire.com/v3/tracking/<SHIPMENT_TRACKING_CODE>/events \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
import requests
url = "https://api.axlehire.com/v3/tracking/<SHIPMENT_TRACKING_CODE>/events"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/tracking/<SHIPMENT_TRACKING_CODE>/events',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
{
"events": [
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T22:15:19.000Z",
"geolocation": {
"latitude": 30.39480879213078,
"longitude": -87.26686378082174
},
"signal": "DROPOFF_FAILED",
"next_destination": "DROP_OFF",
"remark": "Too far away"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T22:10:56.000Z",
"geolocation": {
"latitude": 30.394913617408267,
"longitude": -87.26681762984384
},
"signal": "DROPOFF_READY",
"eta": 1000,
"next_destination": "DROP_OFF"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T22:05:16.000Z",
"geolocation": {
"latitude": 30.396216413495207,
"longitude": -87.28009472505788
},
"signal": "DROPOFF_EN_ROUTE",
"eta": 314000,
"next_destination": "DROP_OFF"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T22:05:08.000Z",
"geolocation": {
"latitude": 30.396222403166874,
"longitude": -87.28008684726137
},
"signal": "PICKUP_SUCCEEDED",
"eta": 314000,
"next_destination": "PICK_UP"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T22:04:48.000Z",
"geolocation": {
"latitude": 30.396216545549482,
"longitude": -87.28009610748641
},
"signal": "PICKUP_READY",
"eta": 10000,
"next_destination": "PICK_UP"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T21:49:28.000Z",
"geolocation": {
"latitude": 30.41565254029608,
"longitude": -87.2429396669947
},
"signal": "PICKUP_EN_ROUTE",
"eta": 518000,
"next_destination": "PICK_UP"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T21:49:28.000Z",
"geolocation": {
"latitude": 30.4156494140625,
"longitude": -87.2429396669947
},
"signal": "PICKUP_EN_ROUTE",
"eta": 518000,
"next_destination": "PICK_UP"
},
{
"shipment_id": <SHIPMENT_ID>,
"ts": "2019-03-27T21:25:00.294Z",
"signal": "ASSIGNED"
}
]
}
Please see Event
Retreive Parcels of Shipment
Please see Parcel for the response format
curl -X GET \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'GET',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
[
{
"id": "e34b7b8b-3248-4ac1-9db2-bfc804333b46",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
},
"type": "box",
"shipment_id": <SHIPMENT_ID>,
"parcel_id": "your-parcel-id"
},
{
"id": "c6da2cd7-8203-4f38-a5ef-d1e0c9a37784",
"dimensions": {
"unit": "in",
"height": 5,
"width": 5,
"length": 5
},
"weight": {
"value": 5,
"unit": "lb"
},
"type": "tote",
"shipment_id": <SHIPMENT_ID>,
"parcel_id": "another-parcel-id"
}
]
Add Parcels to Shipment
curl -X POST \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
]'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels"
payload = '''
[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
]
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
],
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will return number of parcels added
Payload Specification
Parameter | Data Type | Validation | Description |
---|---|---|---|
shipment_id | Number | required | AxleHire Shipment identifier that the parcel belong to |
parcel_id | String | optional | Your unique identifier of the parcel |
type | String | required | Type of the parcel (eg: box, bag, tote, pallet) |
description | String | optional | Detail about parcel [optional] |
dimensions | Dimension | optional | Dimension of parcel |
weight | Weight | optional | Weight of parcel |
Add/Update Parcels of Shipment
curl -X PUT \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
]'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels"
payload = '''
[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
]
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("PUT", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'PUT',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
[
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
{
"parcel_id": "your-parcel-id-2",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
],
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will return number of parcels added
Do same function as Add parcels to shipment but allow to update parcels if parcel_id
is conflict.
This use PUT
method instead of POST
Payload Specification
Please refer this for payload.
Update Specific Parcel of Shipment
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels"
payload = '''
{
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body: {
"parcel_id": "your-parcel-id",
"dimensions": {
"unit": "in",
"height": 12,
"width": 10.5,
"length": 11
},
"weight": {
"value": 14,
"unit": "lb"
}
},
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will return 200 on success
Payload Specification
Parameter | Data Type | Description |
---|---|---|
shipment_id | Number (required) | AxleHire Shipment identifier that the parcel belong to |
parcel_id | String (required) | Your unique identifier of the parcel |
type | String (required) | Type of the parcel (eg: box, bag, tote, pallet) |
description | String (optional) | Detail about parcel [optional] |
dimensions | Dimension (optional) | Dimension of parcel |
weight | Weight (optional) | Weight of parcel |
Delete Specific Parcel of Shipment
curl -X PATCH \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels?delete=true \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '
{
"parcel_id": "your-parcel-id-to-delete"
}
'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels?delete=true"
payload = '''
{
"parcel_id": "your-parcel-id-to-delete"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'PATCH',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels?delete=true',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body: { "parcel_id": "your-parcel-id-to-delete" },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will return 200 on success
Delete All Parcels of Shipment
curl -X DELETE \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels"
payload = ''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("DELETE", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'DELETE',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/parcels',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body: {},
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will return number of parcels deleted
Signal Shipment Readiness
curl -X POST \
https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/ready \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/ready"
payload = ''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/ready',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json'
},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Tip Driver
Payload Specification
Parameter | Data Type | Description |
---|---|---|
amount | Number | Tip amount |
currency | String | Tip currency, default to USD |
remark | String | Tip remark |
curl --request POST \
--url https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/tip \
--header 'Accept: application/json' \
--header 'Accept-Charset: utf-8' \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'cache-control: no-cache' \
--data '{\n "currency": "USD",\n "amount": 60.123\n, \n "remark": "fast and furious"\n}'
import requests
url = "https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/tip"
payload = "{\n\t\"currency\": \"USD\",\n\t\"amount\": 60.123\n, \n\t\"remark\": \"fast and furious\"}"
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR_TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/<SHIMENT_ID>/tip',
headers:
{
'cache-control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body: { currency: 'USD', amount: 60.123, remark: "fast and furious" },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
{
"amount": 1.5,
"currency": "USD",
"shipment_id": <SHIPMENT_ID>,
"assignment_id": <ASSIGNMENT_ID>,
"driver_id": <TIPPED_DRIVER_ID>,
"remark": "fast and furious",
"created_at": "2019-01-01T01:00:00Z"
}
Get estimated fee for a potential shipment
Code
curl -X POST \
https://api.axlehire.com/v3/shipments/rating \
-H 'Accept: application/json' \
-H 'Accept-Charset: utf-8' \
-H 'Authorization: Token <YOUR TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"name": "John Doe",
"email": "john.d@example.com",
"phone_number": "123-456-7890"
},
"internal_id": "123",
"workload": 1,
"delivery_items": "One egg, two carrots, three tacos",
"pickup_address": {
"street": "1937 Davis Street",
"street2": "Suite A",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577"
},
"pickup_earliest_ts": "2018-10-13T15:36:50.052Z",
"pickup_latest_ts": "2018-10-13T16:23:50.052Z",
"pickup_note": "Parking lot #3",
"pickup_buffer": 300,
"dropoff_address": {
"street": "2250 Shattuck Avenue",
"street2": "Penthouse",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704"
},
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"dropoff_buffer": 360,
"delivery_proof_photo_required": true,
"signature_required": true,
"sms_enabled": true,
"id_required": true,
"rdi": "COMMERCIAL",
"tags": [
"meal kit", "vip", "fragile", "perishable"
],
"parcels": [
{
"dimensions": {
"height": 10,
"length": 25,
"unit": "in",
"width": 15
},
"weight": {
"unit": "lb",
"value": 1
}
}
],
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)"
}'
import requests
url = "https://api.axlehire.com/v3/shipments/rating"
payload = '''
{
"customer": {
"name": "John Doe",
"email": "john.d@example.com",
"phone_number": "123-456-7890"
},
"internal_id": "123",
"workload": 1,
"delivery_items": "One egg, two carrots, three tacos",
"pickup_address": {
"street": "1937 Davis Street",
"street2": "Suite A",
"city": "San Leandro",
"state": "CA",
"zipcode": "94577"
},
"pickup_earliest_ts": "2018-10-13T15:36:50.052Z",
"pickup_latest_ts": "2018-10-13T16:23:50.052Z",
"pickup_note": "Parking lot #3",
"pickup_buffer": 300,
"dropoff_address": {
"street": "2250 Shattuck Avenue",
"street2": "Penthouse",
"city": "Berkeley",
"state": "CA",
"zipcode": "94704"
},
"dropoff_earliest_ts": "2018-10-14T16:00:00.052Z",
"dropoff_latest_ts": "2018-10-14T17:23:50.052Z",
"dropoff_note": "Please leave at the door, do not ring the bell!",
"dropoff_buffer": 360,
"delivery_proof_photo_required": true,
"signature_required": true,
"sms_enabled": true,
"id_required": true,
"rdi": "COMMERCIAL",
"tags": [
"meal kit", "vip", "fragile", "perishable"
],
"parcels": [
{
"dimensions": {
"height": 10,
"length": 25,
"unit": "in",
"width": 15
},
"weight": {
"unit": "lb",
"value": 1
}
}
],
"tracking_code": "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)"
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Token <YOUR TOKEN>",
'Accept-Charset': "utf-8",
'Accept': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.json())
var request = require("request");
var options = { method: 'POST',
url: 'https://api.axlehire.com/v3/shipments/rating',
headers:
{'Cache-Control': 'no-cache',
Accept: 'application/json',
'Accept-Charset': 'utf-8',
Authorization: 'Token <YOUR_TOKEN>',
'Content-Type': 'application/json' },
body:
{ customer:
{ name: 'John Doe',
email: 'john.d@example.com',
phone_number: '123-456-7890' },
internal_id: '123',
workload: 1,
delivery_items: 'One egg, two carrots, three tacos',
pickup_address:
{ street: '1937 Davis Street',
street2: 'Suite A',
city: 'San Leandro',
state: 'CA',
zipcode: '94577' },
pickup_earliest_ts: "2018-10-13T15:36:50.052Z",
pickup_latest_ts: "2018-10-13T16:23:50.052Z",
pickup_note: 'Parking lot #3',
pickup_buffer: 300,
dropoff_address:
{ street: '2250 Shattuck Avenue',
street2: 'Penthouse',
city: 'Berkeley',
state: 'CA',
zipcode: '94704' },
dropoff_earliest_ts: '2018-10-14T16:00:00.052Z',
dropoff_latest_ts: '2018-10-14T17:23:50.052Z',
dropoff_note: 'Please leave at the door, do not ring the bell!',
dropoff_buffer: 360,
delivery_proof_photo_required: true,
signature_required: true,
sms_enabled: true,
id_required: true,
rdi: "COMMERCIAL",
tags: [ 'meal kit', 'vip', 'fragile', 'perishable' ],
parcels: [ { dimensions: { height: 10, length: 25, unit: 'in', width: 15 },
weight: { unit: 'lb', value: 1 } } ],
tracking_code: "AXLEHIRE_UNIQUE_CODE_123 (highly recommended to skip this field, we will auto-generate)" },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Above request will yield
{
"base": 10.6,
"pre_delivery_adjustment": -0.5,
"post_delivery_adjustment": 0.1
}
Payload Specification
Parameter | Data Type | Validation | Description |
---|---|---|---|
customer | Customer | required | Customer information |
internal_id | String | optional | Your unique identifier of the shipment |
workload | Number | optional | Number of bags / boxes, default to 0 |
delivery_items | String | optional | Delivery contents or packaging info for sortation teams |
pickup_address | Address | required | Customer pickup address |
pickup_earliest_ts | String | optional | The earliest timestamp (ISO-8601 format) that pickup could be done |
pickup_latest_ts | String | optional | The latest timestamp (ISO-8601 format) that pickup could be done |
pickup_note | String | optional | Pickup instruction |
pickup_buffer | Number | optional | Approximate pickup duration in seconds, AxleHire will auto-populate if omitted |
dropoff_address | Address | required | Dropoff address object |
dropoff_earliest_ts | String | optional | The earliest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_latest_ts | String | optional | The latest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_buffer | Number | optional | Approximate dropoff duration in seconds, AxleHire will auto-populate if omitted |
dropoff_note | String | optional | Dropoff instruction |
delivery_proof_photo_required | Boolean | optional | The flag to mandate taking photo at dropoff, default to false |
signature_required | Boolean | optional | The flag to mandate collecting recipient signature, default to true |
id_required | Boolean | optional | The flag to mandate checking recipient personal ID, default to true |
tags | Array of String | optional | Miscellaneous tags, default to empty [] |
parcels | Array of Parcel | optional | List of parcels included in shipment |
tracking_code | String | optional | Tracking code, auto-generated by AxleHire (highly-recommended), unless requested otherwise (please talk to our engineers first) |
Please see Price
Errors
AxleHire Public API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request components are invalid |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- You don't have enough permission to perform this request. |
404 | Not Found -- Not Found |
405 | Method Not Allowed -- You request methods are invalid |
406 | Not Acceptable -- You payload contains unacceptable data (check the response message for more detail) |
412 | Precondition Failed -- You payload contains bad data (check the response message for more detail) |
417 | Expectation Failed -- Please check your payload |
422 | Unprocessable Entity - Please check your payload |
429 | Too Many Requests -- You are requesting too many |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
502 | Bad Gateway -- We're temporarily offline for maintenance. Please try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Webhooks
Format
Each webhook will @POST to your server with the following generic payload
Field | Data Type | Description |
---|---|---|
event | String | Event type |
ts | String | Timestamp as ISO-8601 string |
geolocation | Geolocation | Basic GPS data: latitude and longitude as float values |
data | EventData | Event data |
Geolocation
Field | Data Type | Description |
---|---|---|
latitude | Number | latitude as a floating point |
longitude | Number | longitude as a floating point |
Event Data
Field | Data Type | Description |
---|---|---|
shipment | MiniShipment | A small extraction of shipment |
assignment | MiniAssignment | A small extraction of assignment |
eta | Number | estimated milliseconds as an integer (if applicable) to the respective destination (pickup/dropoff/return) |
Mini Shipment
Field | Data Type | Description |
---|---|---|
shipment_id | Number | AxleHire Shipment unique identifier |
internal_id | String | Your unique identifier of the shipment |
tracking_code | String | Your unique identifier of the shipment |
assignment_id | String | Unique identifier of the assignment that the shipment is part of |
store_id | String | Unique identifier of the original Store that the shipment would be picked up (If applicable) |
remark | Remark | Remarks left by AxleHire driver/dispatcher |
Mini Assignment
Field | Data Type | Description |
---|---|---|
id | Number | AxleHire Assignment unique identifier |
driver | Driver | Driver information |
vehicle | Vehicle | Vehicle information |
shipment_ids | Array[Number] | AxleHire unique identifiers of all associated shipments |
Upon receiving webhook, you can use the info provided to event data to query for detailed
Shipment signals
curl -X POST \
https://webhooks.axlehire.<YOUR_DOMAIN>.com \
-H 'Authorization: Bearer <YOUR_WEBHOOK_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"event":"SHIPMENT.<SHIPMENT_SIGNAL>",
"ts":"2018-08-27T14:10:00",
"geolocation": { "latitude": 37.123, "longitude": -118.234 },
"data":{
"shipment":{
"id":18273645,
"internal_id":"W123",
"remark": {
"pickup": "Skipped if no remark at pickup",
"dropoff": "Skipped if no remark at dropoff",
"return": "Skipped if no remark at return"
}
},
"eta": 600000
}
}'
import requests
url = "https://webhooks.axlehire.<YOUR_DOMAIN>.com"
payload = '''
{
"event":"SHIPMENT.<SHIPMENT_SIGNAL>",
"ts":"2018-08-27T14:10:00",
"data":{
"shipment":{
"id":18273645,
"internal_id":"W123",
"remark": {
"pickup": "Skipped if no remark at pickup",
"dropoff": "Skipped if no remark at dropoff",
"return": "Skipped if no remark at return"
}
},
"eta": 600000
},
"geolocation":{
"latitude":37.123,
"longitude":-118.234
},
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer <YOUR_WEBHOOK_TOKEN>",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://webhooks.axlehire.<YOUR_DOMAIN>.com',
headers:
{ 'Cache-Control': 'no-cache',
Authorization: 'Bearer <YOUR_WEBHOOK_TOKEN>',
'Content-Type': 'application/json' },
body:
{ event: 'SHIPMENT.<SHIPMENT_SIGNAL>',
ts: '2018-08-27T14:10:00',
geolocation: { latitude: 37.123, longitude: -118.234 },
data: { shipment: {
id: 18273645,
internal_id: 'W123',
remark: {pickup: "Skipped if no remark at pickup",
dropoff: "Skipped if no remark at dropoff",
return: "Skipped if no remark at return",
}},
eta: 60000
}
},
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Possible values for <SIGMENT_SIGNAL>
Shipment Signal | Description |
---|---|
GEOCODE_FAILED | there is a problem with geocoding either pickup address or dropoff address |
ASSIGNED | shipment has been assigned to a driver |
CANCELLED_BEFORE_PICKUP | shipment has been cancelled before being picked up |
PICKUP_DELAY | driver reports there is a delay to pickup location |
PICKUP_EN_ROUTE | driver is on the way to pickup location |
PICKUP_READY | driver has arrived at pickup location and is ready to load |
PICKUP_SUCCEEDED | pickup done! |
PICKUP_FAILED | driver failed to pickup |
CANCELLED_AFTER_PICKUP | shipment has been cancelled after being picked up |
DROPOFF_DELAY | driver reports there is a delay to dropoff location |
DROPOFF_EN_ROUTE | driver is on the way to dropoff location |
DROPOFF_READY | driver has arrived at dropoff location and is ready to unload |
DROPOFF_FAILED | driver failed to dropoff |
DROPOFF_SUCCEEDED | dropoff done! |
RETURN_DELAY | driver reports there is a delay to return location |
RETURN_EN_ROUTE | driver is on the way to return location |
RETURN_READY | driver has arrived at return location and is ready to unload |
RETURN_FAILED | driver failed to return |
RETURN_SUCCEEDED | return done! |
Assignment signals
curl --request POST \
--url https://webhooks.axlehire.<YOUR_DOMAIN>.com \
--header 'Authorization: Bearer <YOUR_WEBHOOK_TOKEN>' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
-d '{
"event":"ASSIGNMENT.<ASSIGNMENT_SIGNAL>",
"ts":"2018-08-27T14:10:00",
"geolocation":{
"latitude":37.123,
"longitude":-118.234
},
"data":{
"assignment":{
"id":270,
"driver":{
"first_name":"Jason",
"last_name": "Statham",
"phone_number":"123456789",
"profile_photo":"https://someExpirableUrl.com"
},
"vehicle":{
"make":"Ford",
"model":"Fiesta",
"color":"Silver",
"license_plate":"6XRT009"
"license_plate_state":"CA"
},
"shipment_ids": [<SHIPMENT_ID_1>, <SHIPMENT_ID_2>]
}
}
}'
import requests
url = "https://webhooks.axlehire.<YOUR_DOMAIN>.com"
payload = '''
{
"event":"ASSIGNMENT.<ASSIGNMENT_SIGNAL>",
"ts":"2018-08-27T14:10:00",
"geolocation":{
"latitude":37.123,
"longitude":-118.234
},
"data":{
"assignment":{
"id":270,
"driver":{
"first_name":"Jason",
"last_name":"Statham",
"phone_number":"123456789",
"profile_photo":"https://someExpirableUrl.com"
},
"vehicle":{
"make":"Ford",
"model":"Fiesta",
"color":"Silver",
"license_plate":"6XRT009"
"license_plate_state":"CA"
},
"shipment_ids": [<SHIPMENT_ID_1>, <SHIPMENT_ID_2>]
}
}
}
'''
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer <YOUR_WEBHOOK_TOKEN>",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://webhooks.axlehire.<YOUR_DOMAIN>.com',
headers:
{ 'Cache-Control': 'no-cache',
Authorization: 'Bearer <YOUR_WEBHOOK_TOKEN>',
'Content-Type': 'application/json' },
body:
{ event: 'ASSIGNMENT.<ASSIGNMENT_SIGNAL>',
ts: '2018-08-27T14:10:00',
geolocation: { latitude: 37.123, longitude: -118.234 },
data:
{ assignment:
{ id: 270,
driver:
{ first_name: 'Jason',
last_name: 'Statham',
phone_number: '123456789',
profile_photo: 'https://someExpirableUrl.com' },
vehicle:
{ make: 'Ford',
model: 'Fiesta',
color: 'Silver',
license_plate: '6XRT009',
license_plate_state: 'CA'},
shipment_ids: [<SHIPMENT_ID_1>, <SHIPMENT_ID_2>] } } },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Possible values for <ASSIGNMENT_SIGNAL>
Assignment Signal | Description |
---|---|
DRIVER_ASSIGNED | A driver has been assigned to the route |
DRIVER_DEPLOYED | The assigned driver has started working |
Models
Customer
A customer represents the essential information we should know about your customer or the recipient.
Parameter | Data Type | Validation | Description |
---|---|---|---|
name | String | required | Recipient name, preferably full name for clarity, this will appear on labels |
phone_number | String | phone | recipient phone number, masked by using proxy when exposed to front-end applications |
String | recipient email, will not be exposed to front-end applications |
Address
An address is a structured entity that contains address components
Parameter | Data Type | Validation | Description |
---|---|---|---|
street | String | required | Street number and street prefix/suffix, for example: 1234 East International Boulevard |
street2 | String | optional | Additional info such as floor level, unit/apartment number and split identifier. |
city | String | required | City name |
state | String | required | State name, preferably the two-letter-abbreviation, for example: CA |
zipcode | String | required | Zipcode, preferably without the extension, for example: 94704 |
latitude | Number | optional | Address latitude |
longitude | Number | optional | Address longitude |
Driver
Parameter | Data Type | Description |
---|---|---|
first_name | String | Driver first name |
last_name | String | Driver last name |
phone_number | String | A proxy phone number that links to the assigned driver |
profile_photo | String | Driver's profile photo |
Vehicle
Parameter | Data Type | Description |
---|---|---|
make | String | Vehicle's make, e.g Toyota |
model | String | Vehicle's model, e.g. Rav4 |
color | String | Vehicle's color, e.g silver |
license_plate | String | Vehicle's plate characters, e.g. 6XRT009 |
license_plate_state | String | Vehicle's license plate state, e.g CA |
Price
Parameter | Data Type | Description |
---|---|---|
unit | String | Currency ticker (e.g: USD, CAD, NZD, BTC) |
base | Number | Base price |
pre_delivery_adjustment | Number | Pre-delivery adjustment |
post_delivery_adjustment | Number | Post-delivery adjustment |
Remark
Parameter | Data Type | Description |
---|---|---|
pickup | String | Remark left by driver at pickup location |
dropoff | String | Remark left by driver at dropoff location |
return | String | Remark left by driver at return location |
Assignment
Parameter | Data Type | Description |
---|---|---|
id | Long | AxleHire Assignment unique identifier |
driver | Driver | Driver information |
vehicle | Vehicle | Vehicle information |
shipment_ids | Array of Number | Shipment IDs associated with such assignment |
label | String | The routing label associated with the assignment |
Dimension
Parameter | Data Type | Description |
---|---|---|
width | Double | Width of parcel |
height | Double | Height of parcel |
length | Double | Length of parcel |
unit | String | Measure unit: in, m, cm |
Weight
Parameter | Data Type | Description |
---|---|---|
value | Double | Weight of parcel |
unit | String | Measure unit: kg, lb |
Parcel
Parameter | Data Type | Description |
---|---|---|
id | String | AxleHire Parcel unique identifier (not required at submission) |
shipment_id | Number | AxleHire Shipment identifier that the parcel belong to (not required at submission) |
parcel_id | String | Your unique identifier of the parcel |
quatity | Number | Number of items |
type | String | Type of the parcel (eg: box, bag, tote, pallet) |
description | String (optional) | Detail about parcel [optional] |
dimensions | Dimension | Dimension of parcel |
weight | Weight | Weight of parcel |
status | String | Given the status of current parcel, populated by AxleHire |
Shipment
A shipment is an abstract entity that represents a package info, client info, recipient info, etc.
Parameter | Data Type | Description |
---|---|---|
id | Number | AxleHire Shipment unique identifier |
customer | Customer | Customer information |
internal_id | String | Your unique identifier of the shipment |
workload | Number (optional) | Number of bags / boxes |
delivery_items | String (optional) | Delivery contents or packaging info for sortation teams |
pickup_address | Address | Customer pickup address |
pickup_note | String | Pickup instruction and remarks |
pickup_earliest_ts | String | The earliest timestamp (ISO-8601 format) that the pickup could be done |
pickup_latest_ts | String | The latest timestamp (ISO-8601 format) that the pickup could be done |
pickup_buffer | Number | Approximate pickup duration in seconds, AxleHire will auto-populate if omitted |
dropoff_address | Address | Dropoff address object |
dropoff_earliest_ts | String | The earliest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_latest_ts | String | The latest timestamp (ISO-8601 format) that the customer would accept the dropoff |
dropoff_buffer | Number | Approximate dropoff duration in seconds, AxleHire will auto-populate if omitted |
dropoff_note | String | Dropoff instruction and remarks |
delivery_proof_photo_required | Boolean | The flag to mandate taking photo at dropoff |
signature_required | Boolean | The flag to mandate collecting recipient signature |
sms_enabled | Boolean | The flag to mandate sending SMS to recipients regarding progress |
id_required | Boolean | The flag to mandate checking recipient personal ID |
tags | Array of String | Miscellaneous tags, default to empty [] |
status | String | Shipment status, given the status of current shipment, populated by AxleHire |
assignment_id | Number | Container assignment of the shipment, populated by AxleHire |
is_cancelled | Boolean | Cancellation flag |
tracking_code | String | Tracking code, auto-generated by AxleHire (highly-recommended), unless requested otherwise (please talk to our engineers first) |
tracking_url | String | Tracking URL |
rdi | String | Residential Delivery Indicator, either COMMERCIAL or RESIDENTIAL |
remark | Remark | Remarks left by AxleHire driver/dispatcher |
parcels | Array of Parcel | List of parcels included in shipment |
items | Array of Parcel | List of items included in shipment |
Drop-off windows
In most cases, shipments should be submitted to AxleHire with indicated delivery drop-off windows (dropoff_earliest_ts
and dropoff_latest_ts
, provided in ISO-8601 UTC time).
AxleHire uses these drop-off windows for planning purposes and to determine routes on which to place shipments.
If you do not know your shipment's delivery drop-off window at the time the shipment is submitted, please ask AxleHire to configure your account for late drop-off window support.
Delivery Coverage Areas
AxleHire currently delivers in these US states: AZ, CA, IL, IN, NJ, NY, OR, PA, TX, WA, WI
These are the valid states that can be passed in the pickup_address.state
and dropoff_address.state
fields.
Please reach out to AxleHire for specific ZIP code coverage within these states.
Shipments submitted with addresses out of our coverage area will have status UNSERVICEABLE
(see below).
Life Cycle
This is the normal shipment status lifecycle from the time a shipment is submitted until the time it is picked up for delivery.
This is the normal shipment status lifecycle from the time a shipment is out for delivery until it has been dropped off.
Please see the full list of possible values below
Status | Description |
---|---|
CREATED | shipment submission is acknowledged |
GEOCODED | shipment pickup address and dropoff address have been successfully geocoded |
GEOCODE_FAILED | there is a problem with geocoding both pickup address and dropoff address |
GEOCODE_FAILED_DROPOFF | there is a problem with geocoding dropoff address |
GEOCODE_FAILED_PICKUP | there is a problem with geocoding pickup address |
RECEIVED_OK | shipment has been received at the designated AxleHire facility, only applicable for next-day service |
RECEIVED_DAMAGED | shipment has been received at the designated AxleHire facility but the staff found it to be damaged, only applicable for next-day service |
MISSING | shipment has not arrived at the designated AxleHire facility, only applicable for next-day service |
ASSIGNED | shipment has been assigned to a driver |
UNSERVICEABLE | shipment belongs to out of service regions |
CANCELLED_BEFORE_PICKUP | shipment has been cancelled before being picked up |
PICKUP_DELAYED | driver reports there is a delay to pickup location |
PICKUP_EN_ROUTE | driver is on the way to pickup location |
PICKUP_READY | driver has arrived at pickup location and is ready to load |
PICKUP_SCHEDULED | Shipment has been scheduled to be picked up by driver |
PICKUP_SUCCEEDED | pickup done! |
PICKUP_FAILED | driver failed to pickup |
CANCELLED_AFTER_PICKUP | shipment has been cancelled after being picked up |
DROPOFF_DELAYED | delivery is in progress, but shipment will likely be dropped off at a later time |
DROPOFF_EN_ROUTE | driver is on the way to dropoff location |
DROPOFF_READY | driver has arrived at dropoff location and is ready to unload |
DROPOFF_ATTEMPTED | shipment was not successfully delivered, and will be reattempted later. |
DROPOFF_FAILED | driver failed to dropoff |
DROPOFF_SUCCEEDED | dropoff done! |
REATTEMPT | shipment was not successfully delivered, driver is on the way to reattempt for a second time. |
RESCHEDULED | shipment was not successfully delivered, and needs to be scheduled for another day. |
RETURN_DELAYED | driver reports there is a delay to return location |
RETURN_EN_ROUTE | driver is on the way to return location |
RETURN_READY | driver has arrived at return location and is ready to unload |
RETURN_FAILED | driver failed to return |
RETURN_SUCCEEDED | return done! |
UNDELIVERABLE | shipment is not deliverable despite multiple attempts |
DISPOSABLE | shipment is either out of shape or expired and ready to dispose |
Tip
Parameter | Data Type | Description |
---|---|---|
amount | Number | Tip amount |
currency | String | Tip currency, default to USD |
shipment_id | Number | Shipment ID |
assignment_id | Number | Assignment ID |
driver_id | Number | Driver ID |
remark | String | Tip remark |
created_at | String | Tip created timestamp as a ISO-8601 string |
Event
Parameter | Data Type | Description |
---|---|---|
shipment_id | Number | Shipment ID |
ts | DateTime | Occured timestamp as a ISO-8601 string |
geolocation | Geolocation | Geolocation |
signal | String | Event category a.k.a shipment status, see Life Cycle |
eta | Number | Estimated time of arrival in milliseconds |
remark | String | Remark given by driver |
next_destination | String | Next planned destination type |
Phone
Phone is valid US phone number, include +1
or not
Example:
1234567890
123-456-7890
(123)-456-7890
(123) 456-7890
123.456.7890
123 456 7890
Valid email format
Email example: example@email.com