Skip to main content

Preview time slots for last mile delivery

POST /v2/fulfillment/service_options/last_mile

Previews possible service options for last mile delivery fulfillments.

Use this endpoint when customers have yet to sign in, register, or start shopping, but you want to give them a preview of the delivery time slots that might be available to them at checkout.

Based on the store location_code and/or the delivery postal_code specified in your request, the returned service_options[] reflect current and anticipated shopper availability.

note

By default, all service_options[] have a window.type of scheduled. To retrieve an eta time slot, set with_eta_options to true. You can also get a priority_eta time slot by setting with_priority_eta_options to true.

These service_options[] are for preview purposes only. Don't select one of their id or service_option_reference values and then use it to reserve a standard or reserve a desired window time slot, respectively. Doing so increases the probability that order creation will fail.

To reduce the chances of that happening, always select an id or service_option_reference returned by a list time slots for last mile delivery request and use it to make a reservation.

For details, see Preview time slots.

Security

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

Parameters

None.

Request

FieldTypeRequiredDescription
location_codestringOptional

Location code of the store where the delivery driver picks up the order. Either postal code or location code is required.

postal_codestringOptional

The postal code for delivery. Either postal code or location code is required.

cart_total_centsintegerOptional

The total value of all items for the order in cents.

items_countintegerOptional

The number of different types of items in the order.

earliest_option_start_atstringOptional

The earliest time that an order can be ready for delivery. Only time slots that start after this time are retrieved.

units_countnumberOptional

The number of all items, including multiples of an item, in the order.

with_eta_optionsbooleanOptional

Returns ETA options instead of immediate options when true. For more information, contact your Instacart Representative. Defaults to false.

with_priority_eta_optionsbooleanOptional

Returns Priority ETA options instead of immediate options when true. For more information, contact your Instacart Representative. Defaults to false.

with_handoff_timebooleanOptional

Indicator whether the handoff time is calculated when fetching service option. Defaults to false.

desired_windowsArray(DesiredWindow)Optional

The desired windows for service options.

DesiredWindow Object

FieldTypeRequiredDescription
starts_atstringRequired

Start time of the desired window in ISO 8601 format.

ends_atstringRequired

End time of the desired window in ISO 8601 format.

info

You can specify either the customer’s postal_code (recommended) or the store’s location_code as the required field for this request. For the most accurate set of time slots for the delivery address, specify the postal_code. If both fields are specified, the store’s address is used, which might return a different set of time slots.

Request examples

curl --request POST \
--url https://connect.instacart.com/v2/fulfillment/service_options/last_mile \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_code": "string",
"postal_code": "string",
"cart_total_cents": 1,
"items_count": 1,
"earliest_option_start_at": "string",
"units_count": 1,
"with_eta_options": true,
"with_priority_eta_options": true,
"with_handoff_time": true,
"desired_windows": [
{
"starts_at": "string",
"ends_at": "string"
}
]
}'

Response

FieldTypeRequiredDescription
service_optionsArray(ServiceOption)Required

The returned service options.

flagsFlagsOptional

Additional properties of the address.

ServiceOption Object

FieldTypeRequiredDescription
idintegerRequired

The service option ID.

service_option_referencestringOptional

A unique service option reference that acts as a token you pass in downstream requests to place a hold.

datestringRequired

The date and time the service is scheduled to take place in ISO 8601 format.

handoff_timestringOptional

Indicates in ISO 8601 format when the handoff between the store associate and the Instacart shopper is expected to occur. Only applicable to last mile delivery orders and not supported in Fulfillment API v3.

windowWindowRequired

The fulfillment window.

availabilityOptionAvailabilityRequired

Indicates whether the service option is available and, if it's not, provides details about why.

OptionAvailability Object

FieldTypeRequiredDescription
availablebooleanRequired

Indicates whether the service option is available. If false, then it cannot be selected. In this case, reasons and item_codes indicate why the service option isn’t available and which items caused the unavailability.

reasonsArray(string)Optional

If available is false, this field lists the reasons why. Currently, these reasons, which are subject to change without notice, all relate to restrictions on the sale of alcohol. For more information, see Unavailability Reasons.

item_codesArray(string)Optional

The codes of the items which caused the service option to be unavailable.

Window Object

One of the following:

FieldTypeRequiredDescription
start_atstringRequired

The delivery window's starting date and time in ISO 8601 format.

end_atstringRequired

The delivery window's ending date and time in ISO 8601 format.

typestringRequired

The type of service option. One of scheduled, eta, or priority_eta. To enable eta or priority_eta, contact your Instacart Connect representative.

asapbooleanOptional

Indicates whether delivery is scheduled to occur as soon as possible.

or

FieldTypeRequiredDescription
immediate_hourintegerRequired

The number of hours from the time of order creation by which fulfillment is expected to be complete. For example, if immediate_hour is 2 and the order is created at 9:00am, fulfillment should complete by 11:00am.

typestringRequired

Indicates that the service option is immediate. Defaults to immediate.

Flags Object

FieldTypeRequiredDescription
long_distance_deliverybooleanOptional

Whether a delivery to the address will be a long distance delivery.

Reasons for unavailability of a service option

ReasonDescription
Unmatched city and countyThe city and county of the store and customer must match.

Response examples

200 Success

{
"service_options": [
{
"id": 374,
"service_option_reference": "ezppZD0-Mzc0LCA6dHlwZT0-OSwgOndpbmRvdz0-PEluc3RhY2FydDo6Q3VzdG9tZXJzOjpBdmFpbGFiaWxpdHk6OlYxOjpUaW1lc3RhbXBXaW5kb3c6IHN0YXJ0c19hdDogPEdvb2dsZTo6UHJvdG9idWY6OlRpbWVzdGFtcDogc2Vjb25kczogMTUxOTI2NDgwMCwgbmFub3M6IDA-LCBlbmRzX2F0OiA8R29vZ2xlOjpQcm90b2J1Zjo6VGltZXN0YW1wOiBzZWNvbmRzOiAxNTE5MjcyMDAwLCBuYW5vczogMD4-fQ==",
"date": "2018-02-21",
"window": {
"start_at": "2018-02-22T02:00:00Z",
"end_at": "2018-02-22T04:00:00Z",
"type": "scheduled",
"asap": false
},
"availability": {
"available": true,
"reasons": [],
"item_codes": []
}
},
{
"id": 375,
"service_option_reference": "ezppZD0-Mzc1LCA6dHlwZT0-NCwgOndpbmRvdz0-PEluc3RhY2FydDo6Q3VzdG9tZXJzOjpBdmFpbGFiaWxpdHk6OlYxOjpUaW1lc3RhbXBXaW5kb3c6IHN0YXJ0c19hdDogPEdvb2dsZTo6UHJvdG9idWY6OlRpbWVzdGFtcDogc2Vjb25kczogMTUxOTI2NDgwMCwgbmFub3M6IDA-LCBlbmRzX2F0OiA8R29vZ2xlOjpQcm90b2J1Zjo6VGltZXN0YW1wOiBzZWNvbmRzOiAxNTE5MjcyMDAwLCBuYW5vczogMD4-fQ==",
"date": "2018-02-21",
"window": {
"immediate_hour": 2,
"type": "immediate"
},
"availability": {
"available": true,
"reasons": [],
"item_codes": []
}
},
{
"id": 376,
"service_option_reference": "ezppZD0-Mzc2LCA6dHlwZT0-NywgOndpbmRvdz0-PEluc3RhY2FydDo6Q3VzdG9tZXJzOjpBdmFpbGFiaWxpdHk6OlYxOjpUaW1lc3RhbXBXaW5kb3c6IHN0YXJ0c19hdDogPEdvb2dsZTo6UHJvdG9idWY6OlRpbWVzdGFtcDogc2Vjb25kczogMTc3NjI4MTc4MCwgbmFub3M6IDIwNDU1NzAwMD4sIGVuZHNfYXQ6IDxHb29nbGU6OlByb3RvYnVmOjpUaW1lc3RhbXA6IHNlY29uZHM6IDE3NzYyODg5ODAsIG5hbm9zOiAyMDQ1NTcwMDA-Pn0=",
"date": "2026-04-15",
"window": {
"start_at": "2026-04-15T19:36:20Z",
"end_at": "2026-04-15T21:36:20Z",
"type": "eta",
"asap": false
},
"availability": {
"available": true,
"reasons": [],
"item_codes": []
}
}
]
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Blank postal code"location_code or postal_code required"1001{"key":"base"}
400Invalid location code"Specified store is not available for lastmile."1001{"key":"location_code"}
400Invalid postal code for store"We do not currently support delivery from this store to the selected postal_code."1001{"key":"postal_code"}
404Resource not found"Resource not found"4000Not applicable