From 64f214f3aef81cea6e12175b0a3b46861b8402b9 Mon Sep 17 00:00:00 2001 From: MOHAN Date: Sun, 29 Mar 2026 18:43:03 +0530 Subject: [PATCH] Add curated v2 menu example payload pack and Postman samples --- .../05-menu-example-payloads.md | 29 ++++++ .../05-menu-integration-audit.md | 3 + docs/developer-portal/05-menus.md | 5 + .../menus/v2/combo-bundled-items.json | 52 +++++++++++ docs/examples/menus/v2/empty-menu.json | 22 +++++ .../menus/v2/fulfillment-delivery-menu.json | 39 ++++++++ .../menus/v2/fulfillment-pickup-menu.json | 39 ++++++++ docs/examples/menus/v2/simple-menu.json | 92 +++++++++++++++++++ .../examples/menus/v2/update-item-sparse.json | 25 +++++ postman/Uber_Wrapper.postman_collection.json | 66 +++++++++++++ 10 files changed, 372 insertions(+) create mode 100644 docs/developer-portal/05-menu-example-payloads.md create mode 100644 docs/examples/menus/v2/combo-bundled-items.json create mode 100644 docs/examples/menus/v2/empty-menu.json create mode 100644 docs/examples/menus/v2/fulfillment-delivery-menu.json create mode 100644 docs/examples/menus/v2/fulfillment-pickup-menu.json create mode 100644 docs/examples/menus/v2/simple-menu.json create mode 100644 docs/examples/menus/v2/update-item-sparse.json diff --git a/docs/developer-portal/05-menu-example-payloads.md b/docs/developer-portal/05-menu-example-payloads.md new file mode 100644 index 0000000..860c4e9 --- /dev/null +++ b/docs/developer-portal/05-menu-example-payloads.md @@ -0,0 +1,29 @@ +# 05 Menu Example Payloads (v2) + +These files are curated from the Uber v2 menu examples you shared, cleaned into valid JSON and ready for direct use in this wrapper. + +Use with: + +- Upload menu: `PUT /api/v1/uber/menu/replace` +- Update one item (sparse): `POST /api/v1/uber/menu/items` + +## Files + +- `docs/examples/menus/v2/empty-menu.json` + - Empty menu payload (can clear existing menu) +- `docs/examples/menus/v2/simple-menu.json` + - Simple menu with categories, items, and modifier groups +- `docs/examples/menus/v2/fulfillment-delivery-menu.json` + - Delivery-specific menu (`menu_type = MENU_TYPE_FULFILLMENT_DELIVERY`) +- `docs/examples/menus/v2/fulfillment-pickup-menu.json` + - Pickup-specific menu (`menu_type = MENU_TYPE_FULFILLMENT_PICK_UP`) +- `docs/examples/menus/v2/combo-bundled-items.json` + - Combo example with `bundled_items` + `core_price` +- `docs/examples/menus/v2/update-item-sparse.json` + - Sparse item update for `POST /v2/eats/stores/{store_id}/menus/items/{item_id}` + +## Practical Notes + +- For split fulfillment menus, upload `DELIVERY` first; after split, manage each menu type separately. +- Keep item IDs stable and avoid problematic characters like `/` and `;`. +- `alcoholic_items > 0` behaves as sticky in Uber and cannot be reverted by normal API update. diff --git a/docs/developer-portal/05-menu-integration-audit.md b/docs/developer-portal/05-menu-integration-audit.md index 10cea77..16a7a86 100644 --- a/docs/developer-portal/05-menu-integration-audit.md +++ b/docs/developer-portal/05-menu-integration-audit.md @@ -20,6 +20,9 @@ Source checked: Uber Eats "Menu Integration" section shared by you. - aligned to upstream `POST /v2/eats/stores/{store_id}/menus/items/{item_id}` - request body is sparse update (only provided fields are changed) - supports `menu_type` enum for split delivery/pickup/dine-in menus +- Example payload pack: + - Added curated v2 JSON examples under `docs/examples/menus/v2/` + - Added index doc `docs/developer-portal/05-menu-example-payloads.md` ## Existing Before diff --git a/docs/developer-portal/05-menus.md b/docs/developer-portal/05-menus.md index 58bb347..1899441 100644 --- a/docs/developer-portal/05-menus.md +++ b/docs/developer-portal/05-menus.md @@ -43,3 +43,8 @@ Best-practice note: - Use API-managed menus only for integrated stores (avoid manual Menu Maker edits to prevent drift). - Alcoholic item flag is effectively sticky in Uber (`alcoholic_items > 0` cannot be reverted by API update). + +Example payload pack: + +- See [05-menu-example-payloads.md](./05-menu-example-payloads.md) +- JSON payloads are in `docs/examples/menus/v2/` diff --git a/docs/examples/menus/v2/combo-bundled-items.json b/docs/examples/menus/v2/combo-bundled-items.json new file mode 100644 index 0000000..d06c798 --- /dev/null +++ b/docs/examples/menus/v2/combo-bundled-items.json @@ -0,0 +1,52 @@ +{ + "menus": [ + { + "id": "Menu", + "title": { "translations": { "en_us": "Menu" } }, + "service_availability": [ + { "day_of_week": "monday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] } + ], + "category_ids": ["Mains"] + } + ], + "categories": [ + { + "id": "Mains", + "title": { "translations": { "en_us": "Mains" } }, + "entities": [ + { "type": "ITEM", "id": "Burger_Combo" }, + { "type": "ITEM", "id": "Best_Fries" } + ] + } + ], + "items": [ + { + "id": "Burger_Combo", + "title": { "translations": { "en_us": "Best Burger Combo" } }, + "price_info": { "price": 900, "overrides": [] }, + "modifier_group_ids": { "ids": ["Select-Drink"] }, + "bundled_items": [ + { "item_id": "Best_Fries", "core_price": 300, "included_quantity": 1 } + ] + }, + { + "id": "Best_Fries", + "title": { "translations": { "en_us": "Best Fries" } }, + "price_info": { "price": 300, "overrides": [] } + }, + { + "id": "Root_Beer", + "title": { "translations": { "en_us": "Root Beer" } }, + "price_info": { "price": 0, "core_price": 200, "overrides": [] } + } + ], + "modifier_groups": [ + { + "id": "Select-Drink", + "title": { "translations": { "en_us": "Select Drink" } }, + "quantity_info": { "quantity": { "max_permitted": 1 } }, + "modifier_options": [{ "type": "ITEM", "id": "Root_Beer" }] + } + ], + "display_options": {} +} diff --git a/docs/examples/menus/v2/empty-menu.json b/docs/examples/menus/v2/empty-menu.json new file mode 100644 index 0000000..d5d4d94 --- /dev/null +++ b/docs/examples/menus/v2/empty-menu.json @@ -0,0 +1,22 @@ +{ + "items": [], + "modifier_groups": [], + "categories": [], + "menus": [ + { + "id": "empty_menu_id", + "title": { "translations": { "en_us": "Empty Menu" } }, + "service_availability": [ + { "day_of_week": "monday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "tuesday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "wednesday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "thursday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "friday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "saturday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] }, + { "day_of_week": "sunday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] } + ], + "category_ids": [] + } + ], + "display_options": {} +} diff --git a/docs/examples/menus/v2/fulfillment-delivery-menu.json b/docs/examples/menus/v2/fulfillment-delivery-menu.json new file mode 100644 index 0000000..0255cea --- /dev/null +++ b/docs/examples/menus/v2/fulfillment-delivery-menu.json @@ -0,0 +1,39 @@ +{ + "menu_type": "MENU_TYPE_FULFILLMENT_DELIVERY", + "menus": [ + { + "id": "Special", + "title": { "translations": { "en_us": "Specials" } }, + "service_availability": [ + { "day_of_week": "monday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] } + ], + "category_ids": ["Specials"] + } + ], + "categories": [ + { + "id": "Specials", + "title": { "translations": { "en_us": "Specials" } }, + "entities": [ + { "type": "ITEM", "id": "Best_Burger_Delivery" }, + { "type": "ITEM", "id": "Best_Fries" } + ] + } + ], + "items": [ + { + "id": "Best_Burger_Delivery", + "title": { "translations": { "en_us": "Best Burger" } }, + "price_info": { "price": 900 }, + "tax_info": {} + }, + { + "id": "Best_Fries", + "title": { "translations": { "en_us": "Best Fries" } }, + "price_info": { "price": 300 }, + "tax_info": {} + } + ], + "modifier_groups": [], + "display_options": {} +} diff --git a/docs/examples/menus/v2/fulfillment-pickup-menu.json b/docs/examples/menus/v2/fulfillment-pickup-menu.json new file mode 100644 index 0000000..ee365ba --- /dev/null +++ b/docs/examples/menus/v2/fulfillment-pickup-menu.json @@ -0,0 +1,39 @@ +{ + "menu_type": "MENU_TYPE_FULFILLMENT_PICK_UP", + "menus": [ + { + "id": "Special", + "title": { "translations": { "en_us": "Specials" } }, + "service_availability": [ + { "day_of_week": "monday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] } + ], + "category_ids": ["Specials"] + } + ], + "categories": [ + { + "id": "Specials", + "title": { "translations": { "en_us": "Specials" } }, + "entities": [ + { "type": "ITEM", "id": "Best_Burger_Pickup" }, + { "type": "ITEM", "id": "Best_Fries" } + ] + } + ], + "items": [ + { + "id": "Best_Burger_Pickup", + "title": { "translations": { "en_us": "Best Burger + Pop" } }, + "price_info": { "price": 1100 }, + "tax_info": {} + }, + { + "id": "Best_Fries", + "title": { "translations": { "en_us": "Best Fries" } }, + "price_info": { "price": 500 }, + "tax_info": {} + } + ], + "modifier_groups": [], + "display_options": {} +} diff --git a/docs/examples/menus/v2/simple-menu.json b/docs/examples/menus/v2/simple-menu.json new file mode 100644 index 0000000..4d990f8 --- /dev/null +++ b/docs/examples/menus/v2/simple-menu.json @@ -0,0 +1,92 @@ +{ + "items": [ + { + "id": "Coffee", + "title": { "translations": { "en_us": "Coffee" } }, + "description": { "translations": { "en_us": "Deliciously roasted beans" } }, + "modifier_group_ids": { "ids": ["Add-milk", "Add-sugar"] }, + "price_info": { "price": 300 }, + "tax_info": { "tax_rate": 8 } + }, + { + "id": "Milk", + "title": { "translations": { "en_us": "Milk" } }, + "quantity_info": { + "overrides": [ + { + "context_type": "MODIFIER_GROUP", + "context_value": "Add-milk", + "quantity": { "max_permitted": 1 } + } + ] + }, + "price_info": { + "price": 0, + "overrides": [ + { + "context_type": "MODIFIER_GROUP", + "context_value": "Add-milk", + "price": 0 + } + ] + }, + "tax_info": { "tax_rate": 8 } + }, + { + "id": "Sugar", + "title": { "translations": { "en_us": "Sugar" } }, + "quantity_info": { + "overrides": [ + { + "context_type": "MODIFIER_GROUP", + "context_value": "Add-sugar", + "quantity": { "max_permitted": 2 } + } + ] + }, + "price_info": { + "price": 2, + "overrides": [ + { + "context_type": "MODIFIER_GROUP", + "context_value": "Add-sugar", + "price": 0 + } + ] + }, + "tax_info": { "tax_rate": 8 } + } + ], + "modifier_groups": [ + { + "id": "Add-milk", + "title": { "translations": { "en_us": "Add milk" } }, + "quantity_info": { "quantity": { "max_permitted": 1 } }, + "modifier_options": [{ "type": "ITEM", "id": "Milk" }] + }, + { + "id": "Add-sugar", + "title": { "translations": { "en_us": "Add sugar" } }, + "quantity_info": { "quantity": { "max_permitted": 2 } }, + "modifier_options": [{ "type": "ITEM", "id": "Sugar" }] + } + ], + "categories": [ + { + "id": "Drinks", + "title": { "translations": { "en_us": "Drinks" } }, + "entities": [{ "type": "ITEM", "id": "Coffee" }] + } + ], + "menus": [ + { + "id": "All-day", + "title": { "translations": { "en_us": "All day" } }, + "service_availability": [ + { "day_of_week": "monday", "time_periods": [{ "start_time": "00:00", "end_time": "23:59" }] } + ], + "category_ids": ["Drinks"] + } + ], + "display_options": { "disable_item_instructions": true } +} diff --git a/docs/examples/menus/v2/update-item-sparse.json b/docs/examples/menus/v2/update-item-sparse.json new file mode 100644 index 0000000..49454d3 --- /dev/null +++ b/docs/examples/menus/v2/update-item-sparse.json @@ -0,0 +1,25 @@ +{ + "menu_type": "MENU_TYPE_FULFILLMENT_DELIVERY", + "price_info": { + "price": 1300, + "container_deposit": 100, + "overrides": [] + }, + "suspension_info": { + "suspension": null, + "overrides": [ + { + "context_type": "MODIFIER_GROUP", + "context_value": "size", + "suspension": { + "suspend_until": 8640000000, + "reason": null + } + } + ] + }, + "product_info": { + "target_market": "EU", + "gtin": "1354435445" + } +} diff --git a/postman/Uber_Wrapper.postman_collection.json b/postman/Uber_Wrapper.postman_collection.json index d715d1b..1882fe0 100644 --- a/postman/Uber_Wrapper.postman_collection.json +++ b/postman/Uber_Wrapper.postman_collection.json @@ -199,6 +199,72 @@ } } }, + { + "name": "Upload Simple Menu Example", + "request": { + "method": "PUT", + "header": [ + { + "key": "x-api-key", + "value": "{{apiKey}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"merchantId\": \"{{merchantId}}\",\n \"storeId\": \"{{storeId}}\",\n \"menu\": {\n \"items\": [\n {\n \"id\": \"Coffee\",\n \"title\": { \"translations\": { \"en_us\": \"Coffee\" } },\n \"price_info\": { \"price\": 300 },\n \"tax_info\": { \"tax_rate\": 8 }\n }\n ],\n \"modifier_groups\": [],\n \"categories\": [\n {\n \"id\": \"Drinks\",\n \"title\": { \"translations\": { \"en_us\": \"Drinks\" } },\n \"entities\": [{ \"type\": \"ITEM\", \"id\": \"Coffee\" }]\n }\n ],\n \"menus\": [\n {\n \"id\": \"All-day\",\n \"title\": { \"translations\": { \"en_us\": \"All day\" } },\n \"service_availability\": [\n { \"day_of_week\": \"monday\", \"time_periods\": [{ \"start_time\": \"00:00\", \"end_time\": \"23:59\" }] }\n ],\n \"category_ids\": [\"Drinks\"]\n }\n ],\n \"display_options\": {}\n }\n}" + }, + "url": { + "raw": "{{baseUrl}}/api/v1/uber/menu/replace", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "v1", + "uber", + "menu", + "replace" + ] + } + } + }, + { + "name": "Upload Empty Menu Example", + "request": { + "method": "PUT", + "header": [ + { + "key": "x-api-key", + "value": "{{apiKey}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"merchantId\": \"{{merchantId}}\",\n \"storeId\": \"{{storeId}}\",\n \"menu\": {\n \"items\": [],\n \"modifier_groups\": [],\n \"categories\": [],\n \"menus\": [\n {\n \"id\": \"empty_menu_id\",\n \"title\": { \"translations\": { \"en_us\": \"Empty Menu\" } },\n \"service_availability\": [\n { \"day_of_week\": \"monday\", \"time_periods\": [{ \"start_time\": \"00:00\", \"end_time\": \"23:59\" }] }\n ],\n \"category_ids\": []\n }\n ],\n \"display_options\": {}\n }\n}" + }, + "url": { + "raw": "{{baseUrl}}/api/v1/uber/menu/replace", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "v1", + "uber", + "menu", + "replace" + ] + } + } + }, { "name": "Update Item (v2 Sparse)", "request": {