Order API

Order materials and track orders and deliveries within your system. Retrieve order details and the status of upcoming deliveries to keep your team on track and your customers informed in real time.

The Get Order History endpoint returns a summarized version of all orders submitted (regardless of API) in a given time range. The response returns Order Number, Branch No, City, State, Invoice Date, Order Type, Order status, and number of products contained in the order.

order API

Get Order History

GET /orders/orderHistory

Get all orders (Order History)

Authorization

For Individuals and Businesses, use OAuth 2.0 server or user token with the order.read scope.

For Third-Party Aggregators, use OAuth 2.0 user token with the order.read scope.

Request

Get Order History (with Start date and End Date)

Parameter

Value

startDate

The starting date to delimit the time range for the Order History retrieval.

endDate

The end date to delimit the time range for the Order History retrieval.

itemsPerPage

The Number of Orders to return per page (pagination).

pageNumber

The page number to return (pagination).

Example Request

GET /api/order/v2/orders/orderHistory?startDate=2024-03-15&endDate=2024-06-15&itemsPerPage=20&pageNumber=1 HTTP/1.1
Host: partners.abcsupply.com
Authorization: Bearer <TOKEN>
Expand

Response

Example Response

{
"pagination": {
        "itemsPerPage": 20,
        "pageNumber": 1,
        "totalPages": 1,
        "totalItems": 1
    },
    "items":[
    {
      "orderNumber": "97211",
      "branch": 18,
      "branchCityState": "Madison, WI",
      "invoiceDate": "9999-12-31T23:59:59Z",
      "orderType": "Delivery",
      "orderStatus": "Requested",
      "productQty": 2
    },
   {
      "orderNumber": "97212",
      "branch": 18,
      "branchCityState": "Madison, WI",
      "invoiceDate": "9999-12-31T23:59:59Z",
      "orderType": "Delivery",
      "orderStatus": "Requested",
      "productQty": 2
    }
    
  ]
}
Expand

Name

Type

Description

orderNumber

string

Identifier for the Order.

branch

int

Branch Number corresponding to the Order.

branchCityState

string

Branch City and State.

invoiceDate

string

Also known as OrderDateTime, the date when the order was made.

orderType

string

Describes the Type of Order, i.e. Delivery.

orderStatus

string

Describes the Order Status, i.e. Requested.

productQty

int

Number of Products in a given Order.

HTTP Status Codes

Name

Type

Description

400

string

Bad Request – Invalid JSON.

401

string

The account/shipTo provided does not have access to the requested data. Please try again with a different account.

404

string

Object not found.

503

string

Get order service is not available.

500

string

Server error.

Additional Examples

N/A