curl -X GET "https://api.gatepass.io/api/orders?status=COMPLETED&limit=20" \ -H "Authorization: Bearer YOUR_TOKEN"
{ "orders": [ { "id": "clx1234567890abcdef", "totalAmount": 102.50, "quantity": 2, "currency": "NGN", "paymentMethod": "FIAT", "paymentStatus": "COMPLETED", "customerEmail": "[email protected]", "customerName": "John Doe", "event": { "id": "clx1234567890", "title": "Tech Conference 2024", "venue": "Convention Center Lagos", "eventDate": "2024-06-15T10:00:00Z", "imageUrl": "https://cdn.gatepass.io/events/tech-conf-2024.jpg" }, "createdAt": "2024-05-20T14:30:00Z", "updatedAt": "2024-05-20T14:35:00Z" }, { "id": "clx0987654321fedcba", "totalAmount": 51.25, "quantity": 1, "currency": "NGN", "paymentMethod": "FIAT", "paymentStatus": "COMPLETED", "customerEmail": "[email protected]", "customerName": "John Doe", "event": { "id": "clx0987654321", "title": "Music Festival 2024", "venue": "Eko Atlantic", "eventDate": "2024-07-20T18:00:00Z", "imageUrl": "https://cdn.gatepass.io/events/music-fest-2024.jpg" }, "createdAt": "2024-05-18T10:15:00Z", "updatedAt": "2024-05-18T10:20:00Z" } ], "total": 15, "hasMore": false }
Get a list of orders for the authenticated user
PENDING
COMPLETED
FAILED
createdAt
totalAmount
updatedAt
asc
desc
Show Order Object
Show Event Object
limit
offset
// First page (orders 0-19) const page1 = await fetch('/api/orders?limit=20&offset=0'); // Second page (orders 20-39) const page2 = await fetch('/api/orders?limit=20&offset=20'); // Third page (orders 40-59) const page3 = await fetch('/api/orders?limit=20&offset=40');
hasMore