Retrieve all orders for the authenticated admin.
/api/integrations/crm/orders
Step-by-step guide to integrate order management data into your CRM or website
Contact us to get your API key and secret key for accessing order data
Download our ready-to-use UI components from the UI Components page - just copy and paste!
Add the API integration code to your website or CRM system using the examples in the right sidebar
Your website will now show live order data from our system automatically
const apiKey = 'your_api_key_here'; const secretKey = 'your_secret_key_here'; async function getOrders() { const response = await fetch('/api/integrations/crm/orders?limit=20&status=completed', { method: 'GET', headers: { 'X-API-Key': apiKey, 'X-Secret-Key': secretKey, 'Content-Type': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); console.log(data.data.orders); } getOrders().catch(console.error);
{ "success": true, "data": { "orders": [ { "id": "123", "visit_id": "visit_456", "store_id": "store_789", "merchandiser_id": "merch_101", "total_amount": 1500.00, "order_items": [ { "product_name": "Product A", "quantity": 2, "price": 750.00 } ], "status": "completed", "payment_method": "cash", "payment_status": "paid", "paid_amount": 1500.00, "discount": 0.00, "order_date": "2024-12-15T10:30:00Z", "stores": { "id": "store_789", "name": "SuperMart Store", "address": "123 Main St, City, State" }, "profiles": { "id": "merch_101", "fullname": "John Manager", "email": "john@example.com" } } ], "pagination": { "total": 45, "limit": 20, "offset": 0, "has_more": true } } }