API Authentication & Domain Context
FoodPar Multi-tenant API automatic domain header routing base par kaam karti hai. Subdomain ya custom domain pass karne par customer instance automatic resolve ho jata hai.
| Header | Type | Description |
|---|---|---|
Host |
String | Tenant identification (e.g. burgerhouse.foodpar.com) |
Content-Type |
String | Must be application/json for POST requests |
POST
/api/v1/customer/place_order.php
Submit direct order to the tenant store backend.
Request Payload (JSON):
{
"customer_name": "Ali Khan",
"phone": "03001234567",
"delivery_address": "House 12, Block 4, Gulshan, Karachi",
"payment_method": "COD",
"items": [
{
"product_id": 101,
"quantity": 2,
"price": 499.00
}
],
"total_amount": 998.00
}
Sample Response (200 OK):
{
"status": true,
"message": "Order placed successfully!",
"order_id": "ORD-98421",
"tracking_url": "https://burgerhouse.foodpar.com/track/ORD-98421"
}
GET
/api/v1/customer/track_order.php?order_id=ORD-98421
Get real-time status of an active order.
Sample Response (200 OK):
{
"status": true,
"order_id": "ORD-98421",
"order_status": "Preparing",
"estimated_delivery": "25 mins"
}