Skip to main content

List time slots for last mile delivery

POST /v2/fulfillment/lastmile/service_options

Lists the available delivery service options for the customer's location. In this context, service options are time slots, such as within 2 hours of creating the order or tomorrow between 2pm and 4pm. Availability is based on current and anticipated shopper availability for the relevant store and delivery location.

After a time slot is selected, save the service_option_id. You specify the ID when when reserving the time slot.

Security#

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

Parameters#

Request#

FieldTypeRequiredDescription
postal_codestringโœ…The postal code for delivery.
cart_total_centsintegerThe total value of all items for the order in cents.
items_countintegerThe number of items in the order.

Request Examples#

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

Response#

FieldTypeRequiredDescription
service_optionsArray(Service_options)โœ…The returned service options.

Service_options Object#

FieldTypeRequiredDescription
idintegerโœ…The ID of the service option.
datestringโœ…The date the service will take place in ISO 8601 format.
windowWindowโœ…The time window when the service will take place.
availabilityAvailabilityโœ…The availability of this service option.

Availability Object#

FieldTypeRequiredDescription
availablebooleanโœ…Indicates if this service option is available for the user.
reasonsArray(string)If the service option is unavailable, this will contain the reasons why.
item_codesArray(string)The item codes which caused the option to be unavailable.

Window Object#

One of the following:

FieldTypeRequiredDescription
start_atstringโœ…The start of the delivery window in ISO 8601 format.
end_atstringโœ…The end of the delivery window in ISO 8601 format.
typestringโœ…The type of service option. One of 'scheduled', 'eta' (contact your Instacart Connect representative), or 'asap' (contact your Instacart Connect representative).
asapbooleanIndicates if delivery will happen as soon as possible. Only true when type is asap.

or

FieldTypeRequiredDescription
immediate_hourintegerโœ…Indicates the number of hours after order creation that delivery will occur.
typestringโœ…Indicates this is an immediate option. Defaults to immediate.

Response Examples#

{  "service_options": [    {      "id": 141,      "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": []      }    }  ]}