Tiquo
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 /orders

Authentication

Requires a valid JWT access token.

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Number of orders to return (1 to 100)
cursorstring-Order ID to paginate from (use nextCursor from previous response)
statusstring-Filter by order status

Status Values

StatusDescription
pendingOrder has been placed but not yet processed
processingOrder is being fulfilled
completedOrder is complete
cancelledOrder was cancelled
refundedOrder 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

FieldTypeDescription
idstringOrder document ID
orderNumberstringHuman-readable order number (e.g. ORD-001234)
statusstringOrder status (see values above)
paymentStatusstringOne of: pending, paid, failed, refunded
totalnumberTotal order amount
subtotalnumberSubtotal before tax
taxTotalnumberTax amount
discountTotalnumberDiscount applied
itemsarrayOrder line items
createdAtintegerUnix timestamp in milliseconds when the order was created
completedAtinteger or nullUnix timestamp in milliseconds when the order was completed
customerRolestringThe 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

StatusDescription
401Invalid or expired access token
500Internal 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,
  });
}

Sur cette page