List Orders

Retrieves information for all orders placed by the Company user. Filter the order list using parameters. Common use cases include: - Retrieving orders placed within a specific date range (using `beginDateAt` and `endDateAt`) - Retrieving orders with a specific Purchase Order (PO) number - Retrieving orders in a specific status Use [Get Order Details](#get-order-details) to retrieve more detailed information about a specific order, such as product attributes, shipping method, and granular pricing. Equivalent Storefront GraphQL API Query: `allOrders`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

Authentication

AuthorizationBearer
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section[...]

Query parameters

beginDateAtdatetimeOptional

Enter a date in %m/%d/%Y format to retrieve all orders placed after that time. If the parameter is not included in the request, the resposne includes orders placed 30 days before the current date.

endDateAtdatetimeOptional

Enter a date in %m/%d/%Y format to retrieve all orders placed before that time. If the parameter is not included in the request, the current date is used.

orderByenumOptionalDefaults to createdAt
Sorts results by total value including tax or creation date. It defaults to the creation date if no parameter is provided.
Allowed values:
sortByenumOptionalDefaults to DESC
Establish a descending or ascending order of results. The order defaults to descending if the parameter is not included.
Allowed values:
offsetintegerOptionalDefaults to 0
The number of results to skip before returning the first result. If left blank, this defaults to 0.
limitintegerOptionalDefaults to 10
Determines the number of records to return per page. If left blank, this defaults to 10.
isShowMyenumOptional
Indicates whether or not to include orders placed by other buyers in the Company account. `0` indicates that only orders placed by the authenticated user are returned, while `1` indicates that orders placed by other buyers in the Company account are also included. **Note:** This is only supported if you have generated a storefront authToken for a Company user in the predefined **Admin** or **Senior Buyer** role. Junior Buyers, as well as custom buyer roles, are not compatible with this parameter.
Allowed values:
includeExtraenumOptional

Indicates whether or not extra field information is included in the response. It defaults to including extra fields if the parmeter is omitted. 0 indicates that extra fields are included, while 1 indicates that extra fields are not included.

Allowed values:
qstringOptional

Enter order information to return partial and exact matches. Accepted information fields include order ID, order status name, Purchase Order (PO) number, and total order value including tax.

companyNamestringOptional
Enter a full or partial Company name to retrieve relevant orders.
orderNumberintegerOptional

The BigCommerce order ID. This parameter does not accept the B2B Edition order ID returned in certain Server to Server Orders endpoints.

poNumberstringOptional

The order’s Purchase Order (PO), if used.

status[]stringOptional
Enter the original order status name to return orders in that status. This parameter does not accept custom order status names or status codes as valid values. See [Order Statuses](/developer/api-reference/rest/admin/management/orders/order-status) for a complete list of accepted status names. This parameter is not an array, but you can filter for multiple order statuses by including additional status[] parameters in the query. For example, `?status[]=Awaiting Payment&status[]=Completed`.

Response

OK
dataobject
codeintegerDefaults to 200
HTTP Response Code
messagestringDefaults to SUCCESS