Skip to content

Instantly share code, notes, and snippets.

@mreid1130
Created June 19, 2019 22:01
Show Gist options
  • Save mreid1130/ab255b10ca291d767149677a21c38f0a to your computer and use it in GitHub Desktop.
Save mreid1130/ab255b10ca291d767149677a21c38f0a to your computer and use it in GitHub Desktop.

Generate Preview (new order) - POST /api/orders/order/meal-plan/generate-preview/

Example Request Payload:

{
    "event_id": 10777,
    "meal_id": 12,
    "delivery_datetime": "2019-06-21T19:30:00+00:00",
    "add_on_items": [{
        "client_price": 0,
        "included_item_ids": [
            156
        ],
        "is_included_item": false,
        "dietary_restriction_groups": [
            6,
            1,
            2,
            4
        ],
        "portion_unit": {
            "id": 8,
            "name": "oz. (weight)"
        },
        "item_id": 151,
        "id": 0,
        "total_amount": 134,
        "name": "Seasonal Salad",
        "total_cost": 100.5,
        "meal_component": 2,
        "vendor_cost": 1.5,
        "priority": 1,
        "portion_amount": 2,
        "is_add_on": false,
        "quantity": 100,
        "key": "151-2-1"
    }]
}

Example Response

{
    "id": 0,
    "order_id": "FN4H2",
    "delivery_datetime": "2019-06-21T12:30:00-07:00",
    "add_on_items": [
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 200,
            "name": "Seasonal Salad",
            "total_cost": 150,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 100,
            "portion_amount": 2,
            "is_add_on": true,
            "quantity": 100,
            "key": "151-2-100-a"
        }
    ],
    "included_items": [
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 138,
            "id": 0,
            "total_amount": 50,
            "name": "Tomato Cilantro Sauce",
            "total_cost": 0,
            "meal_component_id": 1,
            "vendor_cost": 0,
            "priority": 2,
            "portion_amount": 0.8,
            "is_add_on": false,
            "quantity": 63,
            "key": "138-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 9,
                "name": "serving"
            },
            "item_id": 156,
            "id": 0,
            "total_amount": 501,
            "name": "Homemade Dressing",
            "total_cost": 0,
            "meal_component_id": 2,
            "vendor_cost": 0,
            "priority": 1,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 167,
            "key": "156-2-1"
        }
    ],
    "items": [
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 135,
            "id": 0,
            "total_amount": 52,
            "name": "Turkey Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "135-1-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 136,
            "id": 0,
            "total_amount": 22,
            "name": "Vegetarian Momo",
            "total_cost": 33,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 2,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 11,
            "key": "136-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 137,
            "id": 0,
            "total_amount": 52,
            "name": "Lamb Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 3,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "137-1-3"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 143,
            "id": 0,
            "total_amount": 6,
            "name": "Baigun Bharta",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 4,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "143-1-4"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 144,
            "id": 0,
            "total_amount": 6,
            "name": "Grilled Nepali Chicken",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 5,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "144-1-5"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 145,
            "id": 0,
            "total_amount": 48,
            "name": "Palungo Paneer",
            "total_cost": 36,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 6,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 6,
            "key": "145-1-6"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 146,
            "id": 0,
            "total_amount": 208,
            "name": "Kukhura Aloo",
            "total_cost": 156,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 7,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 26,
            "key": "146-1-7"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 147,
            "id": 0,
            "total_amount": 162,
            "name": "Pork Choila",
            "total_cost": 148.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 8,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 27,
            "key": "147-1-8"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1,
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 148,
            "id": 0,
            "total_amount": 56,
            "name": "Golveda Ra Tofu Hariyo Keraw",
            "total_cost": 42,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 9,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 7,
            "key": "148-1-9"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 134,
            "name": "Seasonal Salad",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 67,
            "key": "151-2-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 155,
            "id": 0,
            "total_amount": 201,
            "name": "Jeera Brown Rice",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 2,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 67,
            "key": "155-2-2"
        }
    ],
    "item_swaps": [],
    "meal": {
        "id": 12,
        "name": "Turkey/Lamb Momo Meal",
        "package": "VARIETY"
    },
    "menu": {
        "id": 7,
        "name": "Nepali Momo Menu",
        "description": "Nepali food is hearty and flavorful! Get a taste with some salad, two sides, two momos, one main and some of Bini's tomato-cilantro sauce for dipping."
    },
    "notes": "",
    "organization": {
        "id": 7724,
        "name": "Chewse HQ",
        "meal_specialist": 8373,
        "ops_notes": ""
    },
    "vendor": {
        "id": 559,
        "name": "Bini's Kitchen",
        "branch": ""
    },
    "guests": 67,
    "delivery_pickup_time": "2019-06-21T18:20:00Z",
    "timezone": "America/Los_Angeles",
    "is_demo": false,
    "is_canceled": false,
    "latest_order_ack_id": null,
    "vendor_ack_status": "unrequested",
    "dietary_restrictions": [
        {
            "id": 1,
            "count": 11
        },
        {
            "id": 2,
            "count": 2
        },
        {
            "id": 3,
            "count": 0
        },
        {
            "id": 4,
            "count": 2
        },
        {
            "id": 5,
            "count": 0
        },
        {
            "id": 6,
            "count": 0
        }
    ],
    "total_cost": 783.5,
    "schedule_ruleset": {
        "id": 10777,
        "name": "Lunch Time",
        "ops_notes": "",
        "guest_count": 67,
        "meal_type": {},
        "meal_period": {
            "id": 2,
            "name": "Lunch"
        },
        "package": "",
        "dietary_restrictions_groups": [
            {
                "id": 1,
                "name": "Vegetarian"
            },
            {
                "id": 2,
                "name": "Vegan"
            },
            {
                "id": 4,
                "name": "Meat + Gluten Free"
            }
        ],
        "frequency": null,
        "organization_allergies": [],
        "organization": {
            "id": 7724,
            "name": "Chewse HQ"
        },
        "notes": ""
    },
    "meal_sections": []
}

Generate Preview (Existing Order) - PUT /api/orders/order/meal-plan/:order_id/

Example Request Payload

{
    "id": 264397,
    "add_on_items": [
        {
            "dietary_restriction_groups": [6],
            "item_id": 151,
            "id": 0,
            "meal_component": 2,
            "quantity": 10
        }
    ]
}

Example Response

{
    "id": 264397,
    "order_id": "F9YLU",
    "delivery_datetime": "2019-06-21T12:30:00-07:00",
    "add_on_items": [
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 20,
            "name": "Seasonal Salad",
            "total_cost": 15,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 100,
            "portion_amount": 2,
            "is_add_on": true,
            "quantity": 10,
            "key": "151-2-100-a"
        }
    ],
    "included_items": [
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 138,
            "id": 0,
            "total_amount": 50,
            "name": "Tomato Cilantro Sauce",
            "total_cost": 0,
            "meal_component_id": 1,
            "vendor_cost": 0,
            "priority": 2,
            "portion_amount": 0.8,
            "is_add_on": false,
            "quantity": 63,
            "key": "138-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 9,
                "name": "serving"
            },
            "item_id": 156,
            "id": 0,
            "total_amount": 231,
            "name": "Homemade Dressing",
            "total_cost": 0,
            "meal_component_id": 2,
            "vendor_cost": 0,
            "priority": 1,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 77,
            "key": "156-2-1"
        }
    ],
    "items": [
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 135,
            "id": 0,
            "total_amount": 52,
            "name": "Turkey Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "135-1-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 136,
            "id": 0,
            "total_amount": 22,
            "name": "Vegetarian Momo",
            "total_cost": 33,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 2,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 11,
            "key": "136-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 137,
            "id": 0,
            "total_amount": 52,
            "name": "Lamb Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 3,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "137-1-3"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 143,
            "id": 0,
            "total_amount": 6,
            "name": "Baigun Bharta",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 4,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "143-1-4"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 144,
            "id": 0,
            "total_amount": 6,
            "name": "Grilled Nepali Chicken",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 5,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "144-1-5"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 145,
            "id": 0,
            "total_amount": 48,
            "name": "Palungo Paneer",
            "total_cost": 36,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 6,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 6,
            "key": "145-1-6"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 146,
            "id": 0,
            "total_amount": 208,
            "name": "Kukhura Aloo",
            "total_cost": 156,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 7,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 26,
            "key": "146-1-7"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 147,
            "id": 0,
            "total_amount": 162,
            "name": "Pork Choila",
            "total_cost": 148.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 8,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 27,
            "key": "147-1-8"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1,
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 148,
            "id": 0,
            "total_amount": 56,
            "name": "Golveda Ra Tofu Hariyo Keraw",
            "total_cost": 42,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 9,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 7,
            "key": "148-1-9"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 134,
            "name": "Seasonal Salad",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 67,
            "key": "151-2-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 155,
            "id": 0,
            "total_amount": 201,
            "name": "Jeera Brown Rice",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 2,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 67,
            "key": "155-2-2"
        }
    ],
    "item_swaps": [],
    "meal": {
        "id": 12,
        "name": "Turkey/Lamb Momo Meal",
        "package": "VARIETY"
    },
    "menu": {
        "id": 7,
        "name": "Nepali Momo Menu",
        "description": "Nepali food is hearty and flavorful! Get a taste with some salad, two sides, two momos, one main and some of Bini's tomato-cilantro sauce for dipping."
    },
    "notes": "",
    "organization": {
        "id": 7724,
        "name": "Chewse HQ",
        "meal_specialist": 8373,
        "ops_notes": ""
    },
    "vendor": {
        "id": 559,
        "name": "Bini's Kitchen",
        "branch": ""
    },
    "guests": 67,
    "delivery_pickup_time": "2019-06-21T18:22:19Z",
    "timezone": "America/Los_Angeles",
    "is_demo": false,
    "is_canceled": false,
    "latest_order_ack_id": 117656,
    "vendor_ack_status": "initial_requested",
    "dietary_restrictions": [
        {
            "id": 1,
            "count": 11
        },
        {
            "id": 2,
            "count": 2
        },
        {
            "id": 3,
            "count": 0
        },
        {
            "id": 4,
            "count": 2
        },
        {
            "id": 5,
            "count": 0
        },
        {
            "id": 6,
            "count": 0
        }
    ],
    "total_cost": 783.5,
    "schedule_ruleset": {
        "id": 10777,
        "name": "Lunch Time",
        "ops_notes": "",
        "guest_count": 67,
        "meal_type": {},
        "meal_period": {
            "id": 2,
            "name": "Lunch"
        },
        "package": "",
        "dietary_restrictions_groups": [
            {
                "id": 1,
                "name": "Vegetarian"
            },
            {
                "id": 2,
                "name": "Vegan"
            },
            {
                "id": 4,
                "name": "Meat + Gluten Free"
            }
        ],
        "frequency": null,
        "organization_allergies": [],
        "organization": {
            "id": 7724,
            "name": "Chewse HQ"
        },
        "notes": ""
    },
    "meal_sections": []
}

Place Order - POST/PUT /api/orders/order/place/:order_id?

Example Request Payload

{
    "id": 264397,
    "order_id": "F9YLU",
    "delivery_datetime": "2019-06-21T12:30:00-07:00",
    "add_on_items": [
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 20,
            "name": "Seasonal Salad",
            "total_cost": 15,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 100,
            "portion_amount": 2,
            "is_add_on": true,
            "quantity": 10,
            "key": "151-2-100-a"
        }
    ],
    "included_items": [
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 138,
            "id": 0,
            "total_amount": 50,
            "name": "Tomato Cilantro Sauce",
            "total_cost": 0,
            "meal_component_id": 1,
            "vendor_cost": 0,
            "priority": 2,
            "portion_amount": 0.8,
            "is_add_on": false,
            "quantity": 63,
            "key": "138-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 9,
                "name": "serving"
            },
            "item_id": 156,
            "id": 0,
            "total_amount": 231,
            "name": "Homemade Dressing",
            "total_cost": 0,
            "meal_component_id": 2,
            "vendor_cost": 0,
            "priority": 1,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 77,
            "key": "156-2-1"
        }
    ],
    "items": [
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 135,
            "id": 0,
            "total_amount": 52,
            "name": "Turkey Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "135-1-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 136,
            "id": 0,
            "total_amount": 22,
            "name": "Vegetarian Momo",
            "total_cost": 33,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 2,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 11,
            "key": "136-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 137,
            "id": 0,
            "total_amount": 52,
            "name": "Lamb Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 3,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "137-1-3"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 143,
            "id": 0,
            "total_amount": 6,
            "name": "Baigun Bharta",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 4,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "143-1-4"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 144,
            "id": 0,
            "total_amount": 6,
            "name": "Grilled Nepali Chicken",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 5,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "144-1-5"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 145,
            "id": 0,
            "total_amount": 48,
            "name": "Palungo Paneer",
            "total_cost": 36,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 6,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 6,
            "key": "145-1-6"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 146,
            "id": 0,
            "total_amount": 208,
            "name": "Kukhura Aloo",
            "total_cost": 156,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 7,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 26,
            "key": "146-1-7"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 147,
            "id": 0,
            "total_amount": 162,
            "name": "Pork Choila",
            "total_cost": 148.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 8,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 27,
            "key": "147-1-8"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1,
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 148,
            "id": 0,
            "total_amount": 56,
            "name": "Golveda Ra Tofu Hariyo Keraw",
            "total_cost": 42,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 9,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 7,
            "key": "148-1-9"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 0,
            "total_amount": 134,
            "name": "Seasonal Salad",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 67,
            "key": "151-2-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 155,
            "id": 0,
            "total_amount": 201,
            "name": "Jeera Brown Rice",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 2,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 67,
            "key": "155-2-2"
        }
    ],
    "item_swaps": [],
    "meal": {
        "id": 12,
        "name": "Turkey/Lamb Momo Meal",
        "package": "VARIETY"
    },
    "menu": {
        "id": 7,
        "name": "Nepali Momo Menu",
        "description": "Nepali food is hearty and flavorful! Get a taste with some salad, two sides, two momos, one main and some of Bini's tomato-cilantro sauce for dipping."
    },
    "notes": "",
    "organization": {
        "id": 7724,
        "name": "Chewse HQ",
        "meal_specialist": 8373,
        "ops_notes": ""
    },
    "vendor": {
        "id": 559,
        "name": "Bini's Kitchen",
        "branch": ""
    },
    "guests": 67,
    "delivery_pickup_time": "2019-06-21T18:22:19Z",
    "timezone": "America/Los_Angeles",
    "is_demo": false,
    "is_canceled": false,
    "latest_order_ack_id": 117656,
    "vendor_ack_status": "initial_requested",
    "dietary_restrictions": [
        {
            "id": 1,
            "count": 11
        },
        {
            "id": 2,
            "count": 2
        },
        {
            "id": 3,
            "count": 0
        },
        {
            "id": 4,
            "count": 2
        },
        {
            "id": 5,
            "count": 0
        },
        {
            "id": 6,
            "count": 0
        }
    ],
    "total_cost": 783.5,
    "schedule_ruleset": {
        "id": 10777,
        "name": "Lunch Time",
        "ops_notes": "",
        "guest_count": 67,
        "meal_type": {},
        "meal_period": {
            "id": 2,
            "name": "Lunch"
        },
        "package": "",
        "dietary_restrictions_groups": [
            {
                "id": 1,
                "name": "Vegetarian"
            },
            {
                "id": 2,
                "name": "Vegan"
            },
            {
                "id": 4,
                "name": "Meat + Gluten Free"
            }
        ],
        "frequency": null,
        "organization_allergies": [],
        "organization": {
            "id": 7724,
            "name": "Chewse HQ"
        },
        "notes": ""
    },
    "meal_sections": []
}

Example Response

{
    "id": 264397,
    "order_id": "F9YLU",
    "delivery_datetime": "2019-06-21T12:30:00-07:00",
    "add_on_items": [
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 218,
            "total_amount": 20,
            "name": "Seasonal Salad",
            "total_cost": 15,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 100,
            "portion_amount": 2,
            "is_add_on": true,
            "quantity": 10,
            "key": "151-2-100-a"
        }
    ],
    "included_items": [
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 138,
            "id": 219,
            "total_amount": 50,
            "name": "Tomato Cilantro Sauce",
            "total_cost": 0,
            "meal_component_id": 1,
            "vendor_cost": 0,
            "priority": 2,
            "portion_amount": 0.8,
            "is_add_on": false,
            "quantity": 63,
            "key": "138-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": true,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 9,
                "name": "serving"
            },
            "item_id": 156,
            "id": 221,
            "total_amount": 231,
            "name": "Homemade Dressing",
            "total_cost": 0,
            "meal_component_id": 2,
            "vendor_cost": 0,
            "priority": 1,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 77,
            "key": "156-2-1"
        }
    ],
    "items": [
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 135,
            "id": 207,
            "total_amount": 52,
            "name": "Turkey Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "135-1-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 136,
            "id": 208,
            "total_amount": 22,
            "name": "Vegetarian Momo",
            "total_cost": 33,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 2,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 11,
            "key": "136-1-2"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                138
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 4,
                "name": "pc."
            },
            "item_id": 137,
            "id": 209,
            "total_amount": 52,
            "name": "Lamb Momo",
            "total_cost": 78,
            "meal_component_id": 1,
            "vendor_cost": 3,
            "priority": 3,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 26,
            "key": "137-1-3"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 143,
            "id": 210,
            "total_amount": 6,
            "name": "Baigun Bharta",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 4,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "143-1-4"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 144,
            "id": 211,
            "total_amount": 6,
            "name": "Grilled Nepali Chicken",
            "total_cost": 5.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 5,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 1,
            "key": "144-1-5"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 145,
            "id": 212,
            "total_amount": 48,
            "name": "Palungo Paneer",
            "total_cost": 36,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 6,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 6,
            "key": "145-1-6"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 146,
            "id": 213,
            "total_amount": 208,
            "name": "Kukhura Aloo",
            "total_cost": 156,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 7,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 26,
            "key": "146-1-7"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 147,
            "id": 214,
            "total_amount": 162,
            "name": "Pork Choila",
            "total_cost": 148.5,
            "meal_component_id": 1,
            "vendor_cost": 5.5,
            "priority": 8,
            "portion_amount": 6,
            "is_add_on": false,
            "quantity": 27,
            "key": "147-1-8"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                1,
                2
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 148,
            "id": 215,
            "total_amount": 56,
            "name": "Golveda Ra Tofu Hariyo Keraw",
            "total_cost": 42,
            "meal_component_id": 1,
            "vendor_cost": 6,
            "priority": 9,
            "portion_amount": 8,
            "is_add_on": false,
            "quantity": 7,
            "key": "148-1-9"
        },
        {
            "client_price": 0,
            "included_item_ids": [
                156
            ],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 151,
            "id": 216,
            "total_amount": 134,
            "name": "Seasonal Salad",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 1,
            "portion_amount": 2,
            "is_add_on": false,
            "quantity": 67,
            "key": "151-2-1"
        },
        {
            "client_price": 0,
            "included_item_ids": [],
            "is_included_item": false,
            "dietary_restriction_groups": [
                6,
                1,
                2,
                4
            ],
            "portion_unit": {
                "id": 8,
                "name": "oz. (weight)"
            },
            "item_id": 155,
            "id": 217,
            "total_amount": 201,
            "name": "Jeera Brown Rice",
            "total_cost": 100.5,
            "meal_component_id": 2,
            "vendor_cost": 1.5,
            "priority": 2,
            "portion_amount": 3,
            "is_add_on": false,
            "quantity": 67,
            "key": "155-2-2"
        }
    ],
    "item_swaps": [],
    "meal": {
        "id": 12,
        "name": "Turkey/Lamb Momo Meal",
        "package": "VARIETY"
    },
    "menu": {
        "id": 7,
        "name": "Nepali Momo Menu",
        "description": "Nepali food is hearty and flavorful! Get a taste with some salad, two sides, two momos, one main and some of Bini's tomato-cilantro sauce for dipping."
    },
    "notes": "",
    "organization": {
        "id": 7724,
        "name": "Chewse HQ",
        "meal_specialist": 8373,
        "ops_notes": ""
    },
    "vendor": {
        "id": 559,
        "name": "Bini's Kitchen",
        "branch": ""
    },
    "guests": 67,
    "delivery_pickup_time": "2019-06-21T18:22:19Z",
    "timezone": "America/Los_Angeles",
    "is_demo": false,
    "is_canceled": false,
    "latest_order_ack_id": 117656,
    "vendor_ack_status": "initial_requested",
    "dietary_restrictions": [
        {
            "id": 4,
            "count": 2
        },
        {
            "id": 5,
            "count": 0
        },
        {
            "id": 6,
            "count": 0
        },
        {
            "id": 1,
            "count": 11
        },
        {
            "id": 2,
            "count": 2
        },
        {
            "id": 3,
            "count": 0
        }
    ],
    "total_cost": 798.5,
    "schedule_ruleset": {
        "id": 10777,
        "name": "Lunch Time",
        "ops_notes": "",
        "guest_count": 67,
        "meal_type": {},
        "meal_period": {
            "id": 2,
            "name": "Lunch"
        },
        "package": "",
        "dietary_restrictions_groups": [
            {
                "id": 1,
                "name": "Vegetarian"
            },
            {
                "id": 2,
                "name": "Vegan"
            },
            {
                "id": 4,
                "name": "Meat + Gluten Free"
            }
        ],
        "frequency": null,
        "organization_allergies": [],
        "organization": {
            "id": 7724,
            "name": "Chewse HQ"
        },
        "notes": ""
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment