Skip to content

Instantly share code, notes, and snippets.

@mikepaszkiewicz
Last active June 26, 2017 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikepaszkiewicz/8b414d00fb2fa899315437bce1038263 to your computer and use it in GitHub Desktop.
Save mikepaszkiewicz/8b414d00fb2fa899315437bce1038263 to your computer and use it in GitHub Desktop.
Fetch a vendor menu from habitat
// vendorId is optional, and will return an array of all menus if not present
curl -X GET https://dispatch.tryhabitat.com/api/v1/menus/ \
-H 'cache-control: no-cache' \
-H 'Content-Type: application/json' \
-d '{ "api_key": "YOUR_API_KEY", "vendorId": "VENDOR_ID" }'
// returns the following:
{
"_id" : "qkfHaEFiL2oTDgJts",
"lastUpdated" : "2017-06-26T18:38:53.184+0000"
"sellerId" : "gRWS4txHe3g43AtNm",
"companyName" : "Hue Fusion Food Market",
"menu" : [
{
"name" : "Most Popular",
"rank" : 1,
"items" : [
{
"name" : "Chicken Pad Thai",
"price" : 6.95,
"description" : "Stir fried noodles with egg, scallions, bean sprouts, tofu, ground peanuts and chicken.",
"visibleOnFeed" : false,
"add_ons" : [
{
"_id" : "j6P7tHMNcnLAbStAq",
"rank" : 10,
"category_name" : "Choose your Asian Entree Style",
"category_select_one_required" : true,
"add_on_items" : [
{
"name" : "Spicy",
"price" : 0
},
{
"name" : "Not Spicy",
"price" : 0
}
]
}
]
},
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment