Getting started

API reference

EliteEXTRA's API is a REST API served over HTTPS. The API uses predictable, resource-oriented URLs, coupled with meaningful HTTP response codes. It also uses built-in HTTP features, like HTTP authentication and HTTP verbs, understood by standard HTTP clients.

Endpoint

All API access is over HTTPS, and accessed from https://[site].eliteextra.com/x/api/ where [site] represents the specific EXTRA instance used.

Example site

If your site is myautostore-md, for example, the endpoint would then be:

https://myautostore-md.eliteextra.com/x/api

Authentication

All API requests must use Basic Authentication.

  1. Set an Authorization HTTP header on every request.
  2. Encode a Base64 string in the format username:password.
  3. Use HTTPS protocol.

Example header

Here is an example using username and password john:doe:

Authorization: Basic am9objpkb2U=

Popular HTTP clients like cURL or requests (Python) provide even easier ways to set this. View the sample code in this reference for examples.

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/dealers

Schema

All data sent and received as JSON (Content-Type: application/json) unless explicitly noted.

All timestamps return in ISO 8601 format:

YYYY-MM-DDTHH:MM:SSZ

Times of day return in ISO 8601 format:

HH:MM:SS

Types

Data types for models, requests, and responses.

Type Description Example
int Integer 23
bool Boolean (true or false) true
number Floating point number (like Double) 32.224
string String "my-site"
phone Phone number (numbers only) "5559282314"
email Email address "support@eliteextra.com"
url Web address "https://eliteextra.com"
color Color (Hex format -- no leading #) "f0f0f0"
image(type) Base64 encoded image of type "R0lGODlhAQABAAAAACwAAAAAAQABAAA="
timestamp Timestamp in UTC (ISO 8601) "2015-12-14T09:33:22Z"
time Time of day in site timezone (ISO 8601) "12:33:00"
duration Duration (ISO 8601) "PT4M13S"
array List of type []
object Object {}

Request verbs

Where possible, the API will use appropriate HTTP verbs for each action.

Verb Description
GET Used for retrieving resources.
POST Used for creating resources.
PUT Used for replacing resources.
DELETE Used for deleting resources.

Response codes

Code Text Description Next Action
200 OK Request valid. Operation successful. None
201 Created Request valid. Resource created. None
400 Bad Request Request invalid. See details. Fix, then resend
401 Unauthorized Request invalid. Invalid or missing user/pass. Check Authorization
404 Not Found Request invalid. Resource not found. Check URL
500 Internal Server Error Request invalid due to server error. Retry later

Error responses

All API error responses are in JSON and will contain a details property further explaining the problem. See response codes for more information.

{
  "details": "User not authorized"
}

Lookup service

For clients who have their stores distributed among more than one instance of Extra, you can use the lookup service to locate the endpoint for any of your stores.

Request format

Use a known site for the request.

GET
/x/api/store_lookup

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/store_lookup

Response format

The response is a hash of store ID to endpoint URL.

Sample 200 response

{
  "S3940": "https://site1.eliteextra.com/",
  "S3943": "https://site1.eliteextra.com/",
  "S3944": "https://site2.eliteextra.com/",
  ...
}

Customers

Customer model

A customer has the following structure.

Property Type Description
id int Dealer ID
business_name string (required) Dealer name
address_1 string (required) Address
address_2 string Address (Line 2)
city string (required) City
state string (required) State
zip string (required) ZIP code
zip_ext string ZIP extension
first_name string Primary contact first name
last_name string Primary contact last name
day_phone string Primary contact day phone
other_phone string Primary contact secondary phone
email string Primary contact email address
notes string Special notes
lat number Latitude
lon number Longitude
udid string User-defined ID
dispatched_by int Warehouse ID

List customers

List customers.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/customers

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/customers

Response format

Responses have the following properties.

Property Type Description
count int Total customers in collection
data array(Customer) List of customers

The returned Customer object also includes a string list of user-defined geographic_zones that the location falls in.

Sample 200 response

{
  "count": 3,
  "data": [{
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  }, ... ]
}

Get customer

Get a customer by ID.

Request format

URL parameter Description
id (required) Customer ID
GET
/x/api/customers/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/customers/3

Response format

Responses have the following properties.

Property Type Description
data Customer Customer

Sample 200 response

{
  "data": {
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  }
}

Update customer

Update a customer by ID.

Request format

Request includes complete Customer record.

URL parameter Description
id (required) CustomerID
PUT
/x/api/customers/{id}

Sample request

curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/customers/3

Sample request body

{
  "data": {
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  }

Response format

Responses have the following properties.

Property Type Description
data Customer Customer

Sample 200 response

{
  "data": {
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  },
}

Delete customer

Delete a customer by ID.

Request format

URL parameter Description
id (required) Customer ID
DELETE
/x/api/customers/{id}

Sample request

curl -u john:doe -X DELETE https://[site].eliteextra.com/x/api/customers/3

Response format

Successful deletion will return a 200 OK status code.

Dealers

Dealer model

A dealer has the following structure.

Property Type Description
id int Dealer ID
business_name string (required) Dealer name
address_1 string (required) Address
address_2 string Address (Line 2)
city string (required) City
state string (required) State
zip string (required) ZIP code
zip_ext string ZIP extension
logo image(png) Logo
color color Custom warehouse color
dispatch_radius number Radius in miles.
first_name string Primary contact first name
last_name string Primary contact last name
day_phone string Primary contact day phone
other_phone string Primary contact secondary phone
email string Primary contact email address
notes string Special notes

List dealers

List dealers.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/dealers

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/dealers

Response format

Responses have the following properties.

Property Type Description
count int Total dealers in collection
data array(Dealer) List of dealers

Sample 200 response

{
  "count": 3,
  "data": [{
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  }, ... ]
}

Get dealer

Get a dealer by ID.

Request format

URL parameter Description
id (required) Dealer ID
GET
/x/api/dealers/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/dealers/3

Response format

Responses have the following properties.

Property Type Description
data Dealer Dealer

Sample 200 response

{
  "data": {
    "id": 3,
    "address_1": "711 North County Line",
    "city": "Souderton"
    ...
  }
}

Drivers

Driver model

A driver has the following structure.

Property Type Description
id int Driver ID
dealer_id int (relationship, required) Dealer
possible_dealers array(int) (relationship, required) List of dealers the driver can drive for
pin string (required, unique) Personal identification number
first_name string (required) First name
last_name string (required) Last name
day_phone phone Day phone
biz_phone phone Business phone
other_phone phone Other phone
tag string(4) Dispatch label (default: driver initials, max: 4 characters)
email email Email
employee_id string Driver employee ID
color color Active route color (default: random)
allowed_active_time duration Allowed active drive time
required_rest_time duration Required break time
per_hour_wage number Per hour wage
custom_active_until_time time Custom logout time.
driver_license_renewal_date timestamp License renewal date
has_medical_card bool Has medical card?
medical_card_expiration timestamp Medical card expiry
start_date timestamp Start date
end_date timestamp End date
hazmat bool Has hazmat certification?
forklift bool Has forklift certification?
cdl bool Has a commercial driver license?
salesrep bool Tracking only?
scanning_enabled bool Can scan orders/invoices/parts?
keep_driver_available bool Overrides the active until times and ensures the driver remains logged in.
sign_for_pickups bool (requires site setting) Should collect a signature for pickups?
requires_payment_validation bool (requires site setting) Require payment validation on completed orders?
enforce_payment_validation bool (requires site setting) Enforce payment validation on previous route before assigning next?
require_signature bool (requires site setting) Require collecting a signature?
enable_order_photo bool (requires site setting) Enable photos of stops?
require_approve_route bool (requires site setting) Require approval of assigned route?
sigcapture_enabled bool (requires site setting) Can collect signatures?
record_odometer bool (requires site setting) Require collection the odometer reading?
remove_reorder_stops bool (requires site setting) Can rearrange or remove assigned stops?
select_next_stop bool (requires site setting) Can select the next stop?
remove_orders_from_stop bool (requires site setting) Can remove individual orders from a stop?
ineligible_reasons array(string) (requires site setting) Reasons why driver is ineligible, one of: Expired License, Policy 113, Incomplete Training, Denied By Risk
ineligible bool (requires site setting) Is the driver ineligiglbe to login to the Driver app.

List drivers

List drivers.

Request format

Query parameter Description
limit (optional) Limit (Defaults to 100)
offset (optional) Offset
GET
/x/api/drivers

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/drivers

Response format

Responses have the following properties.

Property Type Description
count int Total drivers in collection
data array(Driver) List of drivers

Sample 200 response

{
  "count": 27,
  "data": [
    {
      "id": 42,
      "dealer_id": 1,
      "possible_dealers": [ 1 ],
      "first_name": "David",
      "last_name": "Hicks",
      "other_phone": "2095652228"
      ...
    },
  ...]
}

Create driver

Create a driver.

Request format

Property Type Description
data Driver Driver
POST
/x/api/drivers

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/drivers

Sample request body

{
  "data": {
    "dealer_id": 1,
    "possible_dealers": [ 3, 1, 2 ],
    "first_name": "BLOOM",
    "last_name": "HammerSchmitt"
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Driver Driver

Sample 200 response

{
  "count": 46,
  "data": [
    {
      "id": 77,
      "dealer_id": 1,
      "possible_dealers": [ 3, 1, 2 ],
      "first_name": "BLOOM",
      "last_name": "HammerSchmitt",
      "other_phone": "6465391618"
      ...
    }
  ],
  "includes": []
}

Get driver

Get a driver by ID.

Request format

URL parameter Description
id (required) Driver ID
Query parameter Description Possible values
include (optional) Relationships to include; comma-separated dealers
GET
/x/api/drivers/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/drivers/71?include=dealers

Response format

Responses have the following properties.

Property Type Description
data Driver Driver
includes object Included relationships

Sample 200 response

{
  "count": 27,
  "data": {
    "id": 71,
    "dealer_id": 1,
    "possible_dealers": [ 1 ],
    "first_name": "Tom",
    "last_name": "McKee",
    "pin": "Tom",
    "start_date": "2016-06-13T05:00Z"
    ...
  },
  "includes": [{
    "type": "dealers",
    "data": {
      "id": 1,
      "business_name": "Fast Undercar - Stockton",
      "color": "00E699"
      ...
    }
  }]
}

Update driver

Update a driver by ID.

Request format

Request includes complete Driver record.

URL parameter Description
id (required) Driver ID
PUT
/x/api/drivers/{id}

Sample request

curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/drivers/1

Sample request body

{
  "data": {
    "dealer_id": 1,
    "possible_dealers": [ 3, 1, 2 ],
    "first_name": "BLOOM",
    "last_name": "HammerSchmitt"
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Driver Driver

Sample 200 response

{
  "data": {
    "id": 1,
    "dealer_id": 1,
    "possible_dealers": [ 3, 1, 2 ],
    "first_name": "BLOOM",
    "last_name": "HammerSchmitt"
    ...
  }
}

Delete driver

Delete a driver by ID.

Request format

URL parameter Description
id (required) Driver ID
DELETE
/x/api/drivers/{id}

Sample request

curl -u john:doe -X DELETE https://[site].eliteextra.com/x/api/drivers/1

Response format

Successful deletion will return a 200 OK status code.

Fuels

Fuel model

A rate has the following structure.

Property Type Description
id int Fuel ID
type string (required) Fuel type

List fuels

List fuels.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/fuels

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/fuels

Response format

Responses have the following properties.

Property Type Description
count int Total fuels in collection
data array(Fuel) List of fuels

Sample 200 response

{
  "count": 2,
  "data": [{
    "id": 1,
    "type": "Unleaded"
    ...
  }, ...]
}

Get fuel

Get a fuel by ID.

Request format

URL parameter Description
id (required) Fuel ID
GET
/x/api/fuels/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/fuels/1

Response format

Responses have the following properties.

Property Type Description
data Fuel Fuel

Sample 200 response

{
  "data": [{
    "id": 1,
    "type": "Unleaded"
    ...
  }]
}

Orders

Order model

An order has the following structure.

Property Type Description
id int Order ID
time_created timestamp Time created
invoice string Invoice
po string PO
extra_tracking_number string Tracking number
source string Source
destination string Destination
verified boolean Verified

List orders

List orders that match the search parameter.

Request format

Query parameter Description
invoice (one required) Invoice
po (one required) PO

Note that a request with no parameter will still succeed but return an empty list.

GET
/x/api/orders

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/orders?invoice=lta

Response format

Responses have the following properties.

Property Type Description
count int Total orders in collection
data array(Order) List of orders

Sample 200 response

{
  "count": 1,
  "data": [
    {
      "id": 156104,
      "invoice": "lta",
      "po": "yah",
      "time_created": "2018-07-10T17:47:20Z",
      "extra_tracking_number": "48maALrTAHaEAWUmAnC7AZgkA6ZhAc7iAdFBBffsAQj5A"
    }
  ],
  "includes": []
}

Order status

Order statuses

An order may have one of the following statuses:

Name Description
Pending Order pending (not on a manifest)
Held Order held
Voided Order voided
Manifested Order added to a manifest
Dispatched Order dispatched to driver
En Route Driver en route with order
Arrived Driver arrived at location for order
Delivered Order delivered

Order status model

An order status has the following structure.

Property Type Description
order_id int Order ID
invoice string Invoice
po timestamp PO
time_created timestamp Time created
time_invoiced timestamp Time invoiced
time_delivered timestamp Time delivered
on_hold_time_created timestamp Time placed on hold
manifest_id int Manifest ID
driver_name string Driver name
arrival_time timestamp Time arrived
finish_time timestamp Route finish time
time_dispatched timestamp Route dispatch time
start_time timestamp Route start time
vehicle_name string Route vehicle name
business_name string Business name
signer_name string Signer name
employee_id string Employee ID (user-defined)
pod_link url Tracking invoice link
customer_id string Customer ID
status Order status Order status
manifest_name string Manifest name
ob_udid string Customer UDID
stop_number integer Stop number on the route
manually_entered string Order manually entered? (not integrated)

List order status

List order status.

Request format

Query parameter Type Description
recents bool (optional) Limit to changes since last request
limit int (optional) Limit (max: 50)
offset int (optional) Offset
GET
/x/api/orderstatus

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/orderstatus

Response format

Responses have the following properties.

Property Type Description
count int Total orders in collection
data array(Order status) List of orders

Sample 200 response

{
  "count": 2,
  "data": [
    {
      "invoice": "od1",
      "po": "",
      "time_created": "2018-10-10T19:25:01Z",
      "status": "Pending",
      "driver_name": "Tommy",
      "business_name": "Cool Company",
      "signer_name": " ",
      "employee_id": "",
      "pod_link": "https://someservlet.eliteextra.com/action/pod/1261DE3827A38377C1A184AD8EA9D630AE9BFE47F1390B4938090C8978F6FE82"
    },
    {
      "invoice": "LoriTest",
      "po": "",
      "time_created": "2018-10-10T18:50:56Z",
      "time_invoiced": "2018-10-10T18:50:56Z",
      "time_delivered": "2018-10-10T18:50:56Z",
      "on_hold_time_created": "2018-10-10T18:50:56Z",
      "time_dispatched": "2018-10-10T18:50:56Z",
      "start_time": "2018-10-10T18:50:56Z",
      "status": "Pending",
      "driver_name": "Wally",
      "business_name": "Almost as Cool Company",
      "signer_name": "",
      "employee_id": "",
      "pod_link": "https://someservlety.eliteextra.com/action/pod/22FC87AFB4C1448CE9D0C5E2EE45A99DF2271835BC946D1255368331EF602F78",
      "customer_id": "Cus ID",
      "manifest_name": "ASAP Manny",
      "ob_udid": "GGSON",
      "stop_number": 2,
      "manually_entered": false
    }
  ]
}

Order status webhooks

Order status webhooks send real-time order update information to a user-supplied endpoint. They send when an order status changes. This is useful for eCommerce, customer portals, and other systems that would benefits from up-to-date order information.

Webhooks use the POST HTTP method with JSON in the request body. Endpoints may use Basic Authentication for security, this isn't required but is strongly recommended.

Order status webhook model

Property Type Description
id int Webhook's unique ID
enabled bool Is enabled?
url string Target URL template (may include replacements specified in url_template section)
auth_type string Authorization type (basic for basic authentication, or none)
auth Authorization Authorization details (required if auth_type: basic)
url_template URL template Replacements to make in the url template above
transformer Tranformer Rules for defining field names in webhook data
filter Filter Rules for allowing/denying webhook deliveries

Order status webhook authorization object

Property Type Description
basic Credentials Basic auth credentials object

Order status webhook credentials object

Property Type Description
username string Username
password string Password

Order status webhook URL template object

This template defines replacements to the target URL with specific order data. For example, a target URL of https://hostname/orders/%OrderID%, may define a replacement so %OrderID% will be the actual order ID for that webhook.

Property Type Description
mappings Mapper Mapping of field from mapper to what to replace in the URL (like {order_id: "%OrderID%"})

Order status webhook transformer object

This transformer defines field names for the order data in the webhooks. Not defining a field name in the transformer will exclude the field. For example, to include the driver's full name use ({driver_full_name: "driver_full_name"}) or you can specify a custom name ({driver_full_name: "DriverFullName"}).

Property Type Description
mappings Mapper Mapping of field from mapper to name (like {driver_full_name: "DriverFullName"})

Order status webhook filter object

This filter allows or prevents webhooks delivery based on order criteria.

Property Type Description
allowed Mapper Mapping of field from mapper to pattern (regex) to allow (like {status: "(?:Manifested|Delivered)"})
blocked Mapper Mapping of field from mapper to pattern (regex) to deny (like {invoice: "CM.\*"})

Order status webhook mapper object

An order status webhook has the following structure.

Property Type Description
alternate_id string Order alternate ID (typically non-sequential)
box_count int Count of boxes
conference_number int Order conference number (EXTRA order ID)
delivery_eta timestamp Delivery time (or ETA of delivery if undelivered)
requested_time_start timestamp Estimated start time
requested_time_end timestamp Estimated end time
will_call bool Will call
destination_business_id string Destination business ID
destination_business_name string Destination business name
driver_employee_id string Driver employee ID
driver_full_name string Driver full name
driver_first_name string Driver first name
driver_last_name string Driver last name
has_returns bool Set true if any associated return orders
has_stored_images bool Set true if proof of delivery images
has_stored_pods bool Set true if proof of delivery documents
has_stored_signatures bool Set true if proof of delivery signatures
hold_reason string Reason for holding order
images_base64 array(string) List of base64-encoded proof of delivery images
invoice string Order invoice number
last_modified timestamp Order last modified time
last_modified_by string Last user to modify order
last_status_modified timestamp Order last status modified timestamp
manifest_name string Manifest name
manually_entered string Order manually entered? (not integrated)
mark_delivered_reason string Reason for marking order delivered
on_hold_time_created timestamp Order hold created time (if created on hold)
ordered_by_business_id string Ordered by business ID
ordered_by_business_name string Ordered by business name
order_id string Order ID
po string Order PO number
parts_value number Order invoice amount
pod_link string Link to download main proof of delivery document
pods_base64 array(string) List of base64-encoded proof of delivery documents
quantity number Amount of parts
route_finish_time timestamp Route finish time
route_start_time timestamp Route start time
salesperson string Salesperson full name
ship_via string Order ship via
signatures_base64 array(string) List of base64-encoded proof of delivery signatures
signer_first_name string Signer first name
signer_full_name string Signer full name
signer_last_name string Signer last name
skip_reason string Reason for skipping order
source_business_id string Source business ID
source_business_name string Source business name
status Order status Order status
stop_number integer Stop number on the route
time_created timestamp Time created
time_invoiced timestamp Time invoiced
tracking_number string Tracking number
tracking_link string Link to view tracking information
vehicle string Vehicle for delivery
void_reason string Reason for voiding order

List order status webhooks

List order status webhooks.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/order_status_webhooks

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/order_status_webhooks

Response format

Responses have the following properties.

Property Type Description
count int Total order status webhooks in collection
data array(Order status webhook) List of order status webhooks

Sample 200 response

{
  "count": 3,
  "data": [{
    "id": 3,
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    ...
  },
  ...]
}

Create order status webhook

Create a new order status webhook.

Request format

Property Type Description
data Order status webhook Order status webhook
POST
/x/api/order_status_webhooks/{id}

Sample request body

{
  "data": {
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    "auth": {
      "basic": {
        "password": "test_password",
        "username": "test_username"
      }
    },
    "url_template": {
      "mappings": {
        "order_id": "%OrderID%"
      }
    },
    "transformer": {
      "mappings": {
        "order_id": "id",
        "invoice": "invoice",
        "po": "po",
        "status": "status",
        "delivery_eta": "eta"
      }
    },
    "filter": {
      "allowed": {
        "status": "(?:Manifested|Delivered)"
      },
      "blocked": {
        "invoice": "CM.*"
      }
    }
  }
}

Response format

Responses have the following properties.

Property Type Description
data Order status webhook Order status webhook

Sample 200 response

{
  "data": {
    "id": 3,
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic"
    ...
  }
}

Update order status webhook

Update an existing order status webhook by ID.

Request format

Request includes complete order status webhook record.

URL parameter Description
id (required) Order status webhook ID
curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/order_status_webhooks/3
PUT
/x/api/order_status_webhooks/{id}

Sample request body

{
  "data": {
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Order status webhook Order status webhook

Sample 200 response

{
  "data": {
    "id": 3,
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    ...
  }
}

Delete order status webhook

Delete an existing order status webhook by ID.

Request format

Request includes complete order status webhook record.

URL parameter Description
id (required) Order status webhook ID
curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/order_status_webhooks/3
DELETE
/x/api/order_status_webhooks/{id}

Sample request body

{
  "data": {
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Order status webhook Order status webhook

Sample 200 response

{
  "data": {
    "id": 3,
    "enabled": true,
    "url": "https://hostname/orders/%OrderID%",
    "auth_type": "basic",
    ...
  }
}

Order upload

Upload order

Create and update orders. Documentation for this endpoint is also available in OpenAPI 3 format.

For any clarifications on usage or fields, please contact Elite EXTRA support.

Request format

Header Description
Content-Type (required) Content type (application/json)
X-Name (required) Name of file

The request body is application/json.

Requirements:

  • Send one request at a time (avoid concurrent requests)
  • File size must be less than 1 MiB
  • File must use either an ASCII or UTF-8 charset
  • File must contain only one order
  • Filename (X-Name) should use the format YYYYMMDD_HHMMSS_ID.json where ID is the order ID.
POST
/x/api/upload_order

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: application/json" \
     -H "X-Name: filename.json" \
     -d "@/path/to/file.json" \
     https://[site].eliteextra.com/x/api/upload_order

Order object

Property Type Description
id string (required on updates) Unique ID
warehouse Warehouse (required) The warehouse that will be managing the provided order
po string Purchase order number
ship_via string Shipping method to use
invoice string Generic order identifier. Is the main identifier in the user interface.
invoice_time timestamp Order created time
type string I (Invoice) or P (Pickup). P will flip the source and destination to create a pickup
cash_on_delivery bool Should driver collect cash or check payment on delivery?
pay_type string Free text field used to store the payment terms. Example: CHG60, CASHW, NET30, CashWNet30
void_time timestamp Order voided time
print_time timestamp Order printed time
comment string Order comments
instructions string Order instructions
ecommerce_id string ECommerce ID
priority_code string Priority code (requires set up in EliteEXTRA)
manifest_locked_position int Desired stop number. Example, if you supply a 5, this will be stop 5 on a mnifest
held bool Setting true will hold the order
parts int Number of parts
will_call bool Setting true will flag the order as will call
delivery_zone string Delivery zone
route_number string Route ID
manifest_number string Manifest ID
requested_start timestamp Delivery window start time
requested_end timestamp Delivery window end time
load_type string Load type (requires setup in EliteEXTRA). Example: Door
stop_duration int The anticipated total time of the stop in minutes
load_duration int Anticipated time to load in vehicle in minutes
delivered bool Set true when delivered.
delivery_time timestamp Delivery time
weight number Total weight
volume number Total volume
cubes int Cubes count. The most common usage would represent cubic feet or cubic meters that the order occupies
pallets int Pallets count
backorder bool Set true if backordered
hazmat bool Order contains hazardous materials?
postponed bool Set true if postponed
voided bool Setting true will void the order
drop_ship bool True when the order is a drop shipment
notes string Delivery instructions
picked_by string Person who pulled the order. Example: John Doe
caller_name string Person who called in the order
caller_phone string Phone number for person who called in the order
reference_number string Free text order identification field
wait_time string Expected wait time at the stop. HH:mm
price number Sum of all fees or a general invoice amount
cost number Supplier's cost of goods on the order
tax number Tax on the order
deposit number Deposit put down on the order
freight number Freight charge on the order
bill_to Location Location used for billing
ship_to Location Destination of the order
sales_person Salesperson Contact information of the person who sold the order
vehicle Vehicle Suggested vehicle to use for an order
items array(Item) Line items that make up the order

Sample request body

{
  "id": "1234abc",
  "warehouse": {
    "id": "01"
  },
  "po": "1234abcd",
  "ship_via": "north",
  "invoice": "1234abcd",
  "invoice_time": "2015-12-14T09:33:22Z",
  "type": "I",
  "cash_on_delivery": true,
  "pay_type": "CHG60",
  "void_time": "2015-12-14T09:33:22Z",
  "print_time": "2015-12-14T09:33:22Z",
  "ecommerce_id": "123456",
  "comment": "A valuable order",
  "instructions": "Some valuable instructions",
  "priority_code": "A",
  "manifest_locked_position": 1,
  "held": false,
  "parts": 10,
  "will_call": false,
  "requested_start": "2015-12-14T09:33:22Z",
  "requested_end": "2015-12-14T09:33:22Z",
  "load_type": "framing",
  "manifest_number": "the manifest number",
  "delivery_zone": "A really neat delivery zone",
  "route_number": "AFZ123",
  "stop_duration": 30,
  "load_duration": 30,
  "delivered": false,
  "delivery_time": "2015-12-14T09:33:22Z",
  "weight": 123.4,
  "volume": 12.3,
  "cubes": 12,
  "pallets": 12,
  "backorder": true,
  "hazmat": true,
  "postponed": true,
  "voided": false,
  "drop_ship": false,
  "notes": "Deliver by 5 PM; Deliver to back door",
  "picked_by": "John Doe",
  "caller_name": "Jane Doe",
  "caller_phone": "+12122223452",
  "reference_number": "XJC",
  "wait_time": "10:12",
  "price": 99.99,
  "cost": 75.99,
  "tax": 5.99,
  "deposit": 56.99,
  "freight": 22.32,
  "bill_to": {
    "id": "123456",
    "name": "customer name",
    "address_line_1": "1234 First Ave",
    "address_line_2": "Suite 2",
    "city": "Eau Claire",
    "state": "WI",
    "zip": "54703",
    "country": "US",
    "primary_phone": "8884848729",
    "primary_email": "support@eliteextra.com",
    "latitude": 44.885582,
    "longitude": -91.552109,
    "notes": "Closes at 5 PM"
  },
  "ship_to": {
    "id": "123456-001",
    "name": "customer name",
    "address_line_1": "1234 First Ave",
    "address_line_2": "Suite 2",
    "city": "Eau Claire",
    "state": "WI",
    "zip": "54703",
    "country": "US",
    "primary_phone": "8884848729",
    "primary_email": "support@eliteextra.com",
    "latitude": 44.885582,
    "longitude": -91.552109,
    "notes": "Closes at 5 PM"
  },
  "sales_person": {
    "first_name": "John",
    "last_name": "Doe"
  },
  "vehicle": {
    "description": "truck"
  },
  "items": [
    {
      "order_quantity": 1.23,
      "ship_quantity": 1.23,
      "sale_price": 99.99,
      "cost": 75.99,
      "number": "1234abcd",
      "description": "brake pads",
      "weight": 100
    }
  ]
}

Warehouse object

Property Type Description
id string Warehouse location ID
source Location Source of the delivery
destination Location Destination of the delivery
ordered_by Location Ordered by location

Location object

Property Type Description
id string ID or account number of the customer
notes string Notes. Used by driver making deliveries
name string Business name
address_line_1 string Address first line
address_line_2 string Address second line
address_line_3 string Address third line
address_line_4 string Address fourth line
city string City
state string State
zip string Postal code
zip_ext string Postal code extension
country string Country. Example: US
primary_phone phone Internationally formatted phone number. Example: +12213246534
other_phones array(phone) List of internattionally formatted phone numbers
primary_email email Primary email address
latitude number Latitude of the location
longitude number Longitude of the location
priority_code string Priority code of the customer. Examples: 1,2,3 or A
zone string Like shipvia. Examples: North, Zone1
email_eta bool Set true to email ETA
email_proof_of_delivery bool Set true to email proof of deliveries
email_return bool Set true to email returns
text_eta bool Set true to sent ETA text message
stop_duration int Stop duration in minutes
delivery_window int Delivery window in minutes

Vehicle object

Property Type Description
description string Vehicle description

Salesperson object

Property Type Description
first_name string First name
last_name string Last name

Item object

Property Type Description
id string ID
number string Main item product/part number
line_code string Line code
order_quantity number Quantity of items
backorder_quantity number Back order quantity
ship_quantity number Ship quantity
returned_quantity number Amount of items returned
sales_person string Sales person. Example: John Doe
sale_price number Total sale price of the total quantity of items
unit_sale_price number Price per item
unit_core_sale_price number Core sale price per item
cost number Cost of the total quantity of items
unit_cost number Unit cost per item
unit_core_cost number Unit core cost per item
unit_service_charge number Unit service charge per item
unit_size number Unit size
notes string Notes
verified bool Set true when item verified
weight number Weight
voided bool Set true when voided
list_price number List price per item
uom string Unit of measure (like meters or feet, etc.)
description string Item description
line_abbreviation string Line abbreviation
stock_location string Stock location
bin string Bin
employee string Employee
employee_number string Employee number
has_cores bool Has parts to return?
return_reason Return reason Return reason

Return reason object

Property Type Description
name string Name
description string Description

Response format

Responses have the following properties.

Property Type Description
details string Processing message
filename string Filename provided in request
hash string Lowercased MD5 checksum
site string Site uploaded for
tracking string Tracking number
valid bool Valid JSON

Sample 200 response

{
  "details": "Uploaded file",
  "valid": true,
  "site": "my-site",
  "filename": "ABC123.json",
  "tracking": "ABCDE12345",
  "hash": "30wafsdf213awfasdf2q3r"
}

Validate order

Provide the same request data as endpoint to validate an order without creating.

Note: Orders are automatically validated when created. This endpoint is for testing purposes.

POST
/x/api/validate_order

Order upload XML

Upload XML order

Order upload via JSON recommended

Create and update orders via XML.

For any clarifications on usage or fields, please contact Elite EXTRA support.

Request format

Header Description
Content-Type (required) Content type (text/xml)
X-Name (required) Name of file

The request body is text/xml.

Requirements:

  • Send one request at a time (avoid concurrent requests)
  • File size must be less than 1 MiB
  • File must use either an ASCII or UTF-8 charset
  • File must contain only one order
  • Filename (X-Name) should use the format YYYYMMDD_HHMMSS_ID.xml where ID is the order ID.
POST
/x/api/upload_order

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: text/xml" \
     -H "X-Name: filename.xml" \
     -d "@/path/to/file.xml" \
     https://[site].eliteextra.com/x/api/upload_order

Order XML object

Property Type Description
id string (required on updates) Unique ID
warehouse Warehouse (required) Warehouse object that will be managing the provided order
type string I (Invoice) or P (Pickup). P will flip the source and destination to create a pickup
ecommerce_id string Thirty six characters of free text set by the API user to use as desired
po string Purchase order number
invoice Invoice Invoice object
refnum string Free text order identification field
total Total Total object
print Print Print object
requested_start timestamp Delivery window start time
requested_end timestamp Delivery window end time
void_time timestamp Order voided time
voided bool Setting true will void the order
delivery_time timestamp Delivery time
delivered bool Set true when delivered.
backorder bool Set true if backordered
held bool Setting true will hold the order
will_call bool Setting true will flag the order as will call
hazmat bool Order contains hazardous materials?
n_parts int Number of parts
cash_on_delivery bool Should driver collect cash or check payment on delivery?
ship_via Ship via Ship via object
route Route Route object
manifest Manifest Manifest object
sales_person Salesperson Contact information for who sold the order
vehicle Vehicle Suggested vehicle for order
comment string Order comments
instruction string Order instructions
notes string Delivery instructions
delivery_zone string Delivery zone
priority_code string Priority code (requires set up in EliteEXTRA)
locked_position int Desired stop number. Example, if you supply a 5, this will be stop 5 on a mnifest
weight number Total weight
volume number Total volume
cubes int Cubes count. The most common usage would represent cubic feet or cubic meters that the order occupies
pallets int Pallets count
pay_type string Free text field used to store the payment terms. Example: CHG60, CASHW, NET30, CashWNet30
load_type string Load type (requires setup in EliteEXTRA). Example: Door
load_duration int Anticipated time to load in vehicle in minutes
duration int Anticipated total time of the stop in minutes
customer Customer Customer object
detail Detail Order detail

Sample request body

<order id="1234abc">
  <warehouse id = "01"/>
  <type>I</type>
  <ecommerce_id>123456</ecommerce_id>
  <po>1234abcd</po>
  <invoice>
    <number>invoice_number</number>
    <date_time>2007-02-26T11:22:33-04:00</date_time>
  </invoice>
  <refnum>XJC</refnum>
  <total>
      <price>99.99</price>
      <cost>79.99</cost>
      <tax>5.99</tax>
      <deposit>56.99</deposit>
      <freight>22.32</freight>
  </total>
  <print>
    <date_time>2003-02-26T11:22:33-04:00</date_time>
  </print>
  <requested_start>2010-02-26T11:22:33-04:00</requested_start>
  <requested_end>2011-02-26T11:22:33-04:00</requested_end>
  <void_time>2002-02-26T11:22:33-04:00</void_time>
  <voided>false</voided>
  <delivery_time>2014-02-26T11:22:33-04:00</delivery_time>
  <delivered>true</delivered>
  <backorder>true</backorder>
  <held>false</held>
  <will_call>false</will_call>
  <hazmat>true</hazmat>
  <n_parts>10</n_parts>
  <cash_on_delivery>true</cash_on_delivery>
  <ship_via>
    <name>ship_via_name</name>
  </ship_via>
  <route>
    <number>AFZ123</number>
  </route>
  <manifest>
    <number>the manifest number</number>
  </manifest>
  <sales_person>
    <name>
      <first>John</first>
      <last>Doe</last>
    </name>
  </sales_person>
  <vehicle>
    <description>truck</description>
  </vehicle>
  <comment>A valuable order</comment>
  <instruction>A valuable order</instruction>
  <notes>Deliver by 5 PM; Deliver to back door</notes>
  <delivery_zone>A really neat delivery zone</delivery_zone>
  <priority_code>A</priority_code>
  <locked_position>1</locked_position>
  <weight>123.4</weight>
  <volume>12.3</volume>
  <cubes>12</cubes>
  <pallets>12</pallets>
  <pay_type>CHG60</pay_type>
  <load_type>framing</load_type>
  <load_duration>30</load_duration>
  <duration>30</duration>
  <customer>
    <bill_to id = "123456">
      <name>customer name</name>
      <address>
          <line_1>1234 First Ave</line_1>
          <line_2>Suite 2</line_2>
      </address>
      <city>Eau Claire</city>
      <state>WI</state>
      <zip>54703</zip>
      <country>US</country>
      <phone>8884848729</phone>
      <email>support@eliteextra.com</email>
      <latitude>44.885582</latitude>
      <longitude>-91.552109</longitude>
      <notes>Closes at 5 PM</notes>
    </bill_to>
    <ship_to id = "123456-001">
      <name>customer name</name>
      <address>
          <line_1>1234 First Ave</line_1>
          <line_2>Suite 2</line_2>
      </address>
      <city>Eau Claire</city>
      <state>WI</state>
      <zip>54703</zip>
      <country>US</country>
      <phone>8884848729</phone>
      <email>support@eliteextra.com</email>
      <latitude>44.885582</latitude>
      <longitude>-91.552109</longitude>
      <notes>Closes at 5 PM</notes>
    </ship_to>
  </customer>
  <detail>
    <line>
      <order_quantity>1.23</order_quantity>
      <ship_quantity>1.23</ship_quantity>
      <sale_price>99.99</sale_price>
      <cost>75.99</cost>
      <part>
        <number>item_number</number>
        <description>item_description</description>
      </part>
      <weight>100</weight>
    </line>
  </detail>
</order>

Warehouse XML object

Property Type Description
id string Warehouse location ID

Ship Via XML object

Property Type Description
name string Shipping method

Invoice XML object

Property Type Description
number string Generic order identifier. Is main identifier in the user interface
date_time timestamp Order created time

Manifest XML object

Property Type Description
number string Manifest ID

Route XML object

Property Type Description
number string Route ID

Total XML object

Property Type Description
price number Sum of all fees or a general invoice amount
cost number Supplier's cost of goods on the order
tax number Tax on the order
deposit number Deposit put down on the order
freight number Freight charge on the order

Customer XML object

Property Type Description
bill_to Location Location object for billing
ship_to Location Location object of destination

Location XML object

Property Type Description
id string ID or account number of the customer
name string Business name
address Address Address
city string City
state string State
zip string Postal code
country string Country. Example: US
phone phone Internationally formatted phone number. Example: +12213246534
email email Primary email address
latitude number Latitude of the location
longitude number Longitude of the location
notes string Notes. Used by driver making deliveries

Address XML object

Property Type Description
line_1 string Address first line
line_2 string Address second line

Salesperson XML object

Property Type Description
name Name Name object of the person who sold the order to use

Name XML object

Property Type Description
first string First name
last string Last name

Vehicle XML object

Property Type Description
description string Vehicle description

Detail XML object

Property Type Description
line array(Item) A list of line items that make up the order

Item XML object

Property Type Description
id string ID
order_quantity number Quantity of items
ship_quantity number Ship quantity
sale_price number Total sale price of the total quantity of items
unit_core_sale_price number Core sale price per item
cost number Cost of the total quantity of items
unit_core_cost number Unit core cost per item
part Part Part used for the line
weight number Numeric weight

Part XML object

Property Type Description
number string Main item product/part number
description string Free text description of what the item is

Response format

Responses have the following properties.

Property Type Description
details string Processing message
filename string Filename provided in request
hash string Lowercased MD5 checksum
site string Site uploaded for
tracking string Tracking number
valid bool Valid XML

Sample 200 Response

{
  "details": "Uploaded file",
  "valid": true,
  "site": "my-site",
  "filename": "ABC123.xml",
  "tracking": "ABCDE12345",
  "hash": "30wafsdf213awfasdf2q3r"
}

Staff

Staff model

A staff member has the following structure.

Property Type Description
id int Staff ID
dealer_id int (relationship, required) Location ID
pass string (required) Password
login_name string (required) Username
first_name string (required) First name
last_name string (required) Last name
day_phone phone Day phone
biz_phone phone Business phone
other_phone phone Other phone
email email Email
report_dealers array(int) Location IDs allowed access to
edit_dispatch_dealers array(int) Location IDs allowed dispatch access to
pin string PIN for warehouse tracking module (requires warehouse_tracking_access: true)
dashboard_access bool Can view dashboard?
dashboard_stat_access bool Can view site statistics on dashboard? (requires dashboard_access: true)
dispatch_access bool Can dispatch? (requires dashboard_access: true)
order_access bool Can view orders?
order_edit_access bool Can edit orders? (requires order_access: true)
customer_access bool Can view customers?
customer_edit_access bool Can edit customers? (requires customer_access: true)
driver_access bool Can view drivers?
driver_edit_access bool Can edit drivers? (requires driver_access: true)
srun_access bool Can view/edit scheduled runs?
report_access bool Can view reports?
scorecard_access bool Can view site scorecards?
whiteboard_access bool Can view route whiteboards?
will_call_access bool Can view will calls?
will_call_all_dealer_access bool Can view all locations of dealers?
receive_email_alerts bool Can receive email alerts?
pricing_access bool Can view order prices in order lists?
vehicle_access bool Can view/edit vehicles?
warehouse_scan_access bool Can create barcodes for packages on an order?
warehouse_tracking_timeout int Time before user is auto logged out from warehouse tracking
color color Color assigned in warehouse tracking
staff_access bool Can view/edit staff for location?
return_dashboard_access bool Can view returns dashboard?
settings_tab_access bool Can access the site settings?
edit_historical_orders_access bool Can edit historical orders? (requires site setting)
can_approve_non_equal_manifests bool Can approve manifests where the amount received != the expected amount?
removed bool User removed?
view_only bool Limit dispatch access to view only

List staff member

List staff member.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/staff

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/staff

Response format

Responses have the following properties.

Property Type Description
count int Total staff in collection
data array(Staff) List of staff

Sample 200 response

{
  "count": 49,
  "data": [
    {
      "id": 108,
      "dealer_id": 12326,
      "pass": "",
      "login_name": "test1",
      "report_dealers": [
        12326, 3, 4
      ],
      "color": "FFFFFF",
      "dispatch_access": false,
      "order_access": true,
      "customer_edit_access": false
      ...
    }
  ],
  "includes": [

  ]
}

Create a staff member

Create a staff member.

Request format

Property Type Description
data Staff Staff member
POST
/x/api/staff

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/staff

Sample request body

{
  "data": {
    "dealer_id": 9286,
    "pass": "bentlybuddy",
    "login_name": "shaun",
    "first_name": "shaun",
    "last_name": "bently",
    "report_dealers": [
      12324,
      12325,
      9286
    ],
    "dispatch_access": false,
    "order_access": true,
    "customer_edit_access": true,
    "driver_access": false
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Staff Staff member

Sample 200 response

{
    "count": 50,
    "data": {
        "id": 152,
        "dealer_id": 9286,
        "pass": "",
        "login_name": "shaun",
        "first_name": "shaun",
        "last_name": "bently",
        "report_dealers": [
            12324,
            12325,
            9286
        ],
        "dispatch_access": false
        ...
    },
    "includes": []
}

Get staff

Get a staff member by ID.

Request format

URL parameter Description
id (required) Staff member ID
GET
/x/api/staff/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/staff/92

Response format

Responses have the following properties.

Property Type Description
data Staff Staff member
includes object Included relationships

Sample 200 response

{
  "count": 49,
  "data": {
    "id": 92,
    "dealer_id": 9286,
    "pass": "",
    "login_name": "townsendb",
    "first_name": "Brian",
    "last_name": "Townsend",
    "report_dealers": [
      12324,
      12325,
      9286
    ],
    "dispatch_access": false,
    "order_access": true,
    "customer_edit_access": true,
    "driver_access": false,
    "srun_access": false
    ...
  },
  "includes": [

  ]
}

Update staff

Update a staff by ID.

Request format

Request includes complete Staff record.

URL parameter Description
id (required) Staff ID
PUT
/x/api/staff/{id}

Sample request

curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/staff/92

Sample request body

{
  "data": {
    "dealer_id": 9286,
    "pass": "password",
    "login_name": "name",
    "first_name": "name",
    "last_name": "name",
    "report_dealers": [
      12324,
      12325,
      9286
    ],
    "dispatch_access": false
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Staff Staff member

Sample 200 response

{
  "count": 49,
  "data": {
    "id": 92,
    "dealer_id": 9286,
    "pass": "",
    "login_name": "name",
    "first_name": "name",
    "last_name": "name",
    "report_dealers": [
      12324,
      12325,
      9286
    ]
    ...
  },
  "includes": [

  ]
}

Delete staff

Delete a staff by ID.

Request format

URL parameter Description
id (required) Staff member ID
DELETE
/x/api/staff/{id}

Sample request

curl -u john:doe -X DELETE https://[site].eliteextra.com/x/api/staff/92

Response format

Successful deletion will return a 200 OK status code.

Vehicles

Vehicle model

A vehicle has the following structure.

Property Type Description
id int Vehicle ID
dealer_id int (relationship, required) Dealer
rate_id int (relationship) Rate
fuel_id int (relationship) Fuel
vehicle string (required) Vehicle name
schedulable_asset bool (required) Part of asset scheduler?
courier bool Is courier?
last_service_date timestamp Last service
max_cubes int Cube capacity
max_pallets int Pallet capacity
odometer number Odometer
out_of_commission bool Out of commission?
payload_capacity number Weight capacity
plate_number string License plate number
vehicle_udid string User-defined ID
vin string Vehicle identification number
volume number Volume of cargo space
weight number Empty weight
dispatchers array(int) Dispatcher IDs associated with the vehicle

List vehicles

List vehicles.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/vehicles

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/vehicles

Response format

Responses have the following properties.

Property Type Description
count int Total vehicles in collection
data array(Vehicle) List of vehicles

Sample 200 response

{
  "count": 45,
  "data": {
    "id": 31,
    "courier": true,
    "dealer_id": 2,
    "ending_time": "19:00:00",
    "fuel": "Diesel"
    ...
  }
}

Create vehicle

Create a vehicle.

Request format

Property Type Description
data Vehicle Vehicle
POST
/x/api/vehicles

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/vehicles

Sample request body

{
  "data": {
    "vehicle": "New vehicle",
    "fuel": "Diesel",
    "last_service_date": "2006-01-01T00:00:00.000Z"
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Vehicle Vehicle

Sample 200 response

{
  "data": {
    "id": 31,
    "vehicle": "New vehicle",
    "fuel": "Diesel",
    "last_service_date": "2006-01-01T00:00:00.000Z"
    ...
  }
}

Get vehicle

Get a vehicle by ID.

Request format

URL parameter Description
id (required) Vehicle ID
Query parameter Description Possible values
include (optional) Relationships to include; comma-separated dealers, rates
GET
/x/api/vehicles/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/vehicles/31?include=dealer,rate

Response format

Responses have the following properties.

Property Type Description
data Vehicle Vehicle
includes object Included relationships

Sample 200 response

{
  "data": {
    "id": 31,
    "courier": true,
    "dealer_id": 2,
    "ending_time": "19:00:00",
    "fuel": "Diesel"
    ...
  },
  "includes": [{
    "type": "dealers",
    "data": [{
      "id": 2
      ...
    }]
  }, {
    "type": "rates",
    "data": [{
      "id": 39
      ...
    }]
  }]
}

Update vehicle

Update a vehicle by ID.

Request format

Request includes complete Vehicle record.

URL parameter Description
id (required) Vehicle ID
PUT
/x/api/vehicles/{id}

Sample request

curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/vehicles/31

Sample request body

{
  "data": {
    "id": 31,
    "courier": true,
    "dealer_id": 2,
    "ending_time": "19:00:00",
    "fuel": "Unleaded"
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Vehicle Vehicle

Sample 200 response

{
  "count": 64,
  "data": {
    "id": 31,
    "dealer_id": 2,
    "rate_id": 3,
    "vehicle": "New Vehicle",
    "fuel": "Unleaded"
    ...
  }
}

Delete vehicle

Delete a vehicle by ID.

Request format

URL parameter Description
id (required) Vehicle ID
DELETE
/x/api/vehicles/{id}

Sample request

curl -u john:doe -X DELETE https://[site].eliteextra.com/x/api/vehicles/31

Response format

Successful deletion will return a 200 OK status code.

Vehicle rates

Vehicle rate model

A rate has the following structure.

Property Type Description
id int Rate ID
rate number (required) Rate
wait_time_rate number Rate while not in use

List vehicle rates

List vehicle rates.

Request format

Query parameter Description
limit (optional) Limit
offset (optional) Offset
GET
/x/api/vehiclerates

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/vehiclerates

Response format

Responses have the following properties.

Property Type Description
count int Total rates in collection
data array(Vehicle) List of vehicle rates

Sample 200 response

{
  "count": 45,
  "data": [{
    "id": 31,
    "rate": 2.0,
    "wait_time_rate": 2.0
    ...
  }, ...]
}

Create rate

Create a vehicle rate.

Request format

Property Type Description
data Rate Rate
POST
/x/api/vehiclerates

Sample request

curl -u john:doe \
     -X POST \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/rates

Sample request body

{
  "data": {
    "rate": 2.0,
    "wait_rate_time": 2.0
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Rate Rate

Sample 200 response

{
  "data": {
    "id": 31,
    "rate": 2.0,
    "wait_time_rate": 2.0
    ...
  }
}

Get rate

Get a rate by ID.

Request format

URL parameter Description
id (required) Rate ID
GET
/x/api/vehiclerates/{id}

Sample request

curl -u john:doe https://[site].eliteextra.com/x/api/vehiclerates/31

Response format

Responses have the following properties.

Property Type Description
data Rate Rate

Sample 200 response

{
  "data": {
    "id": 31,
    "rate": 2.0,
    "wait_time_rate": 2.0
    ...
  }
}

Update rate

Update a rate by ID.

Request format

Request includes complete Rate record.

URL parameter Description
id (required) Rate ID
PUT
/x/api/vehiclerates/{id}

Sample request

curl -u john:doe \
     -X PUT \
     -H "Content-Type: application/json" \
     -d "<insert body here>" \
     https://[site].eliteextra.com/x/api/rates/31

Sample request body

{
  "data": {
    "id": 31,
    "rate": 2.0,
    "wait_time_rate": 4.0
    ...
  }
}

Response format

Responses have the following properties.

Property Type Description
data Rate Rate

Sample 200 response

{
  "data": {
    "id": 31,
    "rate": 2.0,
    "wait_time_rate": 4.0
    ...
  }
}

Delete vehicle rate

Delete a vehicle rate by ID.

Request format

URL parameter Description
id (required) Vehicle ID
DELETE
/x/api/vehiclerates/{id}

Sample request

curl -u john:doe -X DELETE https://[site].eliteextra.com/x/api/vehiclerates/31

Response format

Successful deletion will return a 200 OK status code.