Get an order
GET /v2/post_checkout/orders/{order_id}
Retrieves high-level information about the specified order. This includes the creation date of the order, the current workflow state, the fulfillment type, and the start and end times of the order's delivery window.
The following table describes the list of valid fulfillment types:
Fulfillment type | Description |
---|---|
delivery | A shopper picks the items in the order and delivers the order to the customer. |
last_mile_delivery | An Instacart shopper delivers an order that was picked and staged by an in-store shopper. |
pickup | A shopper picks and stages an order for pickup by the customer. |
The following table describes the list of valid workflow states and which fulfillment type uses each state:
Workflow State | Description | delivery | last_mile_delivery | pickup |
---|---|---|---|---|
brand_new | The order has been created but not acknowledged by a shopper. | ✔️ | ✔️ | ✔️ |
acknowledged | A shopper has acknowledged the order. | ✔️ | ❌ | ✔️ |
picking | The order is currently being shopped by a shopper. | ✔️ | ❌ | ✔️ |
verifying_replacements | Replacement items in the order are being reviewed. | ✔️ | ❌ | ✔️ |
checkout | The shopper is going through checkout with the order. | ✔️ | ❌ | ✔️ |
bags_check | The bags in the order are being checked. | ✔️ | ❌ | ✔️ |
staged | The order has been placed in the staging area. | ✔️ | ❌ | ❌ |
staged_for_delivery | The order has been placed in the staging area. | ❌ | ✔️ | ❌ |
waiting_for_delivery | The order is waiting to be picked up for delivery by a shopper. | ❌ | ✔️ | ❌ |
acknowledged_for_delivery | A shopper has acknowledged the order and is making their way to the store. | ❌ | ✔️ | ❌ |
at_store | The shopper has arrived at the store. | ❌ | ✔️ | ❌ |
bags_verified | All bags have been verified for the order. | ❌ | ✔️ | ✔️ |
ready_for_pickup | The order is ready for customer pickup. | ❌ | ❌ | ✔️ |
user_at_store | The customer has arrived at the store. | ❌ | ❌ | ✔️ |
runner_awaiting | A store employee is being selected to carryout the order. | ❌ | ❌ | ✔️ |
runner_acknowledged | A store employee has acknowledged the order and is making their way to the customer. | ❌ | ❌ | ✔️ |
runner_not_found | A store employee could not be found. | ❌ | ❌ | ✔️ |
in_store_pickup | The order is available for pickup within the store. | ❌ | ❌ | ✔️ |
delivering | The order is currently being delivered to the customer. | ✔️ | ✔️ | ❌ |
delivered | The order has been delivered to the customer. | ✔️ | ✔️ | ✔️ |
If you set the fulfillment_type
parameter to pickup
, you must also set the pickup_category
parameter.
The following table describes the list of valid values for pickup_category
:
Pickup category | Description |
---|---|
curbside | When the customer arrives, a retailer employee runs the order to a designated pickup location. |
in_store | The customer picks up the order from a designated location inside the store. |
locker | The customer picks up the order from a pickup locker. |
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
order_id | path | string | The ID of the order. |
Request
None.Request examples
- cURL
- Java
- Python
- Go
curl --request GET \
--url 'https://connect.instacart.com/v2/post_checkout/orders/{order_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://connect.instacart.com/v2/post_checkout/orders/{order_id}")
.header("Accept", "application/json")
.header("Authorization", "Bearer <token>")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
headers = {
'Accept': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("GET", "/v2/post_checkout/orders/{order_id}", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/v2/post_checkout/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
Field | Type | Required | Description |
---|---|---|---|
id | string | The ID of the order. | |
locale | string | The order's locale in POSIX format. Example: en_US. | |
creation_date | string | The creation date of this order. | |
workflow_state | string | The workflow state of this order. | |
fulfillment_type | string | The type of order: {delivery, last_mile_delivery, pickup}. | |
auth_amount | number | The authorized amount (can be null). | |
items_price | number | The price of the items (can be null). | |
tip_amount | number | The tip amount (can be null). | |
pickup_category | string | The type of pickup {curbside, locker, in_store} (can be null). | |
fulfillment_details | OrderFulfillmentDetails | The order fulfillment details. | |
user_id | integer | The ID of the user associated with order. | |
client_configuration_id | integer | The ID of the retailer associated with order. |
OrderFulfillmentDetails Object
Field | Type | Required | Description |
---|---|---|---|
window_starts_at | string | When the fulfillment window starts at. | |
window_ends_at | string | When the fulfillment window ends at. | |
bag_count | integer | The number of bags in the order (can be null). |
Response examples
200 Success
200
Order fetched200
LMD order fetched200
Pickup order fetched
{
"id": "NoSkins!",
"locale": "fr_CA",
"creation_date": "2021-12-15T17:19:00Z",
"workflow_state": "brand_new",
"fulfillment_type": "delivery",
"fulfillment_details": {
"window_starts_at": "2021-12-15T17:19:00Z",
"window_ends_at": "2021-12-15T18:19:00Z",
"bag_count": 2
},
"user_id": 12345,
"client_configuration_id": 56789,
"is_express": true
}
{
"id": "NoSkins!",
"locale": "en_US",
"creation_date": "2021-12-15T17:19:00Z",
"workflow_state": "workflow_state_unspecified",
"fulfillment_type": "last_mile_delivery",
"auth_amount": 12,
"items_price": 56.08,
"tip_amount": 34.56,
"fulfillment_details": {
"window_starts_at": "2021-12-15T17:19:00Z",
"window_ends_at": "2021-12-15T18:19:00Z"
},
"user_id": 1,
"client_configuration_id": 1,
"is_express": true
}
{
"id": "NoSkins!",
"locale": "en_US",
"creation_date": "2021-12-15T17:19:00Z",
"workflow_state": "in_store_pickup",
"fulfillment_type": "pickup",
"pickup_category": "curbside",
"fulfillment_details": {
"window_starts_at": "2021-12-15T17:19:00Z",
"window_ends_at": "2021-12-15T18:19:00Z"
},
"user_id": 10,
"client_configuration_id": 10,
"is_express": true
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
404 | Order not found | "Resource not found" | 4000 | Not applicable |