Listing and Pagination
Retrieving a list of orders with a set per page limit
const apiKey = "YOUR_API_KEY";
const perPage = 16;
const getOrders = async (perPage, apiKey) => {
const getOrdersResponse = await fetch(
`https://api.autoenhance.ai/v3/orders?per_page=${perPage}`,
{
method: "GET",
headers:{
"x-api-key": apiKey,
}
}
);
const { orders, pagination } = await getOrdersResponse.json();
}import requests
api_key = "YOUR_API_KEY"
per_page = 16
def get_orders(per_page, api_key):
url = f"https://api.autoenhance.ai/v3/orders?per_page={per_page}"
headers = {
"x-api-key": api_key
}
response = requests.get(url, headers=headers)
response_data = response.json()
orders = response_data.get('orders')
pagination = response_data.get('pagination')
return orders, paginationRetrieving a paginated list of orders
Specification
Lists the orders for the current user.
Authorizations
x-api-keystringRequired
Query parameters
offsetstringOptionalDefault:
The offset token used to indicate which page of results to use.
0per_pageinteger · max: 15OptionalDefault:
The amount of items to be loaded per page of results. The final response may have a smaller number than requested if too large.
5Responses
200
Successful response
application/json
401
Authentication error
application/json
422
Validation error
application/json
get
/v3/orders/Last updated
Was this helpful?