Receiving Order Details Webhooks
Note that webhook endpoints may receive an order event more than once. Your endpoint should contain logic to handle processed orders.
The webhook data is sent in application/json format with a JSON formatted payload in the Raw POST Body.
Webhooks are sent for 2 order types: CustomerOrder and GroupOrder
Note the example below does not include all optional fields. Refer to the definition below to see all possible fields.
All monetary values are returned as Integers representing the number of cents. For example, $25.47 will be represented as 2547.
CustomerOrder Example
{
"type": "CustomerOrder",
"id": 235467,
"account": 96578,
"restaurant": 3476,
"createdAt": "2016-09-20T20:32:14+00:00",
"readyAt": "2016-09-20T21:02:14+00:00",
"orderType": "PICKUP",
"customer": {
"name": "John Doe",
"currentPhone": "(234) 567-8900",
"email": "john@doe.com"
},
"totalPrice": 5385,
"taxAmount": 310,
"taxRate": 6.1,
"taxLabel": "Local",
"tipAmount": 0,
"subtotal": 1750,
"additionalFee": 35,
"additionalFeeOptions": [
{
"name": "Additional Fee 1",
"value": 100
},
{
"name": "Additional Fee 2",
"value": 18
}
],
"creditCardFee": 200,
"deliveryChargeAmount": 100,
"payment": {
"methodId": 7,
"description": "Customer is paying by Cash on Delivery/Pickup"
},
"invoiceAmount": 10,
"specialInstructions": "",
"customFields": [
{
"name": "I don't want utensils",
"value": "Yes"
},
{
"name": "I don't want napkins",
"value": "Yes"
}
],
"notesToDriver": "Leave at the door",
"isOnSpringroll": true,
"items": [
{
"id": 967644,
"category": "Appetizers",
"name": "Chicken Wings",
"for": "Me",
"priceName": "10 Wings",
"priceId": 837482,
"priceValue": 1200,
"quantity": 1,
"totalPrice": 1200,
"specialInstructions": "",
"addons": [
{
"id": 6567,
"priceValue": 0,
"quantity": 1,
"totalPrice": 0,
"name": "Wing Sauce",
"optionChoiceName": "Extra Hot",
"optionChoiceId": 2432
}
]
},
{
"id": 6589,
"category": "Create Your Own Pizza",
"name": "Medium Pizza",
"for": "Me",
"priceName": "Medium Pizza",
"priceId": 4563,
"priceValue": 1025,
"quantity": 2,
"totalPrice": 2720,
"specialInstructions": "Light on the sauce please",
"addons": [
{
"id": 720,
"priceValue": 225,
"quantity": 2,
"totalPrice": 450,
"name": "Sliced White Onions",
"pizzaChoice": "W"
},
{
"id": 707,
"priceValue": 110,
"quantity": 2,
"totalPrice": 220,
"name": "Fresh Italian Sausage",
"pizzaChoice": "L"
}
]
}
]
}
CustomerOrder Reference
type
required
String
This describes the object received. CustomerOrder for Orders.
id
required
Integer
The order ID.
customId
optional
Integer
The account specific order ID. Only provided when the account has custom order numbering enabled.
account
required
Integer
The ID of the account.
restaurant
required
Integer
The ID of the restaurant.
restaurantInfo
required
Object
Contains details about the restaurant the order was placed at.
id
required
Integer
The ID of the restaurant.
name
required
String
The name of the restaurant.
phone
required
String
The phone number of the restaurant.
address
required
String
The address of the restaurant.
addressInfo
required
Object
Contains details of the restaurant's address.
street1
required
String
The street address of the restaurant.
street2
optional
String
The second line of the restaurant address.
suite
optional
String
The suite line of the restaurant address.
city
required
String
The city the restaurant.
state
required
String
The state of the restaurant.
zip
required
String
The zip/postal code of the restaurant.
createdAt
required
ISO-8601 DateTime
When the order was placed.
readyAt
required
ISO-8601 Datetime
When the order is due to be ready/delivered to the customer.
orderType
required
String
The selected order type. Will be one of: PICKUP, DELIVERY, DINEIN.
customer
required
Object
Contains information about the ordering customer:
name
required
String
The customer's name.
currentPhone
required
String
The current phone number as entered by the customer during checkout.
email
required
String
The customer's email.
company
optional
String
The customer's company name.
taxAmount
optional
Currency
The amount of tax on the order.
taxRate
optional
Float
The tax rate applied to the order.
taxLabel
optional
String
The custom text describing the tax.
taxAmount2
optional
Currency
The amount of the second tax on the order.
taxRate2
optional
Float
The second tax rate applied to the order.
taxLabel2
optional
String
The custom text describing the second tax.
taxExempt
optional
Boolean
True if the customer is marked as Tax Exempt.
tipAmount
required
Currency
The amount of the tip (gratuity).
additionalFeeOptions
optional
Array
Additional Fee Options - added on the "Payment & Fees" page. (Used to create "Bag Fees" or "Retail Delivery Fee" for example)
name
optional
String
The name of the fee.
value
optional
Currency
How much was charged for this fee.
creditCardFee
optional
Currency
The fee for paying by credit card online.
couponId
optional
Integer
The ID of the coupon applied to the order.
couponName
optional
String
The name of the coupon.
deliveryChargeAmount
optional
deliveryAddress
optional
String
The address where the order is to be delivered.
deliveryNote
optional
String
Any special notes regarding the delivery address.
deliveryDistance
optional
Float
The calculated distance between the restaurant and the delivery address.
deliveryDistanceUnit
optional
String
The unit the deliveryDistance is. Either kilometers or miles.
deliveryAddressInfo
required
Object
Contains details of the delivery address.
companyName
required
String
The company name associated with the delivery address.
street1
required
String
The street address of the delivery address.
street2
optional
String
The second line of the delivery address.
suite
optional
String
The suite line of the delivery address.
city
required
String
The city the delivery address.
state
required
String
The state of the delivery address.
zip
required
String
The zip/postal code of the delivery address.
crossStreet
optional
String
The cross street of the delivery address.
latitude
required
Float
The latitude of the delivery address. May be 0.0 if the latitude for the address is unknown.
longitude
required
Float
The longitude of the delivery address. May be 0.0 if the longitude for the address is unknown.
creditCardFee
optional
Currency
The fee charged for paying by credit card.
payment
optional
Object
Contains information about the selected payment method:
methodId
required
Integer
The ID of the chosen payment method. Can be
- 1 - Pay at time of Pick up/Delivery
- 2 - Pay with Credit Card
- 6 - Pay with House Account
- 7 - Pay with Custom Payment Method
- 8 - Pay with PayPal
description
required
String
A description of the selected payment method.
houseAccountId
optional
String
The House Account as provided by the customer.
invoiceAmount
optional
Currency
The restaurant's invoice amount
specialInstructions
optional
String
The Special Instructions provided by the customer.
customFields
optional
Array
Any additional fields added to the checkout page
name
optional
String
The name of the field.
value
optional
String
The value entered at checkout.
notesToDriver
optional
String
Instructions for the delivery driver (ie. "Leave at the door")
isOnSpringroll
optional
Boolean
True if the order was placed on Springroll.
items
required
Array
Contains the ordered items. Each element in the array contains an Item with the properties below:
id
required
Integer
The ID of the ordered item.
category
required
String
The name of the category the item was ordered from.
name
required
String
The item's name.
for
required
String
The name of the person who the item is for.
priceName
required
String
The name of the selected price level.
priceId
required
Integer
The ID of the selected price level.
priceValue
required
Currency
The per quantity value of the item.
quantity
required
Integer
The quantity ordered.
priceNote
optional
String
A description of any overridden prices.
totalPrice
required
Currency
The total price of the item, including addons.
specialInstructions
required
String
The Special Instructions for the item provided by the customer.
addons
required
Array
Contains the options/extras/addons for the item. Each element in the array contains an Addon with the properties below:
id
required
Integer
The ID of the addon.
priceValue
required
Currency
The per quantity value of the addon.
quantity
required
Integer
The quantity ordered.
totalPrice
required
Currency
The total price for this addon.
name
required
String
The name of the addon.
optionChoiceName
optional
String
When addon has multiple choices, this is the name of the selected option.
optionChoiceId
optional
String
When addon has multiple choices, this is the ID of the selected option.
pizzaChoice
optional
String
Can be one of L, R OR W, representing Left, Right, Whole. This is provided when the Item is a pizza type and the customer can choose for the addon to be on only half the Item.
GroupOrder Reference
type
required
String
This describes the object received. GroupOrder for GroupOrders.
id
required
Integer
The group order ID.
account
required
Integer
The ID of the account.
restaurant
required
Integer
The ID of the restaurant.
createdAt
required
ISO-8601 DateTime
When the order was placed.
readyAt
required
ISO-8601 Datetime
When the order is due to be ready/delivered to the customer.
orderType
required
String
The selected order type. Will be one of: PICKUP, DELIVERY, DINEIN.
customer
required
Object
Contains information about the ordering customer:
name
required
String
The customer's name.
currentPhone
required
String
The current phone number as entered by the customer during checkout.
email
required
String
The customer's email.
company
optional
String
The customer's company name.
deliveryAddress
optional
String
The address where the order is to be delivered.
deliveryNote
optional
String
Any special notes regarding the delivery address.
individualPayments
optional
Boolean
true if each component order is making their own payment. false if the group originator is paying for all component orders.
payment
optional
Object
Contains information about the selected payment method:
methodId
required
Integer
The ID of the chosen payment method. Can be
- 1 - Pay at time of Pick up/Delivery
- 2 - Pay with Credit Card
- 6 - Pay with House Account
- 7 - Pay with Custom Payment Method
- 8 - Pay with PayPal
description
required
String
A description of the selected payment method.
houseAccountId
optional
String
The House Account as provided by the customer.
orders
required
Array
Contains the component orders. Each element in the array is a CustomerOrder as described above.