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 paginated summary of all orders submitted (regardless of API) in a given date range. The response returns order number, branch number and location, invoice date, order type, order status, and the number of line items in the order.

order API

Get Order History

GET /orders/orderHistory

Get order history by date range

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

Query Parameters for Get Order History

Name

Type

Description

startDate

string

The earliest date requested for orders in response, based on order creation date, formatted as YYYY-MM-DD (e.g., 2024-01-31).

endDate

string

The latest date requested for orders in response, based on order creation date, formatted as YYYY-MM-DD (e.g., 2024-12-31).

itemsPerPage

integer

The number of items per page to return in the response.

pageNumber

integer

The requested page number to return in the response.

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": 1,
        "pageNumber": 1,
        "totalPages": 80,
        "totalItems": 80
    },
    "items": [
        {
            "orderNumber": "2000009329",
            "branch": 241,
            "branchCityState": "Waldorf, MD",
            "invoiceDate": "2024-12-13T00:00:00Z",
            "orderType": "Will Call",
            "orderStatus": "In Progress",
            "productQty": 2
        }
    ]
}
Expand

Name

Type

Description

pagination

object

The object describing the pagination details.

pagination.itemsPerPage

integer

The number of items per page of the response.

pagination.pageNumber

integer

The current page number returned in the response.

pagination.totalPages

integer

The total number of pages meeting the request criteria.

pagination.totalItems

array

The total number of items meeting the request criteria.

items

string

The list of orders meeting the request criteria.

items[].orderNumber

integer

The ABC Supply order number.

items[].branch

string

The ABC Supply branch where the order was placed.

items[].branchCityState

string

The ABC Supply branch city and state.

items[].invoiceDate

string

The date the order was invoiced, if applicable.

items[].orderType

string

The order type for the order (e.g., “Delivery”, “Will Call”).

items[].orderStatus

string

The current status of the order (e.g., “Requested”, “In Progress”, “Completed”).

items[].productQty

integer

The number of line items in the order. (This value does not reflect the individual quantities of items ordered.)

HTTP Status Codes

Code

Status

Description

400

Bad Request

  • Confirm the startDate and endDate are in the correct order, are formatted correctly, and are valid dates.
  • Confirm the itemsPerPage are positive, non-zero integers.

502

Bad Gateway

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

500

Internal Server Error

System is unavailable.