Versions Compared

Key

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

...

Reward with a product discount

Expand
titleRBI Partner API
Code Block
languagejson
/{
    "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"
                }
            ]
        }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [
        {
            "menuItemId": 1001001, // Whopper
            "definitionSequence": 1,
            "quantity": 1,
            "itemDiscounts": [
                {
                    "discountId": 106, // PLU of the product amount discount off
                    "referenceText": "Offer Item Discount",
                    "total": 59 // amount of discount (can be sent as any number). 59 pesos off the whopper ALC price.
                }
            ]
        }

...

 

...

   ],
    "tenders": [
        

...

{
            

...

"tenderId": 901
        }
    

...

]
}

Offer Payload 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

Expand
titleRBI Partner API
Code Block
languagejson
"cart": {
  "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
                "menuSelections": [
                    {
                        "externalReferenceId": "80003",
                        "id": "ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
                        "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"
            }
        ]
    },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a picker

Expand
titleRBI Partner API
Code Block
languagejson
"cart": {
  "menuSelections": [
    {
      "externalReferenceId": "8351", // offer plu
      "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
        "menuSelections": [
            {
                "externalReferenceId": "8168", //combo plu
                "id": "3318d2c2-99d3-40f9-92d2-1798d9c5e987", //combo sanity id
                "menuSelections": [
                    {
                        "externalReferenceId": "20001",
                        "id": "item_61936",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80002",
                        "id": "865a632f-e2f7-4e2b-8fcc-9281aa3f5868",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80008",
                        "id": "04462c22-bf58-4eee-842a-213e3d17a072",
                        "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"
            }
        ]
    },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payload": {
        "number": "5814",
        "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/6d66a02e-810f-478f-bf0d-b69bfcb56d51/price/callback",
        "id": "6d66a02e-810f-478f-bf0d-b69bfcb56d51",
        "orderDiscounts": [
            {
                "type": "percentage",
                "value": 20
            }
        ],
        "storeId": "12349",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "502633",
                    "quantity": 1,
                    "price": {
                        "amount": 645,
                        "currency": "EUR"
                    },
                    "id": "item_11107",
                    "type": "Item"
                }
            ]
        }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a product discount

Expand
titleRBI Partner API
Code Block
{
    "payload": {
        "number": "5821",
        "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/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",
        "id": "ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",
        "orderDiscounts": [
            {
                "plu": "502617",
                "type": "percentage",
                "value": 20
            }
        ],
        "storeId": "12349",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "502617",
                    "quantity": 1,
                    "menuSelections": [
                        {
                            "externalReferenceId": "502633",
                            "quantity": 1,
                            "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": "Offer"
                }
            ]
        }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Reference

NMS guides on how to set up offers and rewards in Sanity for Oracle: /wiki/spaces/MS/pages/4057661622