Skip to main content

Reserve a time slot

POST /v2/fulfillment/users/{user_id}/service_options/{service_option_id}/reserve

Reserves the selected time slot (service_hold_id) for the specified user ID. Time slots are reserved for 10 minutes. If the reservation expires before you can create the order, you can attempt to reserve the same time slot. If the time slot still has capacity, the request is successful. For more information about time slots, see Service options (time slots).

A user ID can have one reserved time slot at a time. If you send another reservation request for this user, even if it specifies the same time slot, the currently reserved time slot is cancelled before the new reservation request is processed.

After a time slot is reserved, save the service_option_hold_id. You specify this ID when creating an order.

Best practice

To reduce the chance that the reservation expires before you can create an order, send the reservation request near the end of the checkout process.

Security

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

Parameters

NameInTypeRequiredDescription
user_idpathstringRequired

The ID of the user.

service_option_idpathintegerRequired

The ID of the service option.

Request

None.

Request examples

curl --request POST \
--url 'https://connect.instacart.com/v2/fulfillment/users/{user_id}/service_options/{service_option_id}/reserve' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

Response

FieldTypeRequiredDescription
service_option_holdServiceOptionHoldRequired

The created service option hold.

ServiceOptionHold Object

FieldTypeRequiredDescription
idintegerRequired

The ID of the service option hold.

expires_atstringRequired

The expiration time of the service option hold in ISO 8601 format.

service_optionServiceOptionRequired

The held service option.

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.

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.
Cannot deliver alcohol to this postal codeInstacart can’t deliver alcohol to this postal code.
State law doesn't allow delivery of alcohol in this windowInstacart can’t deliver alcohol in this delivery window because of state law.
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_option_hold": {
"id": 188,
"expires_at": "2018-02-22T00:10:00Z",
"service_option": {
"id": 287,
"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": []
}
}
}
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Retry later"Please try again in a little while"2003Not applicable
400User Not Found"User Not Found"1001{"key":"user_id"}
400Blank service option id"can't be blank"1001{"key":"service_option_id"}
400Service Option Expired"The requested ETA option has expired."1001{"key":"service_option_id"}
403Inactive user"User Not Active"nullNot applicable
404Resource not found"Resource not found"4000Not applicable