Listing and Pagination
The orders endpoint allows you to retrieve your orders with support for pagination using an offset. This enables you to efficiently navigate through large sets of orders. The endpoint supports per_page and offset query parameters. To retrieve orders with pagination, you must provide a valid API key.
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, paginationAs you can see, the response returns an orders, and pagination object. The orders object contains the list of your orders, and pagination contains two values: per_page, and next_offset.
Retrieving a paginated list of orders
If you want to load more orders with a pagination (next batch of orders without the initial orders that you've already fetched), you will need to use the next_offset value in your next request.
Specification
Lists the orders for the current user with optional search and sorting.
Query Parameters:
- q: Free-text search term applied to order name
- sort: Sorting key (name, -name, date, -date). Defaults to -date (most recent first)
- offset: Pagination offset token
- per_page: Number of items per page
The offset token used to indicate which page of results to use.
0The amount of items to be loaded per page of results. The final response may have a smaller number than requested if too large.
5Free-text search term applied to order name. If omitted or empty, no search filter is applied.
nullSorting key with optional '-' prefix for descending order. Allowed values: 'name' (sort by name ascending), '-name' (sort by name descending), 'date' (sort by created_at ascending), '-date' (sort by created_at descending). If omitted or invalid, defaults to '-date' (most recent first).
-dateSuccessful response
Authentication error
Validation error
GET /v3/orders/ HTTP/1.1
Host: api:8080
x-api-key: YOUR_API_KEY
Accept: */*
{
"orders": [
{
"created_at": "2026-01-01T00:00:00.000Z",
"default_image_sort_order": "name",
"images": [
{
"ai_version": "text",
"cloud_type": "CLEAR",
"date_added": 1,
"downloaded": true,
"enhance": true,
"enhance_type": "property",
"finetune_settings": {},
"image_id": "123e4567-e89b-12d3-a456-426614174000",
"image_name": "text",
"lens_correction": true,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"order_id": null,
"parent_image_id": "text",
"preset_id": null,
"preset_version": null,
"privacy": true,
"rating": 1,
"restage": {
"fire_in_fireplaces": "AS_SHOT",
"grass": "AS_SHOT",
"photographer": "AS_SHOT",
"sky": "AS_SHOT",
"tvs": "AS_SHOT"
},
"scene": "text",
"sky_replacement": true,
"status": null,
"status_reason": null,
"tripod_hide": true,
"upscale": true,
"user_id": null,
"vertical_correction": true,
"window_pull_type": "NONE",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"is_deleted": true,
"is_merging": true,
"is_processing": true,
"last_updated_at": "2026-01-01T00:00:00.000Z",
"name": "text",
"order_id": "text",
"status": null,
"total_images": 1
}
],
"pagination": {
"next_offset": "text",
"per_page": 5
}
}Last updated
Was this helpful?