Skip to content

Retrieve a list of orders

Request

Retrieves details for a bulk of orders that have been submitted within a given time range and optionally by order status or customer.

Path
partnerstringrequired

This is the partner code provided to you during onboarding. e.g. metamask.

Query
startstring, (date-time)required

The start date of the dataset in UTC. This is inclusive: orders created at this exact date will be included.

Example:start=2022-08-22T09:10:43.724Z
endstring, (date-time)required

The end date of the dataset in UTC. This is inclusive: orders created at this exact date will be included.

Example:end=2022-08-22T09:10:43.724Z
skipinteger

The number of orders to skip in the dataset.

Example:skip=0
pageinteger

The page of orders that are returned.

Example:page=1
externalCustomerIdstring

Indicates the customer identifier that was used when creating the order. Orders will be filtered based on orders made by this customer.

Example:externalCustomerId=user_12345
statusstring

Filter by order status. Pass a comma-separated list for more than one status. See Order statuses.

Example:status=pendingPayment,complete
limitinteger

The limit of orders that are returned. If not provided, then default to 100 records.

Default:100
Example:limit=100
Headers
Acceptstring
Default:"application/json"
x-api-keystring

This is the API Key that has been provided to you during onboarding.

Example:YOUR_API_KEY
curl -i -X GET \
  'https://docs.banxa.com/_mock/products/hosted-checkout/openapi/{partner}/v2/orders?start=2022-08-22T09%3A10%3A43.724Z&end=2022-08-22T09%3A10%3A43.724Z&skip=0&page=1&externalCustomerId=user_12345&status=pendingPayment%2Ccomplete&limit=100' \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

Orders matching the query.

Bodyapplication/json
ordersArray of objects
pageTotalinteger
Default:0
Example:100
totalinteger
Default:0
Example:2654
Response
{ "orders": [ { … }, { … } ], "pageTotal": 100, "total": 2654 }