orders-api (1.0)

Download OpenAPI specification:Download

Your GET endpoint

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

patch-orders-v2-order-key

path Parameters
key
required
string
Request Body schema: application/json
object
object

Appearance properties may affect the way an order appears on a map or other UI elements.

id02
string

A secondary order identifier. The primary Order ID still must be unique (per branch).

type
string

An optional type specification for orders. Type is generally left empty.

There is currently only one "special" type of order: refuel points.

object (ShippingAddress)

Describes a shipping location for the order. A shipping location is always stored against an Account. Shipping locations can be given optional aliases.

In the event that a provided "key" is undefined, null, 0, or negative, the shipping address will be "upserted" as either a new shipping address or an update to an existing shipping address.

Responses

Request samples

Content type
application/json
{
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

put-orders-v2-order-key

path Parameters
key
required
string
Request Body schema: application/json
object
object

Appearance properties may affect the way an order appears on a map or other UI elements.

id02
string

A secondary order identifier. The primary Order ID still must be unique (per branch).

type
string

An optional type specification for orders. Type is generally left empty.

There is currently only one "special" type of order: refuel points.

object (ShippingAddress)

Describes a shipping location for the order. A shipping location is always stored against an Account. Shipping locations can be given optional aliases.

In the event that a provided "key" is undefined, null, 0, or negative, the shipping address will be "upserted" as either a new shipping address or an update to an existing shipping address.

Responses

Request samples

Content type
application/json
{
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

delete-orders-v2-order-key

path Parameters
key
required
string

Responses

post-orders-v2-order

Request Body schema: application/json
id
string

Leave the ID empty in order to have the system auto-generate a unique order ID for the given branch.

accountKey
required
number
branchKey
required
number
object
object

Appearance properties may affect the way an order appears on a map or other UI elements.

id02
string

A secondary order identifier. The primary Order ID still must be unique (per branch).

type
string

An optional type specification for orders. Type is generally left empty.

There is currently only one "special" type of order: refuel points.

object (ShippingAddress)

Describes a shipping location for the order. A shipping location is always stored against an Account. Shipping locations can be given optional aliases.

In the event that a provided "key" is undefined, null, 0, or negative, the shipping address will be "upserted" as either a new shipping address or an update to an existing shipping address.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "accountKey": 0,
  • "branchKey": 0,
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

Your GET endpoint

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "id": "string",
  • "branchKey": 0,
  • "status": "active",
  • "location": {
    },
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

put-orders-v2-account-key

path Parameters
key
required
string
Request Body schema: application/json
name
string

A human-readable name for the account. If left empty, the ID will fill this field.

object
object
object

Represents contact information for the account.

object (FieldConfig)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "id": "string",
  • "branchKey": 0,
  • "status": "active",
  • "location": {
    },
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

patch-orders-v2-account-key

path Parameters
key
required
string
Request Body schema: application/json
name
string

A human-readable name for the account. If left empty, the ID will fill this field.

object
object
object

Represents contact information for the account.

object (FieldConfig)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "id": "string",
  • "branchKey": 0,
  • "status": "active",
  • "location": {
    },
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

delete-orders-v2-account-key

path Parameters
key
required
string

Responses

post-orders-v2-orders-import

Request Body schema: application/json
Array
One of
id
required
string

The unique (global) identifier for this order.

branchId
required
string
required
object (ILocation)

Address and Coordinates for an entity's location

required
object (ImportAccountBase)
required
Array of objects (ImportOrderLineItem)
reservationId
string
forecastBy
string
object

Presentation properties for the order.

required
object
command
string
Enum: "delete" "upsert"

Responses

Request samples

Content type
application/json
[
  • {
    }
]

post-orders-v2-order-key-duplicate

path Parameters
key
required
string
query Parameters
id
string

An optional ID to use for the duplicated order. The ID provided must be unique. If no ID is provided, the server will auto-generate an ID based on the original order's ID.

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

Your GET endpoint

query Parameters
startDate
string <date-time>

Starting date/time range in UTC.

endDate
string <date-time>

Starting date/time range in UTC.

dateKind
string
Default: "plannedStart"
Enum: "plannedStart" "modifiedDate" "shipDate"

Specifies the criteria by which date matching will occur.

ShipDate matches orders where the ERP-specified estimated ship date matches the search range.

PlannedStart matches orders where the order's planned arrival time matches the search criteria. If an order is not scheduled on a route, the criteria will utilize the order's estimated ship date.

ModifiedDate matches an order based on its ModifiedDateTime.

offset
integer
Default: 0
limit
integer
Default: 50
branchKey
integer

Constrains the search to a particular branch. If no branch is provided, the search will constrain itself to branches the authenticated user has access to.

accountName
string

Matches orders where account name starts with the value requested

accountId
string

Matches order where the account ID starts with the value requested.

orderId
string

Matches orders where the order ID starts with the value provided

address
string

Matches orders where the shipping address is equivalent to the requested address.

city
string

Matches orders where the shipping city is equivalent to the value in the request

zip
string

Matches orders where the shipping postal code is equivalent to the value requested.

keys
array

Searches for orders by an array of keys. If this criteria is used, then all other operators aside from branch are ignored (including pagination).

status
string
Enum: "unloaded" "scheduled" "delivered" "all"

Matches orders based on their status

violated
boolean
Default: "false"

If true, will only match orders that have window violations.

accountKey
integer

Matches orders for a particular account. Date ranges do not need to be specified. Pagination operators are still in effect.

sort
string
Enum: "date" "id" "accountId" "accountName" "routeName"

Sorts the resultant query by the specified conditions.

Conditions are given in the following parameterized format: [+/-]{field},[+/-]{field},...

  • = Ascending
  • = Descending Default if no +/- is provided is ascending (+).

Example:

+Name,-Created

Responses

Response samples

Content type
application/json
[
  • {
    }
]

post-orders-v2-orders

Request Body schema: application/json
Array
id
string

Leave the ID empty in order to have the system auto-generate a unique order ID for the given branch.

accountKey
required
number
branchKey
required
number
object
object

Appearance properties may affect the way an order appears on a map or other UI elements.

id02
string

A secondary order identifier. The primary Order ID still must be unique (per branch).

type
string

An optional type specification for orders. Type is generally left empty.

There is currently only one "special" type of order: refuel points.

object (ShippingAddress)

Describes a shipping location for the order. A shipping location is always stored against an Account. Shipping locations can be given optional aliases.

In the event that a provided "key" is undefined, null, 0, or negative, the shipping address will be "upserted" as either a new shipping address or an update to an existing shipping address.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Your GET endpoint

path Parameters
key
required
string
query Parameters
offset
string
Default: "0"
limit
string
Default: "100"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Your GET endpoint

query Parameters
id
string

Searches for order audits by a particular ID. (Useful if the order was deleted)

branchKey
integer
offset
integer
limit
integer
startDate
string <date-time>
endDate
string <date-time>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Your GET endpoint

path Parameters
key
required
string
query Parameters
offset
integer
Default: 0
limit
integer
Default: 100

Responses

Response samples

Content type
application/json
[
  • {
    }
]

put-orders-v2-account-key-shipping-addresses

Upserts a shipping address for the given account.

The system will look for an entry that matches (address, city, state, zip).

If a match is found, the coordinates (latitude/longitude) will be updated, as well as any typographical details (e.g. capitalization).

If no match is found, a new shipping address is created.

If the alias sent is populated, but that alias is already being used, the system will validate that the address information matches like above. If the alias is already in-use and the address information differs, then the system will return a bad request.

path Parameters
key
required
string
Request Body schema: application/json
object (ILocation)

Address and Coordinates for an entity's location

alias
string

An optional name for the shipping address.

Responses

Request samples

Content type
application/json
{
  • "location": {
    },
  • "alias": "string"
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

post-orders-v2-account-key-shipping-addresses

path Parameters
key
required
string
Request Body schema: application/json
Array
object (ILocation)

Address and Coordinates for an entity's location

alias
string

An optional name for the shipping address.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Your GET endpoint

path Parameters
key
required
string
shippingKey
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

put-orders-v2-account-key-shipping-address-key

path Parameters
key
required
string
shippingKey
required
string
Request Body schema: application/json
object (ILocation)

Address and Coordinates for an entity's location

alias
string

An optional name for the shipping address.

Responses

Request samples

Content type
application/json
{
  • "location": {
    },
  • "alias": "string"
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

delete-orders-v2-account-key-shipping-address-key

path Parameters
key
required
string
shippingKey
required
string
query Parameters
force
boolean

Responses

Your GET endpoint

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

delete-orders-v2-order-key-ship-to

path Parameters
key
required
string

Responses

put-orders-v2-order-key-ship-to

Changes the order's shipping address to a given shipping address.

The client may pass in an object with a key corresponding to an existing shipping address. The shipping address provided must belong to the account associated with the order.

The client may also pass a full Shipping Address (with the key being undefined, null, 0, etc.) The address information given will attempt to be matched to an existing shipping address corresponding to the order's account, or a new shipping address will be created.

path Parameters
key
required
string
Request Body schema: application/json
One of
key
integer

Responses

Request samples

Content type
application/json
Example
{
  • "key": 0
}

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

post-orders-v2-order-key-geocode

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "orderId": "string",
  • "status": "unloaded",
  • "stopKey": 0,
  • "accountKey": 0,
  • "info": {
    },
  • "delivery": {
    },
  • "account": {
    },
  • "lines": [
    ],
  • "routing": {
    },
  • "display": {
    },
  • "id02": "string",
  • "type": "string",
  • "shipping": {
    }
}

post-orders-v2-account-key-geocode

path Parameters
key
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "id": "string",
  • "branchKey": 0,
  • "status": "active",
  • "location": {
    },
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    }
}

post-orders-v2-account-key-shipping-address-key-geocode

path Parameters
key
required
string
shippingKey
required
string

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

Your GET endpoint

query Parameters
offset
integer
Default: 0
limit
integer
Default: 100
accountId
string

Search accounts based on account ID's starting with the given value

name
string

Search accounts where the name starts with the given value

accountIdOrName
string

Search accounts where the ID or the name start with the given value

precision
string

Search for accounts where the precision (or geocode result) is equal to a given value.

branchKey
integer

Constrains the account search to the given branch key. If no key is provided, then the account search will apply to all branches authorized to the consumer.

accountKeys
array

Matches to a list of account keys to return. This invalidates most other query parameters.

activeUnscheduledOnly
boolean
Default: "false"

Constrains the search to accounts which are unscheduled (not assigned to any master routes) but whose status is Active.

sort
string

Sorts the resultant query by the specified conditions.

Conditions are given in the following parameterized format: [+/-]{field},[+/-]{field},...

  • = Ascending
  • = Descending Default if no +/- is provided is ascending (+).

Example:

+Name,-Created

Responses

Response samples

Content type
application/json
[
  • {
    }
]

post-orders-v2-accounts

Request Body schema: application/json
name
string

A human-readable name for the account. If left empty, the ID will fill this field.

object
object
object

Represents contact information for the account.

object (FieldConfig)
id
string

The primary identifier for the account.

branchKey
integer

The branch the account will be associated with.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "routing": {
    },
  • "config": {
    },
  • "contact": {
    },
  • "fields": {
    },
  • "id": "string",
  • "branchKey": 0
}

Response samples

Content type
application/json
[
  • {
    }
]

Your GET endpoint

query Parameters
limit
integer
offset
integer
sort
string
sortDir
string
accountId
string

Filters shipping address to entries where the account ID starts with the requested value.

accountName
string

Filters shipping addresses to entries where the name of the account starts with the value requested.

accountIdOrName
string

Filters shipping address entries where either the account ID or name starts with the value requested.

city
string

Filters shipping address entries to cases where the city is equal to the value requested.

state
string

Filters shipping address entries to cases where the state is equal to the value requested.

precision
string

Filters shipping address entries based on their geo-coding result.

branchKey
string

Constrains results to a particular branch. If no key is provided, the results will search across all authorized branches.

Responses

Response samples

Content type
application/json
{
  • "key": 0,
  • "accountKey": 0,
  • "sameAsAccount": true,
  • "location": {
    },
  • "alias": "string"
}

post-orders-v2-accounts-import

Request Body schema: application/json
Array
any

Responses

Request samples

Content type
application/json
[
  • null
]