Pickup Vs. Delivery
With any order, before you get to checkout, you need to indicate how the food will get to the diner. We provide two options, pickup and delivery. With pickup, the diner goes to their food. With delivery, their food comes to them.
Each of these fulfillment methods requires different information to be sent to the restaurant:
- Pickup needs to know the name of the person picking up the food.
- Delivery needs to know the location of the diner who will receive the food.
Both of these methods need contact information for the diner in case something goes wrong.
Here's examples of the request body JSON object you need to pass for each fulfillment method:
Pickup (PUT /carts/{cart_id}/pickup_info) :
{
"name" : "John Smith",
"phone" : "2025551212",
"email" : "jsmith@example.com",
"green_indicated" : "true",
"pickup_instructions": "Can I have three forks, please?"
}
Delivery(/carts/{cart_id}/delivery_info):
{
"street_address1" : "600 Van Raalte Ave",
"street_address2" : "Apt. 3R",
"cross_streets" : "W 27th St.",
"address_locality" : "Holland",
"address_region" : "MI",
"postal_code" : "49423",
"delivery_instructions" : "Knock thrice before entering.",
"name" : "John Smith",
"phone" : "2025551212",
"email" : "jsmith@example.com",
"address_country" : "USA",
"green_indicated" : "true",
"latitude" : "42.773905",
"longitude" : "-86.121708"
}
Notice that the pickup object is basically a subset of the delivery object. Both methods need to know who the diner is, how to contact them in case something goes wrong, if they want the restaurant to skip the plastic utensils and go green, and if they have any special instructions. Because the delivery method needs to inform not only the restaurant, but a driver, too, it has full location information, including street address and geographic coordinates.
You must call one of these before checkout for every order, no exceptions. However, if you want to mark an order as delivery or pickup before checkout -- for example, in order to filter restaurants that don't deliver -- you can use the incomplete methods:
PUT /carts/{cart_id}/incomplete_delivery-- Requireslatitudeandlongitudefields.PUT /carts/{cart_id}/incomplete_pickup- Does not require any information.