HomeGuidesAPI Reference
Log In
Guides

Store Search Ordering Flow

This guide demonstrates how to create an order when starting from store search.

1. Search For A Store

Please review the Store Search guide to gain a better understanding of utilizing the Store Search API.

Here's an example Store Search API request that demonstrates searching for McDonald's store locations near the address 188 King Street, San Francisco, US 94107 that offer delivery.

Example Request & Response

curl --request GET \
     --url 'https://api.mealme.ai/search/store/v3?query=mcdonald&latitude=37.7786357&longitude=-122.3918135&store_type=restaurant&user_street_num=188&user_street_name=King%2520Street&user_city=San%2520Francisco&user_state=CA&user_zipcode=94107&user_country=US&pickup=false&sort=relevance&open=true&maximum_miles=3&search_focus=store&autocomplete=false' \
     --header 'Id-Token: <API KEY>' \
     --header 'accept: application/json'
{
  "stores": [
    {
      "_id": "3aee32bf-581a-47ea-a810-8c0ed90073c0",
      "name": "Mcdonald's®",
      "phone_number": 14153621082,
      "address": {
        "street_addr": "441 Sutter St",
        "city": "San Francisco",
        "state": "CA",
        "zipcode": "94108",
        "country": "US",
        "street_addr_2": "",
        "latitude": 37.789059,
        "longitude": -122.407637
      },
      "type": "restaurant",
      "description": "",
      "local_hours": {
        "operational": {
          "Monday": "06:00AM - 11:30PM",
          "Tuesday": "06:00AM - 11:30PM",
          "Wednesday": "06:00AM - 11:30PM",
          "Thursday": "06:00AM - 11:30PM",
          "Friday": "06:00AM - 10:15PM",
          "Saturday": "06:00AM - 10:15PM",
          "Sunday": "06:00AM - 10:15PM"
        },
        "delivery": {
          "Monday": "06:00AM - 11:30PM",
          "Tuesday": "06:00AM - 11:30PM",
          "Wednesday": "06:00AM - 11:30PM",
          "Thursday": "06:00AM - 11:30PM",
          "Friday": "06:00AM - 10:15PM",
          "Saturday": "06:00AM - 10:15PM",
          "Sunday": "06:00AM - 10:15PM"
        },
        "pickup": {
          "Monday": "Closed",
          "Tuesday": "Closed",
          "Wednesday": "Closed",
          "Thursday": "Closed",
          "Friday": "Closed",
          "Saturday": "Closed",
          "Sunday": "Closed"
        },
        "dine_in": {
          "Monday": "06:00AM - 11:30PM",
          "Tuesday": "06:00AM - 11:30PM",
          "Wednesday": "06:00AM - 11:30PM",
          "Thursday": "06:00AM - 11:30PM",
          "Friday": "06:00AM - 10:15PM",
          "Saturday": "06:00AM - 10:15PM",
          "Sunday": "06:00AM - 10:15PM"
        }
      },
      "cuisines": [
        "American",
        "Burgers",
        "Fast Food",
        "Group Friendly"
      ],
      "food_photos": [
        "https://cdn-img.mealme.ai/7c7db4891a70d7dff577da5af8afa690f089d645/68747470733a2f2f636e2d67656f312e756265722e636f6d2f696d6167652d70726f632f726573697a652f656174732f666f726d61743d776562702f77696474683d3234302f6865696768743d3139322f7175616c6974793d37302f7372636236343d6148523063484d364c79396b4d584a6862484e765a323571626d637a4e79356a624739315a475a79623235304c6d356c6443387a597a51774d6d5a6d4e4330304d57466b4c5452684e7a55744f5467324f53316c4d4749354e444d334e47457a4f546775616e426c5a773d3d"
      ],
      "logo_photos": [
        "https://cdn-img.mealme.ai/cad54177dcd2edde250e0d80ff28fa4e76ec46b2/68747470733a2f2f74622d7374617469632e756265722e636f6d2f70726f642f696d6167652d70726f632f70726f6365737365645f696d616765732f64353336396531353936666266326238393537333161666536616564396564642f38323038383361343835363736373061636264373230626337363339313239312e6a706567"
      ],
      "store_photos": [],
      "dollar_signs": 1,
      "pickup_enabled": false,
      "delivery_enabled": true,
      "is_open": true,
      "offers_first_party_delivery": false,
      "offers_third_party_delivery": true,
      "miles": 1.1251933570428825,
      "weighted_rating_value": 4.7,
      "aggregated_rating_count": 400,
      "supports_upc_codes": false
    },
		.
    .
    .
  ],
  "next_page": 1
}

📘

  • We'll use the first store's store_id in the response above to retrieve its inventory and quote in the next step.

2. Retrieve Inventory & Quote

Please review the Inventory guide to gain a better understanding of utilizing the Get Inventory API to retrieve a store's inventory and/or delivery or pickup quote.

Here's an example request that demonstrates retrieving the delivery inventory and quote for a McDonald's store using its store_id: 3aee32bf-581a-47ea-a810-8c0ed90073c0.

Example Request & Response

curl --location 'https://api.mealme.ai/details/inventory?store_id=3aee32bf-581a-47ea-a810-8c0ed90073c0&pickup=false&quote_preference=first_available&user_latitude=37.7786357&user_longitude=-122.3918135&user_street_num=188&user_street_name=King%2520Street&user_city=San%2520Francisco&user_state=CA&user_zipcode=94107&user_country=US&include_quote=true' \
--header 'Id-Token: <API KEY>' \
--header 'accept: application/json'
{
  "quote": {
    "time_estimate": {
      "minimum": 20,
      "maximum": 35,
      "scheduled": [
        {
          "id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-t3AkWeBG7Iaq47IKVpWq59jf4ueU44W6aJkdDoXEmhoRT00Cq9dpdkORktETbdt7zs5PyuZSZfpVUaoyXxrNmlvYdj8MdFLZezoKP9m1v91XijpJqbwy835J5cntLlvSQ==",
          "minimum": 1681689125.3044398,
          "maximum": 1681690025.3044398,
          "delivery_fee": {
            "delivery_fee_flat": 199,
            "delivery_fee_percent": 0.0,
            "delivery_fee_taxable": true
          }
        },
        .
        .
        .
      ]
    },
    "sales_tax_percent": 8.82,
    "order_minimum": 0,
    "delivery_fee": {
      "delivery_fee_flat": 299,
      "delivery_fee_percent": 0.0,
      "delivery_fee_taxable": false,
      "threshold_fees": []
    },
    "service_fee": {
      "service_fee_flat": 345,
      "service_fee_percent": 20.0,
      "service_fee_min": 286,
      "service_fee_max": 900,
      "service_fee_taxable": false
    },
    "small_order_fee": {
      "minimum_order_value": 0,
      "small_order_fee_flat": 0,
      "small_order_fee_percent": 0.0
    },
    "asap_available": true,
    "address": {
      "street_num": "441",
      "street_name": "Sutter St",
      "city": "San Francisco",
      "zipcode": "94108",
      "state": "CA",
      "country": "US"
    },
    "first_party_quote": false,
    "third_party_quote": true,
    "courier_quote": false
  },
  "menu_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-ljHomlt4LQTZiHA4K8CDIfv9scKD8TrrYeOz-mV9jonTor9Io4SXLocoAI1GwQTSalksXI7m20hfJX15r-9vXNPJrOL-qBUojlL3MCoqcZDaranYVYIVNOCnnYsU66sruSTSLEDWILkgwm4-aJQs3fx4CFyhljjwA3RzpVKcQzF0IjgxUcGjPFHWxjeU6ZiEDCUVFK9RJshsnSSNQOGEeW7TWdHMPeSn4YQotbfIsheBNxmJXg3D4I0r7tcM9wJsP_w5dvCmaynZkD0kx53PLTSTVO1R1yuOe_tZd7n224v6tVW-hCuF09VxzWiedgGwl1kBlv3IIqI7J3p-LqWrHdlj1pMZO_0UNKMwk5j-5kBGm0VC6X4iptFpQVBzwwu3Q==",
  "categories": [
    {
      "name": "Fries",
      "subcategory_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-rZBg3ffsaj2CqiiamkdMdfPlU_CawDqRH5ayNToKQO04jnZWJStZTdKZllIqO-bgLdI7uq-jw_8hq5qqNc6v2q1TKnTMSZbNjee7ujgr0pWaDSfpz7TEmcWOLkE30ncng==",
      "menu_item_list": [
        {
          "name": "Medium French Fries",
          "price": 600,
          "qty_available": null,
          "unit_size": null,
          "unit_of_measurement": "",
          "description": "",
          "image": "https://cdn-img.mealme.ai/8fccb566f0eec794a6d1a00dfa3b601948c69a2a/68747470733a2f2f74622d7374617469632e756265722e636f6d2f70726f642f696d6167652d70726f632f70726f6365737365645f696d616765732f64623363363936366165356634326538353735393833333163323232643432352f38353962616666316437363034326134356533313964316465383061656337612e6a706567",
          "min_price": 600,
          "original_price": 600,
          "formatted_price": "$6.00",
          "product_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-lqRsEKOp-2ohuAwFA0z8HiPRt1utjYGgEEqvrUOkvCmwZFvJUAHxrsV3fta6F9ZuOVNMy7lVvCFBUGCDEJVFP2fiEPuMhpH5vOBMoyTff0E1gz8oBnZ5T3Z2VK6-x81USFxQF5QDwwhAfY8j-lU30ZG4PHjwbGS9B6WPY1Xnz8q1cUg77yKv_dKc74V2LbUxyFBzOsL8hDSrXHgaOUhvOdDRAl9xPQKylz5gKWAryx9jsVKXPVOuZ3Ys4r_yt2dqEvilfnG3HLsmIDA2IH5s4LoJJfLC_9jKAAIaSnbmoFcQF47n1GOeV7rLxocM0eKrqb9T-XxZCiO0W9hGDxLiT7Tof3x3uZog8719m0ccb24Rg8Gfv0Eceh85fFOZ-n9MDawuDgP_VqIDW1eB8UozmyU1cn_AySrvExuhqJH8HF_aPF_xmf9B7opeHSpyxvOrKnEGLVE5RcPC5IGBFYQePlq0NuDzBvWC8kiioSZo6u3tdpXkYJUmjC-f0KHBaBOkN2bIJQn3ZgWnhUpDju-ua1zfzst9lrzyr9F0uM6fya6Zx-sGueLWHZYjPJfCCN31X8r40ziJzaRRN5c2J6300PiufeFUEcRzQZGtRVEDYg-P7Ta20IutzgFmjLIdZlqsXuNA06H1FyZZ8Mgy5ttIJam8e96ssUo4Na_X9NRlZLy-eP_sasrvZ_8bUwWxSxjSkcR3QoFYJ9SqYiC2PxV_MxvWvrauNPRTK3TJZyQWNp5KYqCjCyR36HxNLVhSoEzyMe5bqDP1w4bEpFwEHy0otGdZicEvkYoBMKj73bsZ-FYuRnLNuSh_EnuO-9QiM2WBIS7jQKR3Xvy8Fost9NIOUs=",
          "thumbnail_image": "https://cdn-img.mealme.ai/18ef4cc6b8a9f63c1fa96bf48c3c2b7ae0ce4b9e/68747470733a2f2f636e2d67656f312e756265722e636f6d2f696d6167652d70726f632f726573697a652f656174732f666f726d61743d776562702f77696474683d3234302f6865696768743d3139322f7175616c6974793d37302f7372636236343d6148523063484d364c7939305969317a6447463061574d7564574a6c6369356a6232307663484a765a4339706257466e5a533177636d396a4c33427962324e6c63334e6c5a4639706257466e5a584d765a47497a597a59354e6a5a685a54566d4e444a6c4f4455334e546b344d7a4d78597a49794d6d51304d6a55764f445535596d466d5a6a466b4e7a59774e444a684e44566c4d7a45355a44466b5a5467775957566a4e324575616e426c5a773d3d",
          "should_fetch_customizations": true,
          "supports_image_scaling": false
        },
        .
        .
        .
      ]
    },
    {
      "name": "Most Popular",
      "subcategory_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-vpO32bZxe_tYR7JMMehj2VbLdOjVh9hiHQPhmksu7mhPdQ8pNUBKsOEDOCAuwXXkDO2Ir37KqmUh_CuY4Na9LcGsEb_mAyYB2TvEtbuzAo5AUHtmD1f6-kPywxgrsenRA==",
      "menu_item_list": [
        {
          "name": "Big Mac Meal",
          "price": 1510,
          "qty_available": null,
          "unit_size": null,
          "unit_of_measurement": "",
          "description": "",
          "image": "https://cdn-img.mealme.ai/56644401375dd52f55d6cadfa2c6d9beeac0e1d2/68747470733a2f2f74622d7374617469632e756265722e636f6d2f70726f642f696d6167652d70726f632f70726f6365737365645f696d616765732f62396562313962313937323763626561346465333130613932333734653232322f38353962616666316437363034326134356533313964316465383061656337612e6a706567",
          "min_price": 1510,
          "original_price": 1510,
          "formatted_price": "$15.10",
          "product_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-laLnSozBl_UaEIk-B0XFfbE3g3nT8c4XeaSp9aF7z826yr4fFL4_BLNzF6YSDeOhQ67A4WDq6Egy4xCXc-B2iuBXJMNJ1p-BzON1f5b5bUbSXqXXziSslrQBmoakqL5PZcszcqHnZKE8mp1B9eda0diMDyCvV57bcHNc40Jofd84uTgyWy0m8aOf09ulbdHlx7-j_Srvsf_Rdtk2gykKAdRFYOpbyOZuPAVnvL6Kxv8SQ7nTTaAAV2EQwWe4FTaKnWHiXKZ-2OTgxwnO4B9BCzQ-wvRuHDyuJiHrNaAzuWGgvMfUUvK_PQzlNcw8W6a2TxlpvuL1MEAudbs6MrHx-Gpxsf1i7RxGFS2B7RBGUMzWMlRON1wtUjcpXU4_iCKvyBRbSGL0WERKlIkWoN9zvMh3w1r36ofCsfGMH6xWO2B8REzXPd_FiuPMQod5IpLOKH-ue9qgLOvksPmtd6NO55eyb1jnz4DA0rkdfsHEVtPKSTRKEJHsg3tiFsPKYlAVo7gdQuiiPesviz0DXZzoAcvFC42TTVtwKuHCDAWUs_hTPOqcmU_wfkcdcEbBDGCXh2KAvCxycSudwt4lHZTxvI-PBXBIRx2PYze1v5_Vkz1UAjk2qrDMrUKGgbC85iidCO1L3TYpzzndqx7Cui0bZnoGQ2CByaBXEC2ozAcdz_dwdGUa6t-qr2HW_BcpoF9BrdK9sZr5mXP5c4wli1FXlUjYn4mCGxEVxIswDtb4esiqF0f0JOcWf7zSJ9acb8O8mrHbzSqawV--V8ho-A8qK4N7cTS1I7Y-Ey-PGf8n37jebvfGc9eI_SZKgN6tItc_2VJfr9v8oIHvJ4xgKZpQ8w=",
          "thumbnail_image": "https://cdn-img.mealme.ai/5afda5dbf78f6ea6e83f23f334a8b560f1346de6/68747470733a2f2f636e2d67656f312e756265722e636f6d2f696d6167652d70726f632f726573697a652f656174732f666f726d61743d776562702f77696474683d3234302f6865696768743d3139322f7175616c6974793d37302f7372636236343d6148523063484d364c7939305969317a6447463061574d7564574a6c6369356a6232307663484a765a4339706257466e5a533177636d396a4c33427962324e6c63334e6c5a4639706257466e5a584d76596a6c6c596a4535596a45354e7a493359324a6c5954526b5a544d784d4745354d6a4d334e4755794d6a49764f445535596d466d5a6a466b4e7a59774e444a684e44566c4d7a45355a44466b5a5467775957566a4e324575616e426c5a773d3d",
          "should_fetch_customizations": true,
          "supports_image_scaling": false
        },
        .
        .
        .
      ]
    },
    .
    .
    .
  ]
}

📘

  • In the next step, we'll use the product_id of the Big Mac Meal product from the example response above to fetch customizations.
  • We'll use the scheduled_id of the first time slot in in scheduled to create a scheduled delivery order in step 5.

3. Retrieve Customizations

Please review the Handling Customizations guide to gain a better understanding of utilizing the Get Product Details API to retrieve a product's customizations.

Here's an example Get Product Details API request that demonstrates retrieving the customizations for the Big Mac Meal product from the previous step using its product_id.

Example Request & Response

curl --request GET \
     --url 'https://api.mealme.ai/details/product?product_id=gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-laLnSozBl_UaEIk-B0XFfbE3g3nT8c4XeaSp9aF7z826yr4fFL4_BLNzF6YSDeOhQ67A4WDq6Egy4xCXc-B2iuBXJMNJ1p-BzON1f5b5bUbSXqXXziSslrQBmoakqL5PZcszcqHnZKE8mp1B9eda0diMDyCvV57bcHNc40Jofd84uTgyWy0m8aOf09ulbdHlx7-j_Srvsf_Rdtk2gykKAdRFYOpbyOZuPAVnvL6Kxv8SQ7nTTaAAV2EQwWe4FTaKnWHiXKZ-2OTgxwnO4B9BCzQ-wvRuHDyuJiHrNaAzuWGgvMfUUvK_PQzlNcw8W6a2TxlpvuL1MEAudbs6MrHx-Gpxsf1i7RxGFS2B7RBGUMzWMlRON1wtUjcpXU4_iCKvyBRbSGL0WERKlIkWoN9zvMh3w1r36ofCsfGMH6xWO2B8REzXPd_FiuPMQod5IpLOKH-ue9qgLOvksPmtd6NO55eyb1jnz4DA0rkdfsHEVtPKSTRKEJHsg3tiFsPKYlAVo7gdQuiiPesviz0DXZzoAcvFC42TTVtwKuHCDAWUs_hTPOqcmU_wfkcdcEbBDGCXh2KAvCxycSudwt4lHZTxvI-PBXBIRx2PYze1v5_Vkz1UAjk2qrDMrUKGgbC85iidCO1L3TYpzzndqx7Cui0bZnoGQ2CByaBXEC2ozAcdz_dwdGUa6t-qr2HW_BcpoF9BrdK9sZr5mXP5c4wli1FXlUjYn4mCGxEVxIswDtb4esiqF0f0JOcWf7zSJ9acb8O8mrHbzSqawV--V8ho-A8qK4N7cTS1I7Y-Ey-PGf8n37jebvfGc9eI_SZKgN6tItc_2VJfr9v8oIHvJ4xgKZpQ8w%3D&pickup=false&include_quote=false&user_latitude=37.7786357&user_longitude=-122.3918135&user_street_num=188&user_street_name=King%20Street&user_city=San%20Francisco&user_state=CA&user_zipcode=94107&user_country=US' \
     --header 'Id-Token: <API KEY>' \
     --header 'accept: application/json'
{
  "name": "Big Mac Meal",
  "price": 1510,
  "qty_available": null,
  "unit_size": null,
  "unit_of_measurement": "",
  "description": null,
  "original_price": 1510,
  "image": "https://cdn-img.mealme.ai/56644401375dd52f55d6cadfa2c6d9beeac0e1d2/68747470733a2f2f74622d7374617469632e756265722e636f6d2f70726f642f696d6167652d70726f632f70726f6365737365645f696d616765732f62396562313962313937323763626561346465333130613932333734653232322f38353962616666316437363034326134356533313964316465383061656337612e6a706567",
  "min_price": 1510,
  "formatted_price": "$15.10",
  "product_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-laLnSozBl_UaEIk-B0XFfbE3g3nT8c4XeaSp9aF7z826yr4fFL4_BLNzF6YSDeOhQ67A4WDq6Egy4xCXc-B2iuBXJMNJ1p-BzON1f5b5bUbSXqXXziSslrQBmoakqL5PZcszcqHnZKE8mp1B9eda0diMDyCvV57bcHNc40Jofd84uTgyWy0m8aOf09ulbdHlx7-j_Srvsf_Rdtk2gykKAdRFYOpbyOZuPAVnvL6Kxv8SQ7nTTaAAV2EQwWe4FTaKnWHiXKZ-2OTgxwnO4B9BCzQ-wvRuHDyuJiHrNaAzuWGgvMfUUvK_PQzlNcw8W6a2TxlpvuL1MEAudbs6MrHx-Gpxsf1i7RxGFS2B7RBGUMzWMlRON1wtUjcpXU4_iCKvyBRbSGL0WERKlIkWoN9zvMh3w1r36ofCsfGMH6xWO2B8REzXPd_FiuPMQod5IpLOKH-ue9qgLOvksPmtd6NO55eyb1jnz4DA0rkdfsHEVtPKSTRKEJHsg3tiFsPKYlAVo7gdQuiiPesviz0DXZzoAcvFC42TTVtwKuHCDAWUs_hTPOqcmU_wfkcdcEbBDGCXh2KAvCxycSudwt4lHZTxvI-PBXBIRx2PYze1v5_Vkz1UAjk2qrDMrUKGgbC85iidCO1L3TYpzzndqx7Cui0bZnoGQ2CByaBXEC2ozAcdz_dwdGUa6t-qr2HW_BcpoF9BrdK9sZr5mXP5c4wli1FXlUjYn4mCGxEVxIswDtb4esiqF0f0JOcWf7zSJ9acb8O8mrHbzSqawV--V8ho-A8qK4N7cTS1I7Y-Ey-PGf8n37jebvfGc9eI_SZKgN6tItc_2VJfr9v8oIHvJ4xgKZpQ8w=",
  "thumbnail_image": null,
  "is_alcoholic": false,
  "upc_code": null,
  "supports_image_scaling": false,
  "is_available": true,
  "customizations": [
    {
      "name": "Select Option",
      "min_choice_options": 1,
      "max_choice_options": 1,
      "options": [
        {
          "name": "Big Mac Meal",
          "price": 0,
          "customizations": [
            {
              "name": "Select Drink",
              "min_choice_options": 1,
              "max_choice_options": 1,
              "options": [
                {
                  "name": "Medium Coke®",
                  "price": 19,
                  "customizations": [
                    {
                      "name": "Medium Coke® Comes With",
                      "min_choice_options": 0,
                      "max_choice_options": 2,
                      "options": [
                        {
                          "name": "Ice",
                          "price": 0,
                          "customizations": [],
                          "default_qty": 1,
                          "min_qty": 0,
                          "max_qty": 2,
                          "conditional_price": {},
                          "formatted_price": "$0.00",
                          "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-tolUFQ_otyvRMXY356OBTX4OMPZqANbEqtqNwAg2vuEijUdJ9FzqgvQMvpoyFEEgROIfyYgVyc8WAQgQP79sAVH8PyFU67HtwEkYSMuK5Hdgh8LvdeSibtd0JZyyIh8n8pf680awpkQk2WM5nGV5YHwoC2UsUswjBf19xr0eyW3e0Ujha2kWBsn5IQNYrk5fgnIDux3KJ5fGO0j_85PJS6h9SclZ8aVkfYB3DKLMfKdSDq6fvit7GGyucI18lXVJOxzE8nJumb4eEjM3UUj9lOYB6ADzYEbWqBHIVCEUBObpaW_pDbaL5lcnTj3uJxgQNuAk5kdnihYHEKYaon9GArzb2dJld8WdHjzx_hZWZZr7o_HwE74WFZUu_1X8a0HAmKknFGifg-I8yF7CL7yEFTpjX0QKgNqXR0H74pWt_2FSRdhDmb8J_E2Q4NjECQRreCC2FSv4y3TGxyLO4pdcfaLv5OWSxvfmGUqsqxd2zsywVpJ5T05Wdsfci2gPwLFF7baApZIojlBOESRdND4SS1JOqz_ZsyMIuXYhVh97UhfgNsG4gedKnpLneglwNyRwkOBWvtbmXvIJRIK-sCWcTqRJUUEpHW_ys-OLNXALuMMLCjZteuNUZc18F7KUOytzTzdknmaBqD1e6MdNjnvYXfe3pOcwatEDmyZdBPn2x-UFniUch5BJfj9lIYf_Fzy9L1NKTPVZUNdmZlka29lWbmCYMPR-rWpdQIyGb0oWrFG"
                        }
                      ],
                      "customization_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-h4WcTkxyOY-rN0cf0PrY1qTyDcIzs8st4UdbmD0C4lxXFe10TTeUe-lQnbbeZ85IzjQQDjMNUCb-ez-HremmWKeR5KWRIzocrTXK64gKrpcaK_GsYdP2Ng0XBJ50tir2wtqd2QBSl_dLPf2Fwed3JYcBXTj_c8oDy1P0KUq6IBiWlZSGS40CDVDxFBMIpv0eXjQhd5Mof65LMi3tOhYV7YFLtJzuNeD55i3UwxbgbowhSFu6JL4C7uRz6v-sGGFNS-IQENLomc-CsMzauKsi64="
                    },
                    .
                    .
                    .
                  ],
                  "min_qty": 0,
                  "max_qty": 1,
                  "conditional_price": {},
                  "formatted_price": "$0.19",
                  "default_qty": 0,
                  "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-gi1BtUUY2ftahXctzWjrBduP2Fh5bQFmhTHydvXER7q60D95A_rozmKwWqO6MOXapst2WWN8xPlJvbLV-IKs6vinEVYEqHVYjJPVl7i5QGxxDfjYOS6ZQ3-YpObnbgKxx-4ayohBIpsKbo2eJ_UfR6vu236tGHJdl4tJExVLTPG59Tf7weG9mr2NRFYhe_8okrEO5wdN6TNv9yGZX64PQ5dE56MbvnsdB3bVtvxyGTxRPPzkcONonnyYFsAoCBif27P61nmL2gdoCRt-aCeidq-p-YBGtB3Zg0_n4w7VKUZW4oelmd66Spsdo9RBoUBvGZpCTe1XJqDsTfVRQ-z8RN1VVm1IcAxvKqzNT5NGvQCDkQIaa5m6wy0P92HBWRZgvYX52WHvsrZDuhVYZnxNpvXOAhAd78g1_WPKl30fRpQfBN12H40XimgTj24QuU_9Uq0IfSykkfyG04PK8nX7coQNhd6Y52EJQ7AiECnGOzVlEp-tpznwb0x9Yv6KBEkS3du45utlbZGLlKvZVKpcUJz31vxqnvf2en03QqmopnshO4af0i1JcvAL2FOf5C_cpgYZVFU7G5s_hNFVuZhBeOem_yMs6PzWgTOSVKuko2cDp_bLSF3XgX_Zno3BrgWWg4mmP1ijFT1NY09F42VhvO9db6EI8y8TAALYA-aeuOG"
                },
                .
                .
                .
              ],
              "customization_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-mNs6D7BKi97KYghophiLykGmRexVTqo8xW6-Dh5ck1jmZ_rOSsIKfkMO8hH0s7lX-rdipfGjsRqatPUykW3V4GU3Lz2vXqe7Afn_Wie_R5XWhDm7-fi8c7KgvjqzwrwTpR9y6_GmYwdw9odsuKU7Ctzy-eFEZ6tjz4j-a-0ORFqReFOIrR-nQV1-1bKWLZpeFw_-nV2UzOEBQN6Yhy6bTRGQ7plXu0He04KlXhjG9gIYJremQs16xDnGf2baQCFTw=="
            },
            .
            .
            .
          ],
          "min_qty": 0,
          "max_qty": 1,
          "conditional_price": {},
          "formatted_price": "$0.00",
          "default_qty": 0,
          "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-qomaiOdfejG6NUsKUN3_ueMT_5Tzew6Pui1I3HTiSRczc6P4tg_alkvliQPx9JSoRWGKorVih-BA6r1fQSESj2P1EAXu1STb_acbN-59eGN1xHZ6qbYv04ilfRCFRcYUYZZMj-7VeY3QzN-TOncrR4aiVuO2bejHGdAX5ot68POxC6rAZIGo7FGWPg701RWAMDRJoUyfI9BaaPSGElxFUIfjV8SvES1P-ZO1jXbO84XUPvOICG8jmVjydzYmG9KNMY31vszG6NYPdAs3pJMt8umd5zVFeYwItPwfqMTX8AuOEVMEgxDto3TYMEBE_KYvsf1LhiktPibPr8PEFRpuFm6NwssvFo8N8k6KTVbSKuPcyAyX3TxLj4BO-sJWD467Hq3zS-hcR7X8Y3RWvUKhhh9jJSzDx2xgao1a9_60sXmA7KCibr3mU2F12wzlZnqTJI-GTxyttuylEyzSU3xYBrFTht6YIkcyWAQT5_a49yT0Zyy0iYa-iVwvLQgKIlJvDcz7mRm6jkArqI01d_FOGdgDHsOehXPzlGjRMbG3WfV2S5MKMcFTdIEyi3Fb5BhIw=="
        },
        .
        .
        .
      ],
      "customization_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-gOkVUSOzvFDWwpwbHz38YE2Do2-6DZXFs0bx3CQG78S33spY3SXscKzcCYGL3bWk15Aga8j7Q7pGbDaeKxIPRZ35ps0J7xexC3UWTZjn8i9wCy61e_yY3lfA5k8pCm4qAM8MmQEmS7QEOQdc5dOz7U5bjpJsl7fjw1SiwT2JVj9AdRymMz-1f6RCRBozgHlSBBTUJyyNFXpkpWgbBaDlNs="
    }
  ]
}

📘

  • Note that is_available is true, so this product can be ordered using the Create Order API. The property is_available will be false if it is out of stock, the store permanently removed it from its inventory, or if, for example, it exists on the breakfast menu and it's currently dinner time.
  • In step 5, we'll use the option_id of the Big Mac Meal option and Medium Coke® option to create an order.

4. Create A Payment Method

Please review the Create Payment Method guide to gain a better understanding of utilizing the Create Payment Method API to create a payment_method_id for a payment method.

Here's an example Create Payment Method API request that demonstrates creating a payment method for an example user with the email [email protected] and user ID 7B36A9CF.

Example Request & Response

curl --request POST \
     --url https://api.mealme.ai/payment/create \
     --header 'Id-Token: <API KEY>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "payment_method": {
    "card_number": 4242424242424242,
    "expiration_year": 2034,
    "expiration_month": 12,
    "cvc": 123
  },
  "user_email": "[email protected]",
  "user_id": "7B36A9CF"
}
'
{
  "status": "Successfully created payment method",
  "payment_method_id": "pm_1MupdLEFrDExIlIkSl6aeDLg"
}

📘

  • In step 5, we'll use the payment_method_id in the example response above to create an order.

5. Create An Order

Please review the Order Creation guide to gain a better understanding of utilizing the Create Order API to create a delivery or pickup order

Here's an example Create Order API request that demonstrates creating a scheduled delivery order using the product_id of the Big Mac Meal product retrieved from step 2, the scheduled_id of the first scheduled time slot retrieved from step 2, and the option_id of the Big Mac Meal option and Medium Coke® option retrieved from step 3.

curl --location 'https://api.mealme.ai/order/order/v2' \
--header 'Id-Token: <API KEY>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '
{
  "place_order": true,
  "items": [
    {
      "product_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-laLnSozBl_UaEIk-B0XFfbE3g3nT8c4XeaSp9aF7z826yr4fFL4_BLNzF6YSDeOhQ67A4WDq6Egy4xCXc-B2iuBXJMNJ1p-BzON1f5b5bUbSXqXXziSslrQBmoakqL5PZcszcqHnZKE8mp1B9eda0diMDyCvV57bcHNc40Jofd84uTgyWy0m8aOf09ulbdHlx7-j_Srvsf_Rdtk2gykKAdRFYOpbyOZuPAVnvL6Kxv8SQ7nTTaAAV2EQwWe4FTaKnWHiXKZ-2OTgxwnO4B9BCzQ-wvRuHDyuJiHrNaAzuWGgvMfUUvK_PQzlNcw8W6a2TxlpvuL1MEAudbs6MrHx-Gpxsf1i7RxGFS2B7RBGUMzWMlRON1wtUjcpXU4_iCKvyBRbSGL0WERKlIkWoN9zvMh3w1r36ofCsfGMH6xWO2B8REzXPd_FiuPMQod5IpLOKH-ue9qgLOvksPmtd6NO55eyb1jnz4DA0rkdfsHEVtPKSTRKEJHsg3tiFsPKYlAVo7gdQuiiPesviz0DXZzoAcvFC42TTVtwKuHCDAWUs_hTPOqcmU_wfkcdcEbBDGCXh2KAvCxycSudwt4lHZTxvI-PBXBIRx2PYze1v5_Vkz1UAjk2qrDMrUKGgbC85iidCO1L3TYpzzndqx7Cui0bZnoGQ2CByaBXEC2ozAcdz_dwdGUa6t-qr2HW_BcpoF9BrdK9sZr5mXP5c4wli1FXlUjYn4mCGxEVxIswDtb4esiqF0f0JOcWf7zSJ9acb8O8mrHbzSqawV--V8ho-A8qK4N7cTS1I7Y-Ey-PGf8n37jebvfGc9eI_SZKgN6tItc_2VJfr9v8oIHvJ4xgKZpQ8w=",
      "selected_options": [
        {
          "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-qomaiOdfejG6NUsKUN3_ueMT_5Tzew6Pui1I3HTiSRczc6P4tg_alkvliQPx9JSoRWGKorVih-BA6r1fQSESj2P1EAXu1STb_acbN-59eGN1xHZ6qbYv04ilfRCFRcYUYZZMj-7VeY3QzN-TOncrR4aiVuO2bejHGdAX5ot68POxC6rAZIGo7FGWPg701RWAMDRJoUyfI9BaaPSGElxFUIfjV8SvES1P-ZO1jXbO84XUPvOICG8jmVjydzYmG9KNMY31vszG6NYPdAs3pJMt8umd5zVFeYwItPwfqMTX8AuOEVMEgxDto3TYMEBE_KYvsf1LhiktPibPr8PEFRpuFm6NwssvFo8N8k6KTVbSKuPcyAyX3TxLj4BO-sJWD467Hq3zS-hcR7X8Y3RWvUKhhh9jJSzDx2xgao1a9_60sXmA7KCibr3mU2F12wzlZnqTJI-GTxyttuylEyzSU3xYBrFTht6YIkcyWAQT5_a49yT0Zyy0iYa-iVwvLQgKIlJvDcz7mRm6jkArqI01d_FOGdgDHsOehXPzlGjRMbG3WfV2S5MKMcFTdIEyi3Fb5BhIw==",
          "quantity": 1
        },
        {
          "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-gi1BtUUY2ftahXctzWjrBduP2Fh5bQFmhTHydvXER7q60D95A_rozmKwWqO6MOXapst2WWN8xPlJvbLV-IKs6vinEVYEqHVYjJPVl7i5QGxxDfjYOS6ZQ3-YpObnbgKxx-4ayohBIpsKbo2eJ_UfR6vu236tGHJdl4tJExVLTPG59Tf7weG9mr2NRFYhe_8okrEO5wdN6TNv9yGZX64PQ5dE56MbvnsdB3bVtvxyGTxRPPzkcONonnyYFsAoCBif27P61nmL2gdoCRt-aCeidq-p-YBGtB3Zg0_n4w7VKUZW4oelmd66Spsdo9RBoUBvGZpCTe1XJqDsTfVRQ-z8RN1VVm1IcAxvKqzNT5NGvQCDkQIaa5m6wy0P92HBWRZgvYX52WHvsrZDuhVYZnxNpvXOAhAd78g1_WPKl30fRpQfBN12H40XimgTj24QuU_9Uq0IfSykkfyG04PK8nX7coQNhd6Y52EJQ7AiECnGOzVlEp-tpznwb0x9Yv6KBEkS3du45utlbZGLlKvZVKpcUJz31vxqnvf2en03QqmopnshO4af0i1JcvAL2FOf5C_cpgYZVFU7G5s_hNFVuZhBeOem_yMs6PzWgTOSVKuko2cDp_bLSF3XgX_Zno3BrgWWg4mmP1ijFT1NY09F42VhvO9db6EI8y8TAALYA-aeuOG",
          "quantity": 1
        }
      ],
      "notes": "No mayonnaise."
    }
  ],
  "pickup": false,
  "driver_tip_cents": 100,
  "user_latitude": 37.7786357,
  "user_longitude": -122.3918135,
  "user_street_num": "188",
  "user_street_name": "King Street",
  "user_city": "San Francisco",
  "user_state": "CA",
  "user_country": "US",
  "user_zipcode": "94107",
  "user_dropoff_notes": "Leave in lobby",
  "user_name": "Steve Jobs",
  "user_email": "[email protected]",
  "user_phone": 14044442058,
  "user_id": "7B36A9CF",
  "charge_user": true,
  "include_final_quote": true,
  "disable_sms": false,
  "email_receipt_specifications": {
    "prices_marked": false,
    "added_fee": {
      "added_fee_flat": 0,
      "added_fee_percent": 0
    },
    "unify_service_fee": false,
    "disable_email": false
  },
  "favorited": false,
  "enable_substitution": false,
  "autofill_selected_options": false,
  "payment_method_id": "pm_1Mv8O7EFrDExIlIkKXogB3yo",
  "scheduled_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-t3AkWeBG7Iaq47IKVpWq59jf4ueU44W6aJkdDoXEmhoRT00Cq9dpdkORktETbdt7zs5PyuZSZfpVUaoyXxrNmlvYdj8MdFLZezoKP9m1v91XijpJqbwy835J5cntLlvSQ=="
}
'
{
    "order_placed": true,
    "tracking_link": "https://tracking.mealme.ai/tracking?tracking_id=-NTBRYQcEwujIuZ7EoXd",
    "final_quote": {
        "store": "Mcdonald's®",
        "store_address": "441 Sutter St, San Francisco, CA, 94108, US",
        "store_id": "8783a7a6-a3f5-416a-bb29-1ed04f04f0c4",
        "quote_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-ljHomlt4LQTZiHA4K8CDIfv9scKD8TrrYeOz-mV9jonTor9Io4SXLocoAI1GwQTSalksXI7m20hfJX15r-9vXNPJrOL-qBUojlL3MCoqcZDaranYVYIVNOCnnYsU66sruSTSLEDWILkgwm4-aJQs3fx4CFyhljjwA3RzpVKcQzF0IjgxUcGjPFHWxjeU6ZiEDCUVFK9RJshsnSSNQOGEeW7TWdHMPeSn4YQotbfIsheBNxmJXg3D4I0r7tcM9wJsP_w5dvCmaynZkD0kx53PLTSTVO1R1yuOe_tZd7n224v6tVW-hCuF09VxzWiedgGwl1kBlv3IIqI7J3p-LqWrHdlj1pMZO_0UNKMwk5j-5kBGm0VC6X4iptFpQVBzwwu3Q==",
        "quote": {
            "subtotal": 1388,
            "delivery_fee_cents": 299,
            "service_fee_cents": 623,
            "small_order_fee_cents": 0,
            "sales_tax_cents": 122,
            "delivery_time_min": 20,
            "delivery_time_max": 35,
            "total_without_tips": 2432,
            "expected_time_of_arrival": "05:09 PM",
            "scheduled": {}
        },
        "items": [
            {
                "name": "Big Mac Meal",
                "base_price": 1369,
                "quantity": 1,
                "image": "https://cdn-img.mealme.ai/5afda5dbf78f6ea6e83f23f334a8b560f1346de6/68747470733a2f2f636e2d67656f312e756265722e636f6d2f696d6167652d70726f632f726573697a652f656174732f666f726d61743d776562702f77696474683d3234302f6865696768743d3139322f7175616c6974793d37302f7372636236343d6148523063484d364c7939305969317a6447463061574d7564574a6c6369356a6232307663484a765a4339706257466e5a533177636d396a4c33427962324e6c63334e6c5a4639706257466e5a584d76596a6c6c596a4535596a45354e7a493359324a6c5954526b5a544d784d4745354d6a4d334e4755794d6a49764f445535596d466d5a6a466b4e7a59774e444a684e44566c4d7a45355a44466b5a5467775957566a4e324575616e426c5a773d3d",
                "product_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-laLnSozBl_UaEIk-B0XFfbE3g3nT8c4XeaSp9aF7z826yr4fFL4_BLNzF6YSDeOhQ67A4WDq6Egy4xCXc-B2iuBXJMNJ1p-BzON1f5b5bUbSXqXXziSslrQBmoakqL5PZcszcqHnZKE8mp1B9eda0diMDyCvV57bcHNc40Jofd84uTgyWy0m8aOf09ulbdHlx7-j_Srvsf_Rdtk2gykKAdRFYOpbyOZuPAVnvL6Kxv8SQ7nTTaAAV2EQwWe4FTaKnWHiXKZ-2OTgxwnO4B9BCzQ-wvRuHDyuJiHrNaAzuWGgvMfUUvK_PQzlNcw8W6a2TxlpvuL1MEAudbs6MrHx-Gpxsf1i7RxGFS2B7RBGUMzWMlRON1wtUjcpXU4_iCKvyBRbSGL0WERKlIkWoN9zvMh3w1r36ofCsfGMH6xWO2B8REzXPd_FiuPMQod5IpLOKH-ue9qgLOvksPmtd6NO55eyb1jnz4DA0rkdfsHEVtPKSTRKEJHsg3tiFsPKYlAVo7gdQuiiPesviz0DXZzoAcvFC42TTVtwKuHCDAWUs_hTPOqcmU_wfkcdcEbBDGCXh2KAvCxycSudwt4lHZTxvI-PBXBIRx2PYze1v5_Vkz1UAjk2qrDMrUKGgbC85iidCO1L3TYpzzndqx7Cui0bZnoGQ2CByaBXEC2ozAcdz_dwdGUa6t-qr2HW_BcpoF9BrdK9sZr5mXP5c4wli1FXlUjYn4mCGxEVxIswDtb4esiqF0f0JOcWf7zSJ9acb8O8mrHbzSqawV--V8ho-A8qK4N7cTS1I7Y-Ey-PGf8n37jebvfGc9eI_SZKgN6tItc_2VJfr9v8oIHvJ4xgKZpQ8w=",
                "customizations": [
                    {
                        "name": "Select Option",
                        "customization_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-gOkVUSOzvFDWwpwbHz38YE2Do2-6DZXFs0bx3CQG78S33spY3SXscKzcCYGL3bWk15Aga8j7Q7pGbDaeKxIPRZ35ps0J7xexC3UWTZjn8i9wCy61e_yY3lfA5k8pCm4qAM8MmQEmS7QEOQdc5dOz7U5bjpJsl7fjw1SiwT2JVj9AdRymMz-1f6RCRBozgHlSBBTUJyyNFXpkpWgbBaDlNs=",
                        "selected_options": [
                            {
                                "name": "Big Mac Meal",
                                "price": 0,
                                "quantity": 1,
                                "default_qty": 0,
                                "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-qomaiOdfejG6NUsKUN3_ueMT_5Tzew6Pui1I3HTiSRczc6P4tg_alkvliQPx9JSoRWGKorVih-BA6r1fQSESj2P1EAXu1STb_acbN-59eGN1xHZ6qbYv04ilfRCFRcYUYZZMj-7VeY3QzN-TOncrR4aiVuO2bejHGdAX5ot68POxC6rAZIGo7FGWPg701RWAMDRJoUyfI9BaaPSGElxFUIfjV8SvES1P-ZO1jXbO84XUPvOICG8jmVjydzYmG9KNMY31vszG6NYPdAs3pJMt8umd5zVFeYwItPwfqMTX8AuOEVMEgxDto3TYMEBE_KYvsf1LhiktPibPr8PEFRpuFm6NwssvFo8N8k6KTVbSKuPcyAyX3TxLj4BO-sJWD467Hq3zS-hcR7X8Y3RWvUKhhh9jJSzDx2xgao1a9_60sXmA7KCibr3mU2F12wzlZnqTJI-GTxyttuylEyzSU3xYBrFTht6YIkcyWAQT5_a49yT0Zyy0iYa-iVwvLQgKIlJvDcz7mRm6jkArqI01d_FOGdgDHsOehXPzlGjRMbG3WfV2S5MKMcFTdIEyi3Fb5BhIw==",
                                "customizations": [
                                    {
                                        "name": "Select Drink",
                                        "customization_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-mNs6D7BKi97KYghophiLykGmRexVTqo8xW6-Dh5ck1jmZ_rOSsIKfkMO8hH0s7lX-rdipfGjsRqatPUykW3V4GU3Lz2vXqe7Afn_Wie_R5XWhDm7-fi8c7KgvjqzwrwTpR9y6_GmYwdw9odsuKU7Ctzy-eFEZ6tjz4j-a-0ORFqReFOIrR-nQV1-1bKWLZpeFw_-nV2UzOEBQN6Yhy6bTRGQ7plXu0He04KlXhjG9gIYJremQs16xDnGf2baQCFTw==",
                                        "selected_options": [
                                            {
                                                "name": "Medium Coke®",
                                                "price": 19,
                                                "quantity": 1,
                                                "default_qty": 0,
                                                "option_id": "gAAAAAAAAAAAvcAsFofXR7XlzNv5B6-g-gi1BtUUY2ftahXctzWjrBduP2Fh5bQFmhTHydvXER7q60D95A_rozmKwWqO6MOXapst2WWN8xPlJvbLV-IKs6vinEVYEqHVYjJPVl7i5QGxxDfjYOS6ZQ3-YpObnbgKxx-4ayohBIpsKbo2eJ_UfR6vu236tGHJdl4tJExVLTPG59Tf7weG9mr2NRFYhe_8okrEO5wdN6TNv9yGZX64PQ5dE56MbvnsdB3bVtvxyGTxRPPzkcONonnyYFsAoCBif27P61nmL2gdoCRt-aCeidq-p-YBGtB3Zg0_n4w7VKUZW4oelmd66Spsdo9RBoUBvGZpCTe1XJqDsTfVRQ-z8RN1VVm1IcAxvKqzNT5NGvQCDkQIaa5m6wy0P92HBWRZgvYX52WHvsrZDuhVYZnxNpvXOAhAd78g1_WPKl30fRpQfBN12H40XimgTj24QuU_9Uq0IfSykkfyG04PK8nX7coQNhd6Y52EJQ7AiECnGOzVlEp-tpznwb0x9Yv6KBEkS3du45utlbZGLlKvZVKpcUJz31vxqnvf2en03QqmopnshO4af0i1JcvAL2FOf5C_cpgYZVFU7G5s_hNFVuZhBeOem_yMs6PzWgTOSVKuko2cDp_bLSF3XgX_Zno3BrgWWg4mmP1ijFT1NY09F42VhvO9db6EI8y8TAALYA-aeuOG",
                                                "customizations": []
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        "tip": 100,
        "total_with_tip": 2532,
        "added_fees": {
            "flat_fee_cents": 0,
            "percent_fee": 0,
            "is_fee_taxable": false,
            "total_fee_cents": 0,
            "sales_tax_cents": 0
        },
        "misc_fees": []
    },
    "order_id": "-NTBRYQcEwujIuZ7EoXd",
    "is_sandbox": true
}

📘

  • Note that the order was placed using Method 1 , but can also be placed using Method 2.

6. Handle Tracking & Status Updates

Please review the Tracking & Status Updates guide to gain a better understanding of handling order tracking and status updates either through MealMe's out-of-the-box solution or self-implementation