NAV Navbar
shell python javascript

Models

Customer

A customer represents the essential information we should know about your customer or the recipient.

Parameter Data Type Description
name String Recipient name, preferably full name for clarity, this will appear on labels
phone_number String recipient phone number, masked by using proxy when exposed to front-end applications
email 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 Description
street String Street number and street prefix/suffix, for example: 1234 East International Boulevard
street2 String Additional info such as floor level, unit/apartment number and split identifier.
city String City name
state String State name, preferably the two-letter-abbreviation, for example: CA
zipcode String Zipcode, preferably without the extension, for example: 94704
latitude Number Address latitude (optional, if you don't have it, just skip)
longitude Number Address longitude (optional, if you don't have it, just skip)

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

Dimension

Parameter Data Type Description
width Double Width of parcel
height Double Height of parcel
depth Double Depth 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 Internal Id of parcel [optional]
description String Detail about parcel [optional]
dimensions Dimension Dimension of parcel
weight Weight Weight of parcel

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 number of bags / boxes
order_detail String Descriptions of delivery content, usually the items list
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
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
tracking_url String Tracking URL
remark Remark Remarks left by AxleHire driver/dispatcher
parcels Array of Parcel List of parcels included in shipment

Life Cycle

A shipment's happy path until pickup:

And then another happy path until dropoff:

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 sucessfully geocoded
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!

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

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 a 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,
    "order_detail": "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,
    "id_required": true,
    "tags": [
      "meal kit", "vip", "fragile", "perishable"
    ],
    "parcels": [
      {
        "dimensions": {
          "height": 10,
          "length": 25,
          "unit": "in",
          "width": 15
        },
        "weight": {
          "unit": "lb",
          "value": 1
        }
      }
    ]
  }'
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,
    "order_detail": "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,
    "id_required": true,
    "tags": [
      "meal kit", "vip", "fragile", "perishable"
    ],
    "parcels": [
      {
        "dimensions": {
          "height": 10,
          "length": 25,
          "unit": "in",
          "width": 15
        },
        "weight": {
          "unit": "lb",
          "value": 1
        }
      }
    ]
  }
'''
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,
        order_detail: '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,
        id_required: true,
        tags: [ 'meal kit', 'vip', 'fragile', 'perishable' ],
        parcels: [ { dimensions: { height: 10, length: 25, unit: 'in', width: 15 },
          weight: { unit: 'lb', value: 1 } } ] },
   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>`}

Payload Specification

Parameter Data Type 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
order_detail String (optional) Descriptions of delivery content, usually the items list
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 (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
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 []

Retrieve a 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,
    "assignment_id": <ASSIGNMENT_ID>,
    "is_cancelled": false,
    "tracking_code": "xyz789",
    "tracking_url": "https://someAxleHireTrackingURL/xyz789",
    "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 a 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 a 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)

Retrieve shipment photos

curl --request GET \
  --url https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/photos \
  --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>/photos"

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>/photos',
  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 taken at pickup/dropoff if any

{
  "pickup_photos": ["`<PICKUP_PHOTO_1>`", "`<PICKUP_PHOTO_2>`"],
  "dropoff_photos": ["`<DROPOFF_PHOTO_1>`", "`<DROPOFF_PHOTO_2>`"]
}

Retrieve shipment signature

curl --request GET \
  --url https://api.axlehire.com/v3/shipments/<SHIPMENT_ID>/signature \
  --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>/signature"

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>/signature',
  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 return the signature collected at dropoff location

{
    "signature": "`<EXPIRABLE_URL_RETURNING_SIGNATURE_AS_64_BASE_STRING>`" 
}

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 = '''
  {"pickup_note": "pickup instruction","dropoff_note": "dropoff instruction"}
'''
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

Retrieve shipment label

curl --request GET \
  --url https://api.staging.axlehire.com/v3/shipments/<SHIMENT_ID>/label?format=ZPL \
  --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.staging.axlehire.com/v3/shipments/<SHIMENT_ID>/label"
querystring = {"format":"ZPL"}
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.staging.axlehire.com/v3/shipments/<SHIMENT_ID>/label',
  qs: { format: 'ZPL' },
  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": "^XA~DGR:LOGO.GRF,3200,20,,:::X0JFX0T0MFGEJFT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 32534^FS^CFC,30^A0N,60,70^FO60,515^FDLuke T^FS^FO60,580^FD2650 Creighton Rd^FS^FO60,635^FD^FS^FO60,690^FDPensacola FL 32504^FS^FXBARCODE^BY3,2,200^FO200,765^BC^FDjohnXYZ^FS^CFA,30^A0N,40,45^FO60,1020^FDREF#:^FS^FO170,1020^FD^FS^FO60,1110^A0N,40,45^FDDATE:^FS^FO170,1110^FDNov 28^FS^FO615,1110^A0N,40,45^FD#4660200^FS^XZ"
}

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

Tip a 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.staging.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.staging.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.staging.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"
}

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
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
id Number AxleHire Shipment unique identifier
internal_id String Your unique identifier of the shipment
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