API and AuthenticationClient API
List Orders
Retrieve the authenticated customer's order history
List Orders
Returns a paginated list of orders for the authenticated customer.
Endpoint
GET /ordersAuthentication
Requires a valid JWT access token.
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of orders to return (1 to 100) |
cursor | string | - | Order ID to paginate from (use nextCursor from previous response) |
status | string | - | Filter by order status |
Status Values
| Status | Description |
|---|---|
pending | Order has been placed but not yet processed |
processing | Order is being fulfilled |
completed | Order is complete |
cancelled | Order was cancelled |
refunded | Order was refunded |
Example Request
curl -X GET "https://edge.tiquo.app/api/client/v1/orders?limit=10&status=completed" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."Response
{
"success": true,
"data": {
"orders": [
{
"id": "order_123",
"orderNumber": "ORD-001234",
"status": "completed",
"paymentStatus": "paid",
"total": 99.99,
"subtotal": 89.99,
"taxTotal": 10.00,
"discountTotal": 0,
"items": [],
"createdAt": 1706576400000,
"completedAt": 1706580000000,
"customerRole": "primary"
}
],
"hasMore": true,
"nextCursor": "order_122"
}
}Order Object
| Field | Type | Description |
|---|---|---|
id | string | Order document ID |
orderNumber | string | Human-readable order number (e.g. ORD-001234) |
status | string | Order status (see values above) |
paymentStatus | string | One of: pending, paid, failed, refunded |
total | number | Total order amount |
subtotal | number | Subtotal before tax |
taxTotal | number | Tax amount |
discountTotal | number | Discount applied |
items | array | Order line items |
createdAt | integer | Unix timestamp in milliseconds when the order was created |
completedAt | integer or null | Unix timestamp in milliseconds when the order was completed |
customerRole | string | The customer's role in this order (e.g. primary) |
Pagination
When hasMore is true, use the nextCursor value as the cursor parameter in your next request to fetch the following page.
curl -X GET "https://edge.tiquo.app/api/client/v1/orders?limit=10&cursor=order_122" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."Errors
| Status | Description |
|---|---|
401 | Invalid or expired access token |
500 | Internal server error |
Code Examples
JavaScript
async function getOrders(accessToken, options = {}) {
const params = new URLSearchParams();
if (options.limit) params.set('limit', options.limit);
if (options.cursor) params.set('cursor', options.cursor);
if (options.status) params.set('status', options.status);
const response = await fetch(
`https://edge.tiquo.app/api/client/v1/orders?${params}`,
{
headers: { 'Authorization': `Bearer ${accessToken}` },
}
);
return response.json();
}
// Fetch first page
const result = await getOrders(token, { limit: 10 });
// Fetch next page
if (result.data.hasMore) {
const nextPage = await getOrders(token, {
limit: 10,
cursor: result.data.nextCursor,
});
}