Versions Compared

Key

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

Contents

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
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": [
      {
        "externalReferenceIdid": "83517ee7338a-a016-47c6-aef6-3783d40c003e", // reward pluReward Sanity id
        "idexternalReferenceId": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f123", //reward sanity id Reward constant plu defined in Sanity
        "menuSelectionsquantity": [1,
        "price": {
     {     "amount": 0,
          "externalReferenceIdcurrency": "8350SAR",
// combo plu        }
        "idtype": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity id
     Reward", 
         "menuSelections": [
          {
         {   "externalReferenceId": "51056", // item constant plu
                "externalReferenceIdid": "10059item_1862", // item Sanity id
            "menuSelections": [],
      "id": "item_1852",     "price": {
                  "menuSelectionsamount": []2495, // normal   price
                   "pricecurrency": {"SAR"
            },
               "amountquantity": 01,
            "type": "Item"
          }
   "currency": "SAR"    ]
      }
    ]
  }
]

Reward with a combo

Code Block
"cart": {
   },"menuSelections": [
    {
      "externalReferenceId": "8351", // reward plu
      "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", "quantity//reward sanity id
        "menuSelections": 1,[
            {
                "typeexternalReferenceId": "Item8350", // combo plu
                 },
  "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity id
                "menuSelections": {[
                     {
  "externalReferenceId": "80007",                         "externalReferenceId": "10059",
                        "id": "4f99db1e-128a-4e53-b23b-dffc0fedf636item_1852",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "8000180007",
                        "id": "16f482db4f99db1e-2f13128a-44764e53-88d3b23b-d2eec26057f3dffc0fedf636",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "14113980001",
                        "id": "14113916f482db-2f13-4476-88d3-d2eec26057f3",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
 ,
              ],      {
          "price": {
                "amountexternalReferenceId": 300"141139",
//    original price of combo                 "currencyid": "SAR141139",
                 },         "menuSelections": [],
        "quantity": 1,                  "typeprice": "Combo"{
                 }               ]"amount": 0,
              "price": {               "amountcurrency": 0, // final price of the reward"SAR"
                    "currency": "SAR"   },
           },               "quantity": 1,
                        "type": "RewardItem"
               }     }
    ]     },

Reward with a cart discount

Code Block
"payload": {     "number": "5803" ],
    "fees": [            "price": {
                "totalamount": {300, // original price of combo
                "amountcurrency": 19, "SAR"
                 },
  "currency": "EUR"              }"quantity": 1,
                 "type": "BAG_FEECombo"
                 }
      ],       "serviceMode": "DELIVERY", ],
       "channel": "WHITELABEL_DELIVERY",       "callbackUrlprice": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback",{
        "id": "60c1983c-8cbc-4aa8-9486-c55fa78566f5",     "orderDiscountsamount": [0, // final price of the reward
  {             "typecurrency": "amountSAR",

            "value": 200 },
       }
     ],     "storeIdquantity": "12349"1,
    "cart": {	          "menuSelectionstype": ["Reward"
            }
{        ]
    },

Reward with a combo + premium modifier

Code Block
{
    "externalReferenceIdpayload": {
        "number": "5026335848",
        "fees": [
         "quantity": 1,   {
                "pricetotal": {
                    "amount": 64519,
                    "currency": "EUR"
                },
                 "idtype": "itemBAG_11107FEE",
            }
    "type": "Item"    ],
        "serviceMode": "DELIVERY",
 }       "channel": "WHITELABEL_DELIVERY",
]     }
 }

Reward with a product discount

Code Block
{   "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/15c3dbe1-5165-404b-8858-088239d14014/price/callback",
        "payloadid": {"15c3dbe1-5165-404b-8858-088239d14014",
        "numberstoreId": "580712349",
        "feescart": [{
            {"menuSelections": [
               "total": {
                    "amountexternalReferenceId": 19"948351",
                    "currencyquantity": "EUR"1,
                },    "menuSelections": [
           "type": "BAG_FEE"            {
}         ],         "serviceMode": "DELIVERY",         "channelexternalReferenceId": "WHITELABEL_DELIVERY502617",
        "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",         "orderDiscountsquantity": [1,
            {                 "plumenuSelections": "948348",[
                   "type": "percentage",            {
    "value": 50             }         ],         "storeIdexternalReferenceId": "12349502633",
         "cart": {             "menuSelections": [            "quantity": 1,
   {                     "externalReferenceId": "948348",           "menuSelections": [
        "quantity": 1,                     "menuSelections": [         {
               {                             "externalReferenceId": "502633528232",
 
                          "quantity": 1,                 "quantity": 1,
          "price": {                                 "amountprice": 0,{
                                "currency": "EUR"               "amount": 90,
                },                                "idcurrency": "item_11107EUR",
                             "type": "Item"              },
          }                     ],             "id": "8ba0df7b35df",
      "price": {                         "amount": 645,           "type": "ItemOptionModifier"
            "currency": "EUR"                     },      }
              "id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",                     "type": "Reward"],
                 }             ]      "price": {
 }     }
}

Offer with a combo

Code Block
"cart": {          "menuSelections": [     {       "externalReferenceId": "8351", // offer plu       "idamount": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f"0,
//offer sanity id         "menuSelections": [
            {                 "externalReferenceIdcurrency": "8167EUR",
// combo plu                 "id": "d90a7113-0620-44d9-b678-743330a2f207", //combo sanity id              },
  "menuSelections": [                     {            "id": "item_11107",
           "externalReferenceId": "80003",
                        "idtype": "ce847c79-9eb5-4be3-8a1e-842919aa5ba0",Item"
                        "menuSelections": [],        },
                "price": {               {
             "amount": 0,                             "currency"externalReferenceId": "SAR942258",
                        },             "quantity": 1,
          "quantity": 1,                         "typeprice": "Item"{
                    },                     {"amount": 0,
                        "externalReferenceId": "142538",                 "currency": "EUR"
       "id": "142538",                         "menuSelections": [],  },
                      "price": {             "id": "item_11126",
              "amount": 0,                     "type": "Item"
      "currency": "SAR"                         },
                        "quantity": 1,        {
                  "type": "Item"                 "externalReferenceId": "527646",
  }                 ],                 "pricequantity": {1,
                    "amount": 500, //price of the combo           "price": {
        "currency": "SAR"                 },              "amount": 0,
 ],                 "price": {                 "amount": 100, // final price of the offer"currency": "EUR"
                  "currency": "SAR"                 },
                  "quantity": 1,                 "typeid": "Offer"9aac0a46-5a73-431d-937c-8848ca01ac86",
            }               ]     },

Offer with a picker

Code Block
"cart": {   "menuSelectionstype": ["Item"
     {       "externalReferenceId": "8351", // offer plu              "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id  }
      "menuSelections": [             {        ],
        "externalReferenceId": "8168", //combo plu                 "idprice": "3318d2c2-99d3-40f9-92d2-1798d9c5e987", //combo sanity id{
                   "menuSelections": [            "amount": 875,
       {                         "externalReferenceIdcurrency": "20001EUR",
                           "id": "item_61936" },
                        "menuSelections    "id": []"a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                        "price": {   "type": "Combo"
                        "amount": 0,}
                    ],
        "currency": "SAR"           "price": {
            },
                        "quantityamount": 1450,
                        "typecurrency": "ItemEUR"
                    },
                    {
   "id": "024f9096-e3ee-45fc-8f76-d75e272ff9e9",
                    "externalReferenceIdtype": "80002Reward",
                }
       "id": "865a632f-e2f7-4e2b-8fcc-9281aa3f5868",    ]
        }
    }
}

Reward with a cart discount

Code Block
"payload": {
    "menuSelectionsnumber": [],"5803",
    "fees": [
        {
            "pricetotal": {
                "amount": 19,
                 "amountcurrency": 0, "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"
            }
        ]
    },

...