Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
Info

Please read the Orders API - Overview document first to understand how these endpoints are meant to be used.

Calculate basket price

  • Price order webhook documented here

  • See details about offer and reward payload format inside the cart object in the Payload Format section below

  • Price webhook callback documented here

Place order

  • Fire order webhook documented here

  • Fire webhook callback documented here

  • Commit order webhook documented here

  • Commit webhook callback documented here

  • Order event webhook documented here

Payload format

Info

This section explains changes to the format of the cart object used to make a request to Price Order Webhook. It will be moved to the Partner API Reference Documentation soon.

Reward with an item

...

printabletrue

Payload format

Info

This section explains changes to the format of the cart object used to make a request to Price Order Webhook. It will be moved to the Partner API Reference Documentation soon.

Rewards Structure

Rewards are an item benefit that can be redeemed in exchange for points (and sometimes money + points). Read more about it here: /wiki/spaces/HELP/pages/4921819186 .

Reward with an item

Code Block
"cart": [
  {
    "menuSelections": [
      {
        "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id
        "externalReferenceId": "123", // Reward constant plu defined in Sanity
        "quantity": 1,
        "price": {
          "amount": 0,
          "currency": "SAR",
        }
        "type": "Reward", 
        "menuSelections": [
          {
            "externalReferenceId": "51056", // item constant plu
            "id": "item_1862", // item Sanity id
            "menuSelections": [],
            "price": {
                "amount": 2495, // normal price
                "currency": "SAR"
          },
            "quantity": 1,
            "type": "Item"
          }
        ]
      }
    ]
  }
]

Reward with an item + premium modifier

Code Block
"cart": [
  {
    "menuSelections": [
      {
        "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id
        "externalReferenceId": "123", // Reward constant plu defined in Sanity
        "quantity": 1,
        "price": {
          "amount": 0,
          "currency": "SAR",
        }
        "type": "Reward", 
        "menuSelections": [
          {
            "externalReferenceId": "51056", // item constant plu
            "id": "item_1862", // item Sanity id
            "menuSelections": [],
            "price": {
                "amount": 2495, // normal price
                "currency": "SAR"
          },
            "quantity": 1,
            "type": "Item"
          }
        ]
      }
    ]
  }
]

Reward with a combo

Code Block
"cart": {
  "menuSelections": [
    {
      "externalReferenceId": "8351", // reward plu
      "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //reward sanity id
        "menuSelections": [
            {
                "externalReferenceId": "8350", // combo plu
                "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity id
                "menuSelections": [
                    {
                        "externalReferenceId": "10059",
                        "id": "item_1852",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80007",
                        "id": "4f99db1e-128a-4e53-b23b-dffc0fedf636",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80001",
                        "id": "16f482db-2f13-4476-88d3-d2eec26057f3",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "141139",
                        "id": "141139",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
                ],
                "price": {
                "amount": 300, // original price of combo
                "currency": "SAR"
                 },
                 "quantity": 1,
                 "type": "Combo"
                 }
              ],
              "price": {
              "amount": 0, // final price of the reward
              "currency": "SAR"
              },
              "quantity": 1,
              "type": "Reward"
            }
        ]
    },

Reward with a combo + premium modifier

Code Block
{
    "payload": {
        "number": "5848",
        "fees": [
            {
                "total": {
                    "amount": 19,
                    "currency": "EUR"
                },
                "type": "BAG_FEE"
            }
        ],
        "serviceMode": "DELIVERY",
        "channel": "WHITELABEL_DELIVERY",
        "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/15c3dbe1-5165-404b-8858-088239d14014/price/callback",
        "id": "15c3dbe1-5165-404b-8858-088239d14014",
        "storeId": "12349",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "948351",
                    "quantity": 1,
                    "menuSelections": [
                        {
                            "externalReferenceId": "502617",
                            "quantity": 1,
                            "menuSelections": [
                                {
                                    "externalReferenceId": "502633",
                                    "quantity": 1,
                                    "menuSelections": [
                                        {
                                            "externalReferenceId": "528232",
                                            "quantity": 1,
                                            "price": {
                                                "amount": 90,
                                                "currency": "EUR"
                                            },
                                            "id": "8ba0df7b35df",
                                            "type": "ItemOptionModifier"
                                        }
                                    ],
                                    "price": {
                                        "amount": 0,
                                        "currency": "EUR"
                                    },
                                    "id": "item_11107",
                                    "type": "Item"
                                },
                                {
                                    "externalReferenceId": "942258",
                                    "quantity": 1,
                                    "price": {
                                        "amount": 0,
                                        "currency": "EUR"
                                    },
                                    "id": "item_11126",
                                    "type": "Item"
                                },
                                {
                                    "externalReferenceId": "527646",
                                    "quantity": 1,
                                    "price": {
                                        "amount": 0,
                                        "currency": "EUR"
                                    },
                                    "id": "9aac0a46-5a73-431d-937c-8848ca01ac86",
                                    "type": "Item"
                                }
                            ],
                            "price": {
                                "amount": 875,
                                "currency": "EUR"
                            },
                            "id": "a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                            "type": "Combo"
                        }
                    ],
                    "price": {
                        "amount": 450,
                        "currency": "EUR"
                    },
                    "id": "024f9096-e3ee-45fc-8f76-d75e272ff9e9",
                    "type": "Reward"
                }
            ]
        }
    }
}

Reward with a cart discount

Code Block
"payload": {
    "number": "5803",
    "fees": [
        {
            "total": {
                "amount": 19,
                 "currency": "EUR"
             },
            "type": "BAG_FEE"
        }
     ],
     "serviceMode": "DELIVERY",
     "channel": "WHITELABEL_DELIVERY",
    "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback",
    "id": "60c1983c-8cbc-4aa8-9486-c55fa78566f5",
    "orderDiscounts": [
        {
            "amounttype": 0,"amount",
             "currencyvalue": "SAR",200
        }
     ],
    "typestoreId": "Reward12349", 
 
      "menuSelectionscart": [{	
         "menuSelections": {[
            "externalReferenceId": "51056", // item constant plu {
                "idexternalReferenceId": "item_1862502633",
 // item Sanity id             "menuSelectionsquantity": []1,
                "price": {
                    "amount": 2495645,
 // normal price                 "currency": "SAR"EUR"
                },
                 "quantityid": 1,"item_11107",
                 "type": "Item"
             }
        ]
      }
    ]
  }
]}
Info

Note: the cart discount can be also sent with a plu inside the orderDiscounts object. Please refer to “Reward with a product discount” section for an example.

Reward with a

...

product discount

Code Block
"cart": {

 "menuSelections": [    "payload": {
        "externalReferenceIdnumber": "83515807", //
reward plu       "idfees": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //reward sanity id [
            {
   "menuSelections": [            "total": {
                    "externalReferenceIdamount": "8350"19,
//  combo plu                 "idcurrency": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity idEUR"
                },
                "menuSelectionstype": [
 "BAG_FEE"
            }
        ],
        "serviceMode":  {"DELIVERY",
        "channel": "WHITELABEL_DELIVERY",
        "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
        "externalReferenceIdid": "10059781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
        "orderDiscounts": [
            {
 "id": "item_1852",
                        "menuSelectionsplu": [],
       "948348",
                "pricetype": {
       "percentage",
                    "amountvalue": 0,50
              }
             "currency": "SAR"    ],
        "storeId": "12349",
        "cart": {
},            "menuSelections": [
           "quantity": 1,    {
                    "typeexternalReferenceId": "Item948348",
                    },"quantity": 1,
                    "menuSelections": [
  {                      {
  "externalReferenceId": "80007",                         "idexternalReferenceId": "4f99db1e-128a-4e53-b23b-dffc0fedf636502633",
                            "menuSelectionsquantity": []1,
                            "price": {
   {                             "amount": 0,
                                "currency": "SAREUR"
                            },
                            "quantityid": 1"item_11107",
                            "type": "Item"
                    },    }
                {    ],
                    "externalReferenceIdprice": "80001",{
                        "idamount": "16f482db-2f13-4476-88d3-d2eec26057f3"645,
                        "menuSelectionscurrency": [], "EUR"
                    },
               "price": {        "id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
                    "amounttype": 0,"Reward"
                }
           "currency": "SAR" ]
        }
               },
}
}

Offers Structure

Offers are a discount on the order or item. Can take the form of a discounted bundle, cheaper item, order-level % discount, or order-level $ off. Also known as a “coupon” in some markets. Read more about it here: /wiki/spaces/HELP/pages/4854349911 .

Offer with a combo

Code Block
"cart": {
  "menuSelections": [
    {
                  "quantity"externalReferenceId": 1"8351", //                 offer plu
      "typeid": "Item"
                    },
  43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
        "menuSelections": [
       {        {
                "externalReferenceId": "1411398167", // combo  plu
                    "id": "141139d90a7113-0620-44d9-b678-743330a2f207", //combo sanity id
                     "menuSelections": [],
    
                   "price": {
  
                         "amountexternalReferenceId": 0"80003",
 
                          "currencyid": "SAR"
          ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
             },           "menuSelections": [],
            "quantity": 1,           "price": {
            "type": "Item"               "amount": 0,
    }                 ],       "currency": "SAR"
        "price": {               },
 "amount": 300, // original price of combo                 "currencyquantity": "SAR"1,
                 },       "type": "Item"
         "quantity": 1,          },
       "type": "Combo"                {
    }               ],     "externalReferenceId": "142538",
        "price": {               "amountid": 0"142538",
// final price of the reward               "currency": "SAR"     "menuSelections": [],
         },               "quantityprice": 1,{
              "type": "Reward"             }
"amount": 0,
       ]     },

Offer with a combo

Code Block
"cart": {   "menuSelections": [     {       "externalReferenceIdcurrency": "8351SAR",
 // offer plu       "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id         "menuSelections": [ },
            {            "quantity": 1,
   "externalReferenceId": "8167", // combo plu                 "idtype": "d90a7113-0620-44d9-b678-743330a2f207", //combo sanity idItem"
                    }
        "menuSelections": [       ],
             {   "price": {
                    "externalReferenceIdamount": "80003"500, //price of the combo
                    "idcurrency": "ce847c79-9eb5-4be3-8a1e-842919aa5ba0",SAR"
                },
       "menuSelections": [],        ],
                "price": {
           
                "amount": 0100, // final price of        the offer
                "currency": "SAR"

                       },
    
                   "quantity": 1,
        1,
                "type": "Item"
       Offer"
            },
        ]
    },

Offer with a cart discount

Code Block
{
     "payload": {
        "number": "5814",
        "fees": [
    "externalReferenceId": "142538",        {
                "idtotal": "142538",
   {
                    "menuSelectionsamount": []19,
                    "currency": "EUR"
  "price": {             },
                "amounttype": 0, "BAG_FEE"
            }
        ],
        "currencyserviceMode": "SARDELIVERY",
        "channel": "WHITELABEL_DELIVERY",
              }"callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/6d66a02e-810f-478f-bf0d-b69bfcb56d51/price/callback",
        "id": "6d66a02e-810f-478f-bf0d-b69bfcb56d51",
        "orderDiscounts": [
    "quantity": 1,        {
                "type": "Itempercentage",
                "value": 20
    }        }
        ],
        "storeId": "12349",
        "pricecart": {
            "menuSelections": [
         "amount": 500, //price of the combo       {
                    "currencyexternalReferenceId": "SAR502633",
                },    "quantity": 1,
           ],         "price": {
      "price": {                 "amount": 100645,
  // final price of the offer                 "currency": "SAR"EUR"
                    },
                    "quantityid": 1,"item_11107",
                    "type": "OfferItem"
                }
            ]
    },

Offer with a picker

Code Block
"cart": {   "menuSelections":}
[    }
{
}

Offer with a product discount

Code Block
{
     "externalReferenceIdpayload": "8351", // offer plu{
         "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity idnumber": "5821",
        "menuSelectionsfees": [
            {
                "externalReferenceIdtotal": "8168", //combo plu {
                    "idamount": "3318d2c2-99d3-40f9-92d2-1798d9c5e987"19,
//combo  sanity id                 "menuSelectionscurrency": ["EUR"
                    {
       },
                "externalReferenceIdtype": "20001BAG_FEE",
            }
           "id": "item_61936"],
              "serviceMode": "DELIVERY",
         "menuSelectionschannel": []"WHITELABEL_DELIVERY",
              "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",
         "priceid": {"ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",
        "orderDiscounts": [
            {
     "amount": 0,            "plu": "502617",
                "currencytype": "SARpercentage",
                "value": 20
      },       }
        ],
        "quantitystoreId": 1"12349",
        "cart":  {
             "typemenuSelections": "Item"[
                {
   },                     {
   "externalReferenceId": "502617",
                    "externalReferenceIdquantity": "80002",
  1,
                     "idmenuSelections": "865a632f-e2f7-4e2b-8fcc-9281aa3f5868", [
                        {
 "menuSelections": [],                           "priceexternalReferenceId": {"502633",
                            "amountquantity": 01,
                            "currencyprice": "SAR" {
                                "amount": }0,
                        "quantity": 1,        "currency": "EUR"
                   "type": "Item"        },
            },                "id": "item_11107",
   {                         "externalReferenceIdtype": "80008Item",
                        "id": "04462c22-bf58-4eee-842a-213e3d17a072",},
                        {
  "menuSelections": [],                         "priceexternalReferenceId": {"942258",
                            "amountquantity": 01,
                            "currencyprice": "SAR"{
                                "amount": }0,
                        "quantity": 1,        "currency": "EUR"
                   "type": "Item"        },
            },                "id": "item_11126",
   {                         "externalReferenceIdtype": "142538Item",
                        "id": "142538",},
                        {
  "menuSelections": [],                         "priceexternalReferenceId": {"527646",
                            "amountquantity": 01,
                            "currencyprice": "SAR"{
                        },        "amount": 0,
                 "quantity": 1,              "currency": "EUR"
         "type": "Item"                  },
  }                 ],         "id": "9aac0a46-5a73-431d-937c-8848ca01ac86",
      "price": {                     "amounttype": 500, //price of the combo"Item"
                        }
  "currency": "SAR"                 }],
              ],      "price": {
       "price":  {               "amount": 100875,
  //   final price of the offer               "currency": "SAR"EUR"
                    },
                    "quantityid": 1"a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                    "type": "Offer"
                }
            ]
    },    }
    }
}