Order webhook events

order.created

Any time an order is created we can trigger a OrderCreatedEvent

Payload example:

{
	"Description": "Customer 1234 palced a DELIVERY order",
	"OrderCreatedTime": "2017-12-15T12:00:00",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"EventName": "order.created",
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}

order.accepted

Any time an order is accepted we can trigger a OrderAcceptedEvent

Payload example:

{
	"EventName": "order.accepted",
	"Description": "Store accepted a collection order",
	"OrderAcceptedTime": "2017-12-15T12:00:00",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}

order.rejected

Any time an order is rejected we can trigger a OrderRejectedEvent

Payload example:

{
	"EventName": "order.rejected",
	"Description": "Store rejected a collection order",
	"OrderRejectedTime": "2017-12-15T12:00:00",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}

order.refunded

Any time an order is refunded we can trigger a OrderRefundedEvent

Payload example:

{
	"EventName": "order.refunded",
	"RefundedAmount": 0.0,
	"Description": "Store refunded 2,00 € from 15,00 for an order (#1234)",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}

order.tip.updated

Any time an order is refunded we can trigger a OrderTipUpdatedEvent

Payload example:

{
	"EventName": "order.tip.updated",
	"NewTipAmount": 0.0,
	"Description": "1234 updated TIP to 2.00 € for a DELIVERY order (#1234)",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}

order.rating.updated

Any time an order is refunded we can trigger a OrderRatingUpdatedEvent

Payload example:

{
	"EventName": "order.rating.updated",
	"NewUserRating": 3,
	"Description": "1234 update rating to 2 for a COLLECTION order with Acapulco",
	"Order": {
		"Store": {
			"Id": 123,
			"Name": "Restaurant",
			"MenuId": 123,
			"Metadata": {
				"foo": "bar"
			},
			"Currency": "EUR"
		},
		"Customer": {
			"Id": 1234,
			"Name": "John Doe",
			"EmailAddress": "[email protected]",
			"PhoneNumberLocalFormat": "0818204488",
			"PhoneNumber": "+353818204488"
		},
		"Voucher": {
			"Name": "-€5 (abc123)",
			"Description": "abc123",
			"Code": "abc123",
			"Amount": 0.0,
			"Type": "PercentageDiscount",
			"SubType": "None"
		},
		"Fees": {
			"FeeAmount": 0.0,
			"PercentageRate": 0.0,
			"PerTransactionFee": 0.0
		},
		"OrderItems": [{
				"OrderItemOptions": [{
						"Metadata": {
							"foo": "bar"
						},
						"MenuItemOptionId": 654645,
						"IsMasterOptionSetItem": false,
						"Name": "Option 1",
						"Price": 0.0,
						"MenuItemOptionDisplayOrder": 1,
						"MenuItemOptionSetDisplayOrder": 1
					}
				],
				"Metadata": {
					"foo": "bar"
				},
				"MenuSectionName": "Section 1",
				"MenuSectionDisplayOrder": 1,
				"Name": "Item 1",
				"Description": "First order item",
				"Price": 0.0,
				"PriceIncludingOptionSetItems": 0.0,
				"MenuItemId": 5545,
				"MenuItemDisplayOrder": 1,
				"IsAvailable": true
			}
		],
		"DeliveryLocation": {
			"Coordinates": {
				"Latitude": 0.0,
				"Longitude": 0.0
			},
			"Building": "38",
			"Street": "Pearse Street",
			"Town": "Dublin",
			"PostCode": "xx xxx",
			"DeliveryInstructions": "building is on the right",
			"PrettyAddressString": "38 Parse Street, Dublin, xx xxx"
		},
		"CustomerLocation": {
			"Latitude": 0.0,
			"Longitude": 0.0
		},
		"OrderId": 1234,
		"DeliveryType": "Delivery",
		"PickupLocationType": "TakeOut",
		"TipAmount": 0.0,
		"DeliveryAmount": 0.0,
		"OrderItemsAmount": 0.0,
		"Amount": 0.0,
		"ProcessingFee": 0.0,
		"PaymentAccountType": "Card",
		"PaymentAccountDescription": "Visa ****2371",
		"OrderState": "ReadyToProcess",
		"IsPreOrder": true,
		"PlacedTime": "2017-12-15T11:00:00",
		"RequestedForTime": "2017-12-15T12:00:00",
		"ChefNote": "no oregano please",
		"AppType": "Ios",
		"UserRating": 2
	},
	"FlipdishEventId": "00000000-0000-0000-0000-000000000000",
	"CreateTime": "0001-01-01T00:00:00",
	"Position": 0
}