Versions Compared

Key

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

...

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": [
      {
        "externalReferenceIdid": "83517ee7338a-a016-47c6-aef6-3783d40c003e", // reward pluReward Sanity id
        "idexternalReferenceId": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f123", //reward sanityReward idconstant plu defined in Sanity
    "menuSelections": [   "quantity": 1,
        "price": {
                "externalReferenceId"amount": "8350"0,
// combo plu                 "id"currency": "43b4cf07-79c9-4aff-98d1-bce9cf2d890fSAR",
//combo sanity id      }
        "type":  "menuSelectionsReward":, [
        "menuSelections": [
          {
           
            "externalReferenceId": "1005951056", // item         constant plu
             "id": "item_18521862", // item Sanity id
                    ""menuSelections": [],
            "price": {
          "price": {     "amount": 2495, // normal   price
                 "amountcurrency": 0,"SAR"
             },
              "currencyquantity": "SAR"1,
            "type": "Item"
          },
        ]
      }
    ]
  }
"quantity]

Reward with a combo

Code Block
"cart": 1,{
  "menuSelections": [
             {
      "typeexternalReferenceId": "Item8351", // reward plu
           "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //reward sanity id
     },   "menuSelections": [
                {
                        "externalReferenceId": "800078350", // combo plu
                     "id": "4f99db1e43b4cf07-128a79c9-4e534aff-b23b98d1-dffc0fedf636bce9cf2d890f", //combo sanity      id
                "menuSelections": [],
                        "price": {
 
                          "amountexternalReferenceId": 0,
   "10059",
                        "currencyid": "SARitem_1852",
                        },
"menuSelections": [],
                        "quantityprice": 1, {
                            "typeamount": "Item"0,
                    },        "currency": "SAR"
           {             },
           "externalReferenceId": "80001",            "quantity": 1,
           "id": "16f482db-2f13-4476-88d3-d2eec26057f3",            "type": "Item"
           "menuSelections": [],        },
                "price": {   {
                         "amountexternalReferenceId": 0"80007",
 
                          "currencyid": "SAR"
  4f99db1e-128a-4e53-b23b-dffc0fedf636",
                     }   "menuSelections": [],
                        "quantityprice": 1, {
                            "typeamount": "Item"0,
                    },        "currency": "SAR"
           {             },
           "externalReferenceId": "141139",              "quantity": 1,
          "id": "141139",             "type": "Item"
          "menuSelections": [],         },
               "price": {    {
                        "amountexternalReferenceId": 0"80001",
                            "currency": "SAR""id": "16f482db-2f13-4476-88d3-d2eec26057f3",
                         }"menuSelections": [],
                        "quantityprice": 1,{
                            "typeamount": "Item" 0,
                       }     "currency": "SAR"
           ],             },
    "price": {                    "amountquantity": 3001,
 //   original price of combo                 "currencytype": "SARItem"
                    },
                    {
     "quantity": 1,                  "typeexternalReferenceId": "Combo141139",
                 }       "id": "141139",
         ],               "pricemenuSelections": {[],
              "amount": 0, // final price of the reward   "price": {
          "currency": "SAR"               },  "amount": 0,
           "quantity": 1,                 "typecurrency": "RewardSAR"
 
          }         ]     },

Reward with a cart discount

Code Block
"payload": {
       "number": "5803",     "fees": [         { "quantity": 1,
          "total":  {            "type": "Item"
   "amount": 19,                }
 "currency": "EUR"              }],
                "typeprice": {
       "BAG_FEE"
            "amount": 300, // original price of combo
    }      ],      "serviceModecurrency": "DELIVERY",SAR"
                "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",
    "orderDiscountsquantity": [
  1,
     {             "type": "amountCombo",
             "value": 200   }
     }      ],     "storeId": "12349",
],
   "cart": {	          "menuSelectionsprice": [{
             { "amount": 0, // final price of the reward
              "externalReferenceIdcurrency": "502633",SAR"
              },
              "quantity": 1,
                "pricetype": {"Reward"
            }
       "amount": 645, ]
    },

Reward with a combo + premium modifier

Code Block
{
    "payload": {
         "currencynumber": "EUR5848",
        "fees": [
      },      {
           "id": "item_11107",    "total": {
            "type": "Item"         "amount": 19,
    }         ]     }  }

Reward with a product discount

Code Block
{
    "payload": {
        "number": "5807","currency": "EUR"
         "fees": [      },
      {                 "total"type": {"BAG_FEE"
            }
       "amount": 19],
        "serviceMode": "DELIVERY",
          "currencychannel": "EURWHITELABEL_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",
         "typestoreId": "BAG_FEE"12349",
        "cart": {
       }     "menuSelections": [
  ],         "serviceMode": "DELIVERY",    {
    "channel": "WHITELABEL_DELIVERY",         "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
        "idexternalReferenceId": "781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764948351",
        "orderDiscounts": [            "quantity": 1,
   {                 "plumenuSelections": "948348",[
                 "type": "percentage",      {
          "value": 50             }    "externalReferenceId": "502617",
   ],         "storeId": "12349",
        "cart": {             "menuSelectionsquantity": [1,
                {            "menuSelections": [
       "externalReferenceId": "948348",                     "quantity": 1,  {
                  "menuSelections": [                 "externalReferenceId": "502633",
      {                              "externalReferenceIdquantity": "502633"1,
 
                          "quantity": 1,         "menuSelections": [
                  "price": {                      {
          "amount": 0,                                 "currencyexternalReferenceId": "EUR528232",
                            },                "quantity": 1,
            "id": "item_11107",                                "typeprice": "Item"{
                            }                    "amount": ]90,
                      "price": {                         "amountcurrency": 645,"EUR"
                        "currency": "EUR"                   },
 },                     "id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",                     "typeid": "Reward8ba0df7b35df",
                }             ]         }     } }

Offer with a combo

Code Block
"cart"type": "ItemOptionModifier"
{   "menuSelections": [     {       "externalReferenceId": "8351", // offer plu            "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id        }
"menuSelections": [             {                 "externalReferenceId": "8167", // combo plu ],
               "id": "d90a7113-0620-44d9-b678-743330a2f207", //combo sanity id                 "menuSelectionsprice": [
    {
               {                         "externalReferenceIdamount": "80003"0,
                        "id": "ce847c79-9eb5-4be3-8a1e-842919aa5ba0",                         "menuSelections": [],"currency": "EUR"
                         "price": {          },
                  "amount": 0,
                            "currencyid": "SARitem_11107",
                        },            "type": "Item"
           "quantity": 1,                    },
    "type": "Item"                     },         {
           {                         "externalReferenceId": "142538942258",
                        "id": "142538",           "quantity": 1,
            "menuSelections": [],                         "price": {
                                        "amount": 0,
                                        "currency": "SAREUR"
                        },            },
            "quantity": 1,
                        "typeid": "Itemitem_11126",
                    }                 ],"type": "Item"
                    "price": {           },
         "amount": 500, //price of the combo                  {
  "currency": "SAR"                 },                 ]"externalReferenceId": "527646",
                "price": {                    "amountquantity": 1001,
 //   final price of the offer                 "currency": "SAR"          "price": {
     },                 "quantity": 1,                 "typeamount": "Offer"0,
            }         ]     },

Offer with a picker

Code Block
"cart": {   "menuSelections": [
    {       "externalReferenceIdcurrency": "8351EUR",
 // offer plu       "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id         "menuSelections": [            },
{                 "externalReferenceId": "8168", //combo plu                 "id": "3318d2c29aac0a46-99d35a73-40f9431d-92d2937c-1798d9c5e9878848ca01ac86",
//combo sanity id                 "menuSelections": [                "type": "Item"
   {                         "externalReferenceId": "20001",   }
                     "id": "item_61936",              ],
          "menuSelections": [],                         "price": {
                                "amount": 0875,
                                "currency": "SAREUR"
                            },
                            "quantityid": 1"a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                            "type": "ItemCombo"
                    },    }
                {    ],
                    "externalReferenceIdprice": "80002",{
                        "idamount": "865a632f-e2f7-4e2b-8fcc-9281aa3f5868"450,
                        "menuSelectionscurrency": [], "EUR"
                    },
                    "priceid": { "024f9096-e3ee-45fc-8f76-d75e272ff9e9",
                    "type": "Reward"
         "amount": 0,      }
            ]
        }
    }
}

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": [
        {
            "type": "amount",
             "value": 200
        }
     ],
    "storeId": "12349",
    "cart": {	
         "menuSelections": [
             {
                "externalReferenceId": "502633",
                 "quantity": 1,
                "price": {
                    "amount": 645,
                    "currency": "EUR"
                },
                 "id": "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
{
    "payload": {
        "number": "5807",
        "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/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
        "id": "781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
        "orderDiscounts": [
            {
                "plu": "948348",
                "type": "percentage",
                "value": 50
            }
        ],
        "storeId": "12349",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "948348",
                    "quantity": 1,
                    "menuSelections": [
                        {
                            "externalReferenceId": "502633",
                            "quantity": 1,
                            "price": {
                                "amount": 0,
                                "currency": "EUR"
                            },
                            "id": "item_11107",
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 645,
                        "currency": "EUR"
                    },
                    "id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
                    "type": "Reward"
                }
            ]
        }
    }
}

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": [
    {
      "currencyexternalReferenceId": "SAR8351", // offer plu
      "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
        "menuSelections": [
    },        {
                "quantityexternalReferenceId": 1"8167", // combo plu
                     "typeid": "Item"
  d90a7113-0620-44d9-b678-743330a2f207", //combo sanity id
                 },"menuSelections": [
                    {
                        "externalReferenceId": "8000880003",
                        "id": "04462c22ce847c79-bf589eb5-4eee4be3-842a8a1e-213e3d17a072842919aa5ba0",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "142538",
                        "id": "142538",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
                ],
                "price": {
                    "amount": 500, //price of the combo
                    "currency": "SAR"
                },
                ],
                "price": {
                "amount": 100, // final price of the offer
                "currency": "SAR"
                },
                "quantity": 1,
                "type": "Offer"
            }
        ]
    },

...