Skip to main content

Find stores offering last mile delivery

POST /v2/fulfillment/lastmile/stores

Deprecated

For last mile delivery implementations, this endpoint has been replaced by Find stores offering last mile delivery. The URI has changed, but the request parameters and responses remain the same. The new URI is consistent in format with the delivery and pickup workflows. This change reflects our commitment to making our API more intuitive to use when implementing multiple fulfillment workflows in your e-commerce site. The deprecated endpoint is still supported for existing implementations. For new implementations, use the revised endpoint.

For dispatch last mile delivery implementations, this endpoint has been restored. The URI, request parameters, and responses remain the same. Use the Find stores offering dispatch last mile delivery endpoint instead.

Returns an array of stores that offer delivery for the customer's location. A store is eligible for delivery orders when the pickup_only flag is set to false.

If a store offers alcohol, the alcohol flag is set to true. For more information, see Alcohol compliance.

After a store is selected, save the store location_code. You specify the location when creating an order.

warning

When searching by postal code only, it's possible that a delivery service area covers some but not all of the addresses in the postal code area. Check the response. If the is_partial flag is set to true, send another request with the customer's address_line_1 filled to verify that the address is within the service area. If the response contains the store location, the address is serviceable and you can create an order.

Security

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

Parameters

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

Request

FieldTypeRequiredDescription
find_byFind_byRequired

The location to use for finding the stores.

Find_by Object

One of the following:

FieldTypeRequiredDescription
latitudenumberRequired

The latitude coordinate.

longitudenumberRequired

The longitude coordinate.

or

FieldTypeRequiredDescription
address_line_1stringRequired

The first address line.

address_line_2stringOptional

The second address line.

address_typestringOptional

The type of address, e.g., "residential".

postal_codestringRequired

The postal/zip code of the address.

citystringOptional

The city or town of the address, e.g., "Chicago".

or

FieldTypeRequiredDescription
postal_codestringRequired

A zip code or postal code can have numbers and uppercase letters only. Omit spaces. For example: "90210" or "M6K3L5".

Request examples

curl --request POST \
--url https://connect.instacart.com/v2/fulfillment/lastmile/stores \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"find_by": {
"latitude": 1,
"longitude": 1
}
}'

Response

FieldTypeRequiredDescription
storesArray(Store)Optional

The available stores, sorted by distance to the customer’s location, from nearest to farthest.

is_partialbooleanOptional

Indicates whether the requested postal_code has partial or full coverage. If true, then some addresses in the postal_code are outside one or more of the store’s delivery areas. Therefore, delivery coverage isn’t guaranteed for all addresses. If false, then every address in the postal_code is within all of the store’s delivery areas.

Store Object

FieldTypeRequiredDescription
namestringRequired

The name of the store.

location_codestringRequired

The store code, which is used in other requests to identify the store.

flagsFlagsRequired

Properties of the store.

Flags Object

FieldTypeRequiredDescription
alcoholbooleanRequired

Whether the store supports alcoholic orders.

pickupbooleanRequired

Whether the store supports pickup orders. When pickup is true, the store supports both pickup and delivery. When pickup is false, the store supports only delivery orders.

pickup_onlybooleanRequired

When the pickup flag is true, the pickup_only value indicates whether the store supports delivery in addition to pickup. When pickup_only is false, the store supports delivery. When pickup_only is true, the store doesn't support delivery.

long_distance_deliverybooleanOptional

Whether a delivery from the store will be a long distance delivery.

rx_eligiblebooleanOptional

Whether the store is eligible for RX orders.

Response examples

200 Success

{
"stores": [
{
"name": "Test Warehouse Location 647",
"location_code": "000-34145",
"flags": {
"alcohol": false,
"pickup": true,
"pickup_only": false,
"long_distance_delivery": false
}
},
{
"name": "Test Warehouse Location 648",
"location_code": "000-34153",
"flags": {
"alcohol": true,
"pickup": true,
"pickup_only": false,
"long_distance_delivery": true
}
}
],
"is_partial": false
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400No stores found"Stores not found for the provided request."1001Not applicable
400Malformed find_by object"value is not valid"1001{"key":"find_by"}
400Missing both postal code and coordinates"can't be blank"1001{"key":"find_by"}
400Postal code not found"Postal code not found."1001{"key":"postal_code"}