Skip to main content

Schedule pickup

POST /v2/post_checkout/orders/{order_id}/pickup/schedule_pickup

To help reduce the customer’s wait time at the store, you can use this operation to schedule a curbside pickup.

Your request must provide the customer’s estimated time of arrival (ETA). Instacart uses that timestamp to create a record of the scheduled pickup. No more than one minute after the ETA you provide has elapsed, an automated job notifies a store associate via the Shopper App that the customer is expected to have arrived.

You can use record customer arrival to complement this operation. Recording an arrival immediately notifies the store, while scheduling a pickup does so asynchronously. This lets you build your app so that customers can notify store associates of their arrival, even if that time is before a scheduled pickup.

As long as all the preconditions are met, you can also use this operation to update a scheduled pickup. To do this, pass the same order_id and a new schedule_pickup_eta.

Preconditions

The post-checkout order must have a fulfillment_type of pickup, a pickup_category of curbside, and a workflow_state of ready_for_pickup (which is equivalent to a status of staged in the fulfillment order).

When to use

Typically, you implement this endpoint when you want your customers to be able to use your order status page to indicate that they’re on the way to the store. You can then capture the customer's location, determine their estimated travel time to the store, compute an ETA, and pass that timestamp to Instacart.

Limitations

This operation is not supported for orders that have a pickup delegate. If the order has a delegate and you schedule a pickup, the Shopper App provides the customer's name and phone number to the store associate. As a result, when a delegate is assigned to an order, you're limited to recording their arrival.

Security

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

Parameters

NameInTypeRequiredDescription
order_idpathstringRequired

The order ID, which maps to id in the get post-checkout order response.

Request

FieldTypeRequiredDescription
schedule_pickup_etastringRequired

The customer’s estimated time of arrival at the store. Must be a UTC timestamp in ISO-8601 format.

The provided value can’t be in the past or more than twelve hours in the future, as measured from the time of this request.

Request examples

curl --request POST \
--url 'https://connect.instacart.com/v2/post_checkout/orders/{order_id}/pickup/schedule_pickup' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"schedule_pickup_eta": "string"
}'

Response

FieldTypeRequiredDescription
messagestringRequired

Indicates that pickup has been successfully scheduled. The message is always Scheduled pickup successfully created for order, regardless of whether the scheduled pickup record was created or updated.

order_idstringRequired

The order ID, which maps to id in the get post-checkout order response.

Response examples

200 Success

{
"message": "Scheduled pickup successfully created for order",
"order_id": "123_456"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Order is not a pickup order"Pickup unavailable for non-pickup orders"4001Not applicable
400Order is not a curbside pickup"Cannot record user arrival for non-curbside orders"4001Not applicable
400Order is not in staged state"Scheduled pickup not available for non-staged orders"4010Not applicable
400ETA format is invalid"ETA format is invalid, expected ISO8601 UTC timestamp"4012Not applicable
400ETA is in the past"ETA must not be in the past (got: 2021-12-15T16:19:00Z)"4013Not applicable
400ETA is more than 12 hours in the future"ETA must be within 12 hours from now (got: 2021-12-16T06:19:00Z)"4014Not applicable
403API not enabled via feature flag"API not enabled"nullNot applicable
404No pickup status found for order"No pickup status found for order"4000Not applicable
404Order not found"Resource not found"4000Not applicable