Skip to main content

Create a last mile delivery order

POST /v2/fulfillment/lastmile/users/{user_id}/orders

Creates a last mile delivery order for the reserved time slot. If the reservation has expired, Instacart still attempts to book the time slot. If, however, the time slot capacity is filled, your site needs to prompt the customer to select another time slot.


AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.


user_idpathโœ…The ID of the user.


order_idstringUnique ID to use for this order, can be used later for lookup.
location_codestringโœ…Location code returned by location api.
localestringThe order's locale in IETF Language Tag format. Example: en-US.
start_atstringThe requested delivery window start time in ISO 8601 format.
end_atstringThe requested delivery window end time in ISO 8601 format.
service_option_hold_idintegerโœ…The ID of the service option hold.
first_namestringโœ…The user's first name.
last_namestringโœ…The user's last name.
user_phonestringโœ…The user's phone number.
initial_tip_centsintegerThe pre-delivery tip in cents.
items_countintegerโœ…The number of items in the order.
bags_countintegerThe number of bags in the order.
items_weightnumberโœ…The weight of the items in lbs.
cart_totalnumberThe gross merchandise value (gmv) of the cart.
alcoholicbooleanIndicator whether order contains alcohol. Defaults to false.
leave_unattendedbooleanIndicator if the user wants to the driver to leave the order unattended. Defaults to false.
special_instructionsstringSpecial instructions about the order to pass on to the shopper.
customer_sms_opt_outbooleanIndicator whether the user has opted-out from receiving SMS communication. Defaults to false.
addressAddressโœ…The address of the user.

Address Object#

address_line_1stringโœ…The first address line.
address_line_2stringThe second address line.
address_typestringThe type of address, e.g., "residential".
postal_codestringโœ…The postal/zip code of the address.

Request Examples#

curl --request POST \  --url '{user_id}/orders' \  --header 'Accept: application/json' \  --header 'Authorization: Bearer <token>' \  --header 'Content-Type: application/json' \  --data '{  "order_id": "string",  "location_code": "string",  "locale": "string",  "start_at": "string",  "end_at": "string",  "service_option_hold_id": 1,  "first_name": "string",  "last_name": "string",  "user_phone": "string",  "initial_tip_cents": 1,  "items_count": 1,  "bags_count": 1,  "items_weight": 1,  "cart_total": 1,  "alcoholic": true,  "leave_unattended": true,  "special_instructions": "string",  "customer_sms_opt_out": true,  "address": {    "address_line_1": "string",    "address_line_2": "string",    "address_type": "string",    "postal_code": "string"  }}'


idstringโœ…The ID of the order.
statusstringโœ…The current order status.
order_urlstringLink to view the order.
created_atstringThe time of order creation in ISO 8601 format.
cancellation_reasonstringThe reason the order was canceled.
localestringThe order's locale in POSIX format. Example: en_US.
fulfillment_detailsFulfillment_detailsThe order delivery details.

Fulfillment_details Object#

store_locationstringThe location code of the store where the order was fulfilled. The store_location is often the same as the location_code that was used to create the order. However, orders can be fulfilled from a different store location.
window_starts_atstringโœ…The start time of the delivery window in ISO 8601 format.
window_ends_atstringโœ…The end time of the delivery window in ISO 8601 format.
delivered_atstringThe time the order was delivered at in ISO 8601 format.
bag_countintegerThe number of bags in the order.

Response Examples#

{  "id": "12345676789012345678780",  "status": "created",  "order_url": "",  "created_at": "2018-02-22T00:00:00Z",  "cancellation_reason": "",  "locale": "en_US",  "fulfillment_details": {    "window_starts_at": "2018-02-22T00:00:00Z",    "window_ends_at": "2018-02-22T00:00:00Z"  }}