Skip to main content

Preview time slots for pickup

POST /v2/fulfillment/service_options/pickup

Previews possible service options for pickup 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 pickup time slots that might be available to them at checkout.

Based on the store location_code 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 pickup 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.

Request

FieldTypeRequiredDescription
location_codestringRequired

The location code of the store fulfilling the order.

cart_total_centsintegerOptional

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

items_countintegerOptional

The number of items in the order.

with_eta_optionsbooleanOptional

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

Request examples

curl --request POST \
--url https://connect.instacart.com/v2/fulfillment/service_options/pickup \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_code": "string",
"cart_total_cents": 1,
"items_count": 1,
"with_eta_options": true
}'

Response

FieldTypeRequiredDescription
service_optionsArray(ServiceOption)Required

The returned service options.

flagsFlagsOptional

Additional properties of the address.

ServiceOption Object

FieldTypeRequiredDescription
idintegerRequired

The ID of the service option.

service_option_referencestringOptional

The reference of the service option.

datestringRequired

The date the service will take place in ISO 8601 format.

handoff_timestringOptional

The ETA for shopper to arrive at store.

windowWindowRequired

The time window when the service will take place.

availabilityOptionAvailabilityRequired

The availability of this service option.

OptionAvailability Object

FieldTypeRequiredDescription
availablebooleanRequired

Indicates if this service option is available for the user.

reasonsArray(string)Optional

The reasons for unavailability of a service option. Currently, the reasons are related to the laws governing the sale of alcohol. For example, restrictions on quantity, delivery time, pickup, and matched city and county of stores and customers. The reasons are subject to change without notice.

item_codesArray(string)Optional

The item codes which caused the option to be unavailable.

Window Object

One of the following:

FieldTypeRequiredDescription
start_atstringRequired

The start of the delivery window in ISO 8601 format.

end_atstringRequired

The end of the delivery window 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 if delivery will happen as soon as possible. Only true when type is asap.

or

FieldTypeRequiredDescription
immediate_hourintegerRequired

Indicates the number of hours after order creation that delivery will occur.

typestringRequired

Indicates this is an immediate option. 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
State law restricts amount of {beer/wine/spirits} to {#} fl oz, cart quantity is: {#} fl oz.The quantity of this alcohol type exceeds the state law limit.
Error validating alcohol quantities. Please try again.The quantity of alcohol can’t be validated.
Unmatched city and countyThe city and county of the store and customer must match.
Unfortunately alcohol pickup is not available at this location. Please remove alcohol from your basket or try delivery.Alcohol pickup is not available at this location.

Response examples

200 Success

{
"service_options": [
{
"id": 19,
"service_option_reference": "ezppZD0-MTksIDp0eXBlPT4iUGlja3VwT3B0aW9uIiwgOndpbmRvdz0-PEluc3RhY2FydDo6RW50ZXJwcmlzZTo6Qm9iYTo6Q29yZTo6VHlwZXM6OlYxOjpTZXJ2aWNlT3B0aW9uU2NoZWR1bGVkV2luZG93OiBkZXNjcmlwdG9yOiAiIiwgc3RhcnRfYXQ6IDxHb29nbGU6OlByb3RvYnVmOjpUaW1lc3RhbXA6IHNlY29uZHM6IDE1MTkyNTc2MDAsIG5hbm9zOiAwPiwgZW5kX2F0OiA8R29vZ2xlOjpQcm90b2J1Zjo6VGltZXN0YW1wOiBzZWNvbmRzOiAxNTE5MjY0ODAwLCBuYW5vczogMD4-fQ==",
"date": "2018-02-22",
"window": {
"start_at": "2018-02-22T00:00:00Z",
"end_at": "2018-02-22T02:00:00Z",
"type": "scheduled",
"asap": false
},
"availability": {
"available": true,
"reasons": [],
"item_codes": []
}
},
{
"id": 20,
"service_option_reference": "ezppZD0-MjAsIDp0eXBlPT4iUGlja3VwRXRhT3B0aW9uIiwgOndpbmRvdz0-PEluc3RhY2FydDo6RW50ZXJwcmlzZTo6Qm9iYTo6Q29yZTo6VHlwZXM6OlYxOjpTZXJ2aWNlT3B0aW9uU2NoZWR1bGVkV2luZG93OiBkZXNjcmlwdG9yOiAiIiwgZW5kX2F0OiA8R29vZ2xlOjpQcm90b2J1Zjo6VGltZXN0YW1wOiBzZWNvbmRzOiAxNTE5MjY0ODAwLCBuYW5vczogMD4-fQ==",
"date": "2018-02-22",
"window": {
"start_at": "2018-02-22T00:00:00Z",
"end_at": "2018-02-22T02:00:00Z",
"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
400Invalid location code"Specified store is not available for pickup."1001{"key":"location_code"}
404Resource not found"Resource not found"4000Not applicable