{"_id":"582c7058e4a4920f00ff005f","project":"56c1e50bce02590d006091c9","parentDoc":null,"version":{"_id":"582c7058e4a4920f00ff0045","project":"56c1e50bce02590d006091c9","__v":2,"createdAt":"2016-11-16T14:42:32.468Z","releaseDate":"2016-11-16T14:42:32.468Z","categories":["582c7058e4a4920f00ff0046","582c7058e4a4920f00ff0047","582c7058e4a4920f00ff0048","582c7058e4a4920f00ff0049","582c7058e4a4920f00ff004a","582c7058e4a4920f00ff004b","582c7058e4a4920f00ff004c","582c7058e4a4920f00ff004d","582c7058e4a4920f00ff004e","582c7058e4a4920f00ff004f","582d97124b2536250038b392"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"__v":0,"category":{"_id":"582c7058e4a4920f00ff004d","__v":0,"version":"582c7058e4a4920f00ff0045","project":"56c1e50bce02590d006091c9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-26T12:33:01.341Z","from_sync":false,"order":6,"slug":"examples","title":"Examples"},"user":"56c2ea5f2c90fa17001b8383","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-26T12:41:59.684Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ULFYyUkPQOmXAgxA4ULL_10555158.png\",\n        \"10555158.png\",\n        \"316\",\n        \"834\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Id\\\": \\\"yuop540jukcowmlthkc2lg\\\",\\n  \\\"CustomerOrderId\\\": 10555158,\\n  \\\"Order\\\": {\\n    \\\"NoteToRestaurant\\\": null,\\n    \\\"ServiceType\\\": \\\"Delivery\\\",\\n    \\\"PlacedDate\\\": \\\"2015-04-28T12:24:28.8248+00:00\\\",\\n    \\\"DueDate\\\": \\\"2015-04-28T13:10:00+00:00\\\",\\n\\t\\\"DueDateWithUtcOffset\\\": \\\"2015-04-28T13:10:00+01:00\\\",\\n    \\\"InitialDueDate\\\": \\\"2015-04-28T13:10:00+00:00\\\",\\n\\t\\\"InitialDueDateWithUtcOffset\\\": \\\"2015-04-28T13:10:00+01:00\\\",\\n    \\\"PromptAsap\\\": true\\n  },\\n  \\\"RestaurantInfo\\\": {\\n    \\\"Id\\\": \\\"525\\\",\\n    \\\"Name\\\": \\\"Just Pizzas\\\",\\n    \\\"PhoneNumber\\\": \\\"01234567890\\\",\\n    \\\"AddressLines\\\": [\\n      \\\"15 Test Street\\\"\\n    ],\\n    \\\"City\\\": \\\"London\\\",\\n    \\\"Postcode\\\": \\\"EC4M 7rf\\\",\\n    \\\"DispatchMethod\\\": \\\"JEPosV1\\\",\\n    \\\"EmailAddress\\\": \\\"\\\"\\n  },\\n  \\\"PaymentInfo\\\": {\\n    \\\"PaymentLines\\\": [\\n      {\\n        \\\"Type\\\": \\\"Cash\\\",\\n        \\\"CardFee\\\": 0,\\n        \\\"Value\\\": 30.88\\n      }\\n    ],\\n    \\\"Total\\\": 30.88,\\n    \\\"TotalComplementary\\\": 0,\\n    \\\"PaidDate\\\": \\\"2015-04-28T12:24:51.632+00:00\\\",\\n    \\\"CashOnDelivery\\\": true\\n  },\\n  \\\"CustomerInfo\\\": {\\n    \\\"Id\\\": \\\"1957127\\\",\\n    \\\"Email\\\": \\\"new.user:::at:::just-eat.com\\\",\\n    \\\"Name\\\": \\\"asd\\\",\\n    \\\"Address\\\": \\\"Test, Test\\\",\\n    \\\"City\\\": \\\"Test\\\",\\n    \\\"Postcode\\\": \\\"SE16 1DD\\\",\\n    \\\"PhoneNumber\\\": \\\"1234567890\\\",\\n    \\\"TimeZone\\\": \\\"GMT Standard Time\\\",\\n    \\\"PreviousRestuarantOrderCount\\\": 0\\n  },\\n  \\\"BasketInfo\\\": {\\n    \\\"BasketId\\\": \\\"DizHSBDKakikPMy3sySBuQ\\\",\\n    \\\"MenuId\\\": 1649,\\n    \\\"Discounts\\\": [\\n      {\\n        \\\"Id\\\": 31410,\\n        \\\"Discount\\\": 20,\\n        \\\"DiscountType\\\": \\\"Percent\\\",\\n        \\\"QualifyingValue\\\": 30\\n      }\\n    ],\\n    \\\"SubTotal\\\": 38.6,\\n    \\\"ToSpend\\\": 0,\\n    \\\"MultiBuyDiscount\\\": 0,\\n    \\\"Discount\\\": 7.72,\\n    \\\"DeliveryCharge\\\": 0,\\n    \\\"Total\\\": 30.88,\\n    \\\"GroupedBasketItems\\\": [\\n      {\\n        \\\"BasketItem\\\": {\\n          \\\"ProductId\\\": 108700,\\n          \\\"ProductTypeId\\\": 5,\\n          \\\"MenuCardNumber\\\": \\\"300\\\",\\n          \\\"Name\\\": \\\"Coca-Cola\\\",\\n          \\\"Synonym\\\": \\\"0.33 L\\\",\\n          \\\"UnitPrice\\\": 0.7,\\n          \\\"CombinedPrice\\\": 2.8,\\n          \\\"MealParts\\\": [],\\n          \\\"OptionalAccessories\\\": [],\\n          \\\"RequiredAccessories\\\": [],\\n          \\\"Discounts\\\": [],\\n          \\\"MultiBuyDiscounts\\\": []\\n        },\\n        \\\"Quantity\\\": 4,\\n        \\\"CombinedPrice\\\": 2.8,\\n        \\\"OrderSubId\\\": 0,\\n        \\\"MenuCardNumber\\\": null\\n      },\\n      {\\n        \\\"BasketItem\\\": {\\n          \\\"ProductId\\\": 3585120,\\n          \\\"ProductTypeId\\\": 86,\\n          \\\"MenuCardNumber\\\": \\\"77\\\",\\n          \\\"Name\\\": \\\"Tex-Mex Platter\\\",\\n          \\\"Synonym\\\": \\\"\\\",\\n          \\\"UnitPrice\\\": 8.95,\\n          \\\"CombinedPrice\\\": 8.95,\\n          \\\"MealParts\\\": [\\n            {\\n              \\\"MealPartId\\\": 3584971,\\n              \\\"GroupId\\\": 1,\\n              \\\"Name\\\": \\\"Dip\\\",\\n              \\\"Synonym\\\": \\\"Chilli\\\",\\n              \\\"OptionalAccessories\\\": [],\\n              \\\"RequiredAccessories\\\": []\\n            },\\n            {\\n              \\\"MealPartId\\\": 3584971,\\n              \\\"GroupId\\\": 2,\\n              \\\"Name\\\": \\\"Dip\\\",\\n              \\\"Synonym\\\": \\\"Chilli\\\",\\n              \\\"OptionalAccessories\\\": [],\\n              \\\"RequiredAccessories\\\": []\\n            }\\n          ],\\n          \\\"OptionalAccessories\\\": [],\\n          \\\"RequiredAccessories\\\": [],\\n          \\\"Discounts\\\": [],\\n          \\\"MultiBuyDiscounts\\\": []\\n        },\\n        \\\"Quantity\\\": 1,\\n        \\\"CombinedPrice\\\": 8.95,\\n        \\\"OrderSubId\\\": 0,\\n        \\\"MenuCardNumber\\\": null\\n      },\\n      {\\n        \\\"BasketItem\\\": {\\n          \\\"ProductId\\\": 108719,\\n          \\\"ProductTypeId\\\": 86,\\n          \\\"MenuCardNumber\\\": \\\"64\\\",\\n          \\\"Name\\\": \\\"Family Meal\\\",\\n          \\\"Synonym\\\": \\\"\\\",\\n          \\\"UnitPrice\\\": 14.95,\\n          \\\"CombinedPrice\\\": 26.85,\\n          \\\"MealParts\\\": [\\n            {\\n              \\\"MealPartId\\\": 108509,\\n              \\\"GroupId\\\": 1,\\n              \\\"Name\\\": \\\"Beefy Eater\\\",\\n              \\\"Synonym\\\": \\\"12\\\\\\\" Thin Crust\\\",\\n              \\\"OptionalAccessories\\\": [\\n                {\\n                  \\\"OptionalAccessoryId\\\": 13,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Pepperoni\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 34,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Tuna\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 42,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Sweetcorn\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 48,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Beef\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 55,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Anchovies\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 56,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Prawns\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 72,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Tandoori Chicken\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 79,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Salami\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 122,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Spicy Sausage\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 137,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Red onions\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 138,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Egg\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 194,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Chicken\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 332,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 0.8,\\n                  \\\"Name\\\": \\\"Onions\\\"\\n                },\\n                {\\n                  \\\"OptionalAccessoryId\\\": 551,\\n                  \\\"Quantity\\\": 1,\\n                  \\\"UnitPrice\\\": 1.5,\\n                  \\\"Name\\\": \\\"Stuffed Edge with Cheese & Pepperoni\\\"\\n                }\\n              ],\\n              \\\"RequiredAccessories\\\": []\\n            },\\n            {\\n              \\\"MealPartId\\\": 3584971,\\n              \\\"GroupId\\\": 2,\\n              \\\"Name\\\": \\\"Dip\\\",\\n              \\\"Synonym\\\": \\\"Chilli\\\",\\n              \\\"OptionalAccessories\\\": [],\\n              \\\"RequiredAccessories\\\": []\\n            },\\n            {\\n              \\\"MealPartId\\\": 3584972,\\n              \\\"GroupId\\\": 3,\\n              \\\"Name\\\": \\\"Dip\\\",\\n              \\\"Synonym\\\": \\\"Garlic\\\",\\n              \\\"OptionalAccessories\\\": [],\\n              \\\"RequiredAccessories\\\": []\\n            },\\n            {\\n              \\\"MealPartId\\\": 108703,\\n              \\\"GroupId\\\": 4,\\n              \\\"Name\\\": \\\"Diet Coca-Cola\\\",\\n              \\\"Synonym\\\": \\\"1.5 L\\\",\\n              \\\"OptionalAccessories\\\": [],\\n              \\\"RequiredAccessories\\\": []\\n            }\\n          ],\\n          \\\"OptionalAccessories\\\": [],\\n          \\\"RequiredAccessories\\\": [],\\n          \\\"Discounts\\\": [],\\n          \\\"MultiBuyDiscounts\\\": []\\n        },\\n        \\\"Quantity\\\": 1,\\n        \\\"CombinedPrice\\\": 26.85,\\n        \\\"OrderSubId\\\": 0,\\n        \\\"MenuCardNumber\\\": null\\n      }\\n    ]\\n  },\\n  \\\"IsAMiniFistPumpOrder\\\": false\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"mealdeal-with-accessories-and-discount","type":"basic","title":"MealDeal with Accessories and discount"}

MealDeal with Accessories and discount


[block:image] { "images": [ { "image": [ "https://files.readme.io/ULFYyUkPQOmXAgxA4ULL_10555158.png", "10555158.png", "316", "834", "", "" ] } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"Id\": \"yuop540jukcowmlthkc2lg\",\n \"CustomerOrderId\": 10555158,\n \"Order\": {\n \"NoteToRestaurant\": null,\n \"ServiceType\": \"Delivery\",\n \"PlacedDate\": \"2015-04-28T12:24:28.8248+00:00\",\n \"DueDate\": \"2015-04-28T13:10:00+00:00\",\n\t\"DueDateWithUtcOffset\": \"2015-04-28T13:10:00+01:00\",\n \"InitialDueDate\": \"2015-04-28T13:10:00+00:00\",\n\t\"InitialDueDateWithUtcOffset\": \"2015-04-28T13:10:00+01:00\",\n \"PromptAsap\": true\n },\n \"RestaurantInfo\": {\n \"Id\": \"525\",\n \"Name\": \"Just Pizzas\",\n \"PhoneNumber\": \"01234567890\",\n \"AddressLines\": [\n \"15 Test Street\"\n ],\n \"City\": \"London\",\n \"Postcode\": \"EC4M 7rf\",\n \"DispatchMethod\": \"JEPosV1\",\n \"EmailAddress\": \"\"\n },\n \"PaymentInfo\": {\n \"PaymentLines\": [\n {\n \"Type\": \"Cash\",\n \"CardFee\": 0,\n \"Value\": 30.88\n }\n ],\n \"Total\": 30.88,\n \"TotalComplementary\": 0,\n \"PaidDate\": \"2015-04-28T12:24:51.632+00:00\",\n \"CashOnDelivery\": true\n },\n \"CustomerInfo\": {\n \"Id\": \"1957127\",\n \"Email\": \"new.user@just-eat.com\",\n \"Name\": \"asd\",\n \"Address\": \"Test, Test\",\n \"City\": \"Test\",\n \"Postcode\": \"SE16 1DD\",\n \"PhoneNumber\": \"1234567890\",\n \"TimeZone\": \"GMT Standard Time\",\n \"PreviousRestuarantOrderCount\": 0\n },\n \"BasketInfo\": {\n \"BasketId\": \"DizHSBDKakikPMy3sySBuQ\",\n \"MenuId\": 1649,\n \"Discounts\": [\n {\n \"Id\": 31410,\n \"Discount\": 20,\n \"DiscountType\": \"Percent\",\n \"QualifyingValue\": 30\n }\n ],\n \"SubTotal\": 38.6,\n \"ToSpend\": 0,\n \"MultiBuyDiscount\": 0,\n \"Discount\": 7.72,\n \"DeliveryCharge\": 0,\n \"Total\": 30.88,\n \"GroupedBasketItems\": [\n {\n \"BasketItem\": {\n \"ProductId\": 108700,\n \"ProductTypeId\": 5,\n \"MenuCardNumber\": \"300\",\n \"Name\": \"Coca-Cola\",\n \"Synonym\": \"0.33 L\",\n \"UnitPrice\": 0.7,\n \"CombinedPrice\": 2.8,\n \"MealParts\": [],\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": [],\n \"Discounts\": [],\n \"MultiBuyDiscounts\": []\n },\n \"Quantity\": 4,\n \"CombinedPrice\": 2.8,\n \"OrderSubId\": 0,\n \"MenuCardNumber\": null\n },\n {\n \"BasketItem\": {\n \"ProductId\": 3585120,\n \"ProductTypeId\": 86,\n \"MenuCardNumber\": \"77\",\n \"Name\": \"Tex-Mex Platter\",\n \"Synonym\": \"\",\n \"UnitPrice\": 8.95,\n \"CombinedPrice\": 8.95,\n \"MealParts\": [\n {\n \"MealPartId\": 3584971,\n \"GroupId\": 1,\n \"Name\": \"Dip\",\n \"Synonym\": \"Chilli\",\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": []\n },\n {\n \"MealPartId\": 3584971,\n \"GroupId\": 2,\n \"Name\": \"Dip\",\n \"Synonym\": \"Chilli\",\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": []\n }\n ],\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": [],\n \"Discounts\": [],\n \"MultiBuyDiscounts\": []\n },\n \"Quantity\": 1,\n \"CombinedPrice\": 8.95,\n \"OrderSubId\": 0,\n \"MenuCardNumber\": null\n },\n {\n \"BasketItem\": {\n \"ProductId\": 108719,\n \"ProductTypeId\": 86,\n \"MenuCardNumber\": \"64\",\n \"Name\": \"Family Meal\",\n \"Synonym\": \"\",\n \"UnitPrice\": 14.95,\n \"CombinedPrice\": 26.85,\n \"MealParts\": [\n {\n \"MealPartId\": 108509,\n \"GroupId\": 1,\n \"Name\": \"Beefy Eater\",\n \"Synonym\": \"12\\\" Thin Crust\",\n \"OptionalAccessories\": [\n {\n \"OptionalAccessoryId\": 13,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Pepperoni\"\n },\n {\n \"OptionalAccessoryId\": 34,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Tuna\"\n },\n {\n \"OptionalAccessoryId\": 42,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Sweetcorn\"\n },\n {\n \"OptionalAccessoryId\": 48,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Beef\"\n },\n {\n \"OptionalAccessoryId\": 55,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Anchovies\"\n },\n {\n \"OptionalAccessoryId\": 56,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Prawns\"\n },\n {\n \"OptionalAccessoryId\": 72,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Tandoori Chicken\"\n },\n {\n \"OptionalAccessoryId\": 79,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Salami\"\n },\n {\n \"OptionalAccessoryId\": 122,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Spicy Sausage\"\n },\n {\n \"OptionalAccessoryId\": 137,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Red onions\"\n },\n {\n \"OptionalAccessoryId\": 138,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Egg\"\n },\n {\n \"OptionalAccessoryId\": 194,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Chicken\"\n },\n {\n \"OptionalAccessoryId\": 332,\n \"Quantity\": 1,\n \"UnitPrice\": 0.8,\n \"Name\": \"Onions\"\n },\n {\n \"OptionalAccessoryId\": 551,\n \"Quantity\": 1,\n \"UnitPrice\": 1.5,\n \"Name\": \"Stuffed Edge with Cheese & Pepperoni\"\n }\n ],\n \"RequiredAccessories\": []\n },\n {\n \"MealPartId\": 3584971,\n \"GroupId\": 2,\n \"Name\": \"Dip\",\n \"Synonym\": \"Chilli\",\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": []\n },\n {\n \"MealPartId\": 3584972,\n \"GroupId\": 3,\n \"Name\": \"Dip\",\n \"Synonym\": \"Garlic\",\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": []\n },\n {\n \"MealPartId\": 108703,\n \"GroupId\": 4,\n \"Name\": \"Diet Coca-Cola\",\n \"Synonym\": \"1.5 L\",\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": []\n }\n ],\n \"OptionalAccessories\": [],\n \"RequiredAccessories\": [],\n \"Discounts\": [],\n \"MultiBuyDiscounts\": []\n },\n \"Quantity\": 1,\n \"CombinedPrice\": 26.85,\n \"OrderSubId\": 0,\n \"MenuCardNumber\": null\n }\n ]\n },\n \"IsAMiniFistPumpOrder\": false\n}", "language": "json" } ] } [/block]