When we receive the order.create
webhook we need to retrieve the delivery information hitting RetrieveOrder endpoint. The endpoint is working fine but the delivery address is missing for RESTAURANT_DELIVERY orders. It is causing all orders an injection failure.
Example:
{
"id": "j2Db4NXOlohVNakqxEBnHOdtReHZY",
"location_id": "LKBKVJSYAV25G",
"reference_id": "11ee67938153d8cbaf423cecef6dbaf0",
"source": {
"name": "Square Online"
},
"customer_id": "MQGHJ20R3D04F9BFEJYC5PAZD8",
"line_items": [
{
"uid": "yXNWfQ0HvFZsfY2tNKCRTB",
"name": "Chicken Tikka",
"quantity": "1",
"catalog_object_id": "ECNV7UNFJDOAFYPJNZYLZS5K",
"variation_name": "",
"base_price_money": {
"amount": 950,
"currency": "GBP"
},
"variation_total_price_money": {
"amount": 950,
"currency": "GBP"
},
"gross_sales_money": {
"amount": 950,
"currency": "GBP"
},
"total_tax_money": {
"amount": 0,
"currency": "GBP"
},
"total_discount_money": {
"amount": 0,
"currency": "GBP"
},
"total_money": {
"amount": 950,
"currency": "GBP"
}
},
{
"uid": "ILYkEgKgzXOmPGpiqLw7C",
"name": "Paneer Tikka Shashlik",
"quantity": "1",
"catalog_object_id": "O4ZWPIXLGJYDUI6VQVFNTVUY",
"variation_name": "",
"base_price_money": {
"amount": 850,
"currency": "GBP"
},
"variation_total_price_money": {
"amount": 850,
"currency": "GBP"
},
"gross_sales_money": {
"amount": 850,
"currency": "GBP"
},
"total_tax_money": {
"amount": 0,
"currency": "GBP"
},
"total_discount_money": {
"amount": 0,
"currency": "GBP"
},
"total_money": {
"amount": 850,
"currency": "GBP"
}
}
],
"fulfillments": [
{
"uid": "LF3GpLL0Z3713e6bZriHbD",
"type": "DELIVERY",
"state": "PROPOSED"
}
],
"net_amounts": {
"total_money": {
"amount": 1800,
"currency": "GBP"
},
"tax_money": {
"amount": 0,
"currency": "GBP"
},
"discount_money": {
"amount": 0,
"currency": "GBP"
},
"tip_money": {
"amount": 0,
"currency": "GBP"
},
"service_charge_money": {
"amount": 0,
"currency": "GBP"
}
},
"tenders": [
{
"id": "ZKbWqJRmIutJgl0W2UTMUcgcTZ6YY",
"location_id": "LKBKVJSYAV25G",
"transaction_id": "j2Db4NXOlohVNakqxEBnHOdtReHZY",
"created_at": "2023-10-10T17:37:48.635Z",
"amount_money": {
"amount": 1800,
"currency": "GBP"
},
"type": "CARD",
"card_details": {
"status": "CAPTURED",
"card": {
"card_brand": "MASTERCARD",
"last_4": "2040",
"exp_month": 7,
"exp_year": 2026,
"fingerprint": "sq-1-7rw3fvLFp5DlfkTZZRp0Cr6SHC6suhbNkVl8rvf4-9v2bK517cXKn04JfcfVCnW85w",
"card_type": "DEBIT",
"prepaid_type": "NOT_PREPAID",
"bin": "537416"
},
"entry_method": "KEYED"
},
"payment_id": "ZKbWqJRmIutJgl0W2UTMUcgcTZ6YY"
}
],
"created_at": "2023-10-10T17:37:48.187Z",
"updated_at": "2023-10-10T17:37:50.197Z",
"state": "OPEN",
"version": 3,
"total_money": {
"amount": 1800,
"currency": "GBP"
},
"total_tax_money": {
"amount": 0,
"currency": "GBP"
},
"total_discount_money": {
"amount": 0,
"currency": "GBP"
},
"total_tip_money": {
"amount": 0,
"currency": "GBP"
},
"total_service_charge_money": {
"amount": 0,
"currency": "GBP"
}
}