Create Order
When you subscribe to Order WebHooks from ShoppinPal, you will receive payload like below on the event of an order create.
WebHook Request Header | Value |
---|---|
x-webhook-topic | order.create |
When order gets created in the source system.
- orderStatus.status is
new
. - orderStatus.closedAt is current date time (If the source system has closedAt date).
{
"requestId": "ee6dd693-5e55-4a92-a359-ea61b23ed678",
"requestTime": "2020-06-30T15:16:47.740+0000",
"orderId": "ff6dd693-5e55-4a92-a359-ea61b23ed423",
"restaurantId": "zz6dd693-5e55-4a92-a359-ea61b23ed99",
"eventType": "order.create",
"eventDate": "2020-06-30T15:16:47.740+0000",
"eventData": {
"friendlyId": "order-no-1",
"currencyCode": "ISO 4217",
"customer": {
"name": "Suraj Mandal",
"phone": "+918208082853",
"email": "[email protected]",
"note": "Come to the front gate of society"
},
"products": [
{
"productId": "fa4f0192-4c4e-4455-9db8-61d428c34969",
"name": "Vada Pav",
"unitPrice": 10,
"quantity": 1,
"note": "Add more chilli",
"extras": [
{
"productId": "c75d9460-5d48-423d-8d01-f825fd5b1672",
"name": "Mayonees",
"unitPrice": 5,
"quantity": 1
}
]
}
],
"fulfillment": {
"mode": "pickup",
"schedulingType": "asap",
"expectedAt": "2020-06-30T15:16:47.740+0000",
"courier": {
"name": "Zomato",
"phone": "+918208082853",
"email": "[email protected]",
"licensePlate": "MH12 2345",
"makeModel": "Test",
"lastKnownLocation": {
"latitude": "ISO 6709",
"longitude": "ISO 6709"
}
},
"delivery": {
"address": "15/201 Sterling Tower",
"address2": "Amanora Park Town",
"postalCode": "411028",
"city": "Pune",
"state": "Maharastra",
"countryCode": "USA - ISO 3166",
"note": "Call when you reach",
"location": {
"latitude": "ISO 6709",
"longitude": "ISO 6709"
}
},
"employee": {
"id": "f4c69056-3ae3-4517-9294-5ceec8df5f81",
"name": "Suraj Mandal"
},
"table": {
"id": "b01485b0-034a-47c5-8a0a-0eeca08bf994",
"name": "Table No One"
}
},
"payment": {
"total": 20,
"discount": 4,
"extraCharges": 2,
"tax": 2,
"tip": 1,
"deliveryFee": 2,
"couponCode": "Diwali Bumper",
"transactions": [
{
"amount": 20,
"method": "cash",
"status": "processed"
}
],
"startedAt": "2020-06-30T15:16:47.740+0000",
"completedAt": "2020-06-30T15:16:47.740+0000"
},
"orderStatus": {
"status": "new",
"closedAt": "2020-06-30T15:16:47.740+0000"
},
"createdAt": "2020-06-30T15:16:47.740+0000",
"orderId": "ff6dd693-5e55-4a92-a359-ea61b23ed423"
}
}
Updated 12 months ago