Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created September 5, 2023 05:57
Show Gist options
  • Save coreymcmahon/6e0ae0cd2c4e13238fa61adaa455f01e to your computer and use it in GitHub Desktop.
Save coreymcmahon/6e0ae0cd2c4e13238fa61adaa455f01e to your computer and use it in GitHub Desktop.
Sample "create order" webhook for Foodkit orders
{
"data":
{
"address":
{
"address1": "115 Pitt st",
"address2": "Suite 15",
"address_label": "Office",
"building_name": "Pitt St Building",
"directions": "Call when you arrive in the foyer",
"floor_number": "2F",
"latitude": -33.870746921557284,
"longitude": 151.20822530269714,
"room_number": "100"
},
"coupon_code": "DISCOUNT20",
"created_at": "2021-07-30 11:19:49",
"customer":
{
"email": "john.smith@acme.org",
"name": "John Smith",
"phone_number": "+85200000000"
},
"id": 546356,
"order_type": "delivery",
"payment_type": "credit_card",
"products":
[
{
"code": "BURGER0001",
"comments": "not too much sauce",
"extra_items":
[
{
"code": "KETCH",
"id": 12321,
"name": "Ketchup",
"price": 100
}
],
"name": "Hamburger",
"price": 800,
"quantity": 2
}
],
"reference": "ABC-230600123",
"scheduled_at": null,
"totals":
{
"coupon_discount": 50,
"delivery_fee": 100,
"subtotal": 1000,
"total": 1050
}
},
"environment": "develop",
"timestamp": 1627643994,
"type": "orders.created",
"webhook_version": "1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment