Skip to main content

Get order items

GET /v2/post_checkout/orders/{order_id}/items

Retrieves the list of items in the order. Each item in the list includes item details of the ordered item, the current status of that item, and the current replacement for that item, if one exists. Item details include the name, quantity ordered, and cost unit.

Security

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

Parameters

NameInTypeRequiredDescription
order_idpathstringRequired

The ID of the order.

X-Treat-Ids-As-InternalheaderbooleanOptional

Request

None.

Request examples

curl --request GET \
--url 'https://connect.instacart.com/v2/post_checkout/orders/{order_id}/items' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'X-Treat-Ids-As-Internal: true'

Response

FieldTypeRequiredDescription
line_itemsArray(LineItem)Required

Array of order line items.

LineItem Object

FieldTypeRequiredDescription
idstringRequired

The ID of the line item.

replacement_statusstringOptional

Reflects the customer's decision on a shopper-proposed replacement item. One of the following:

  • SUBSTITUTION_STATUS_UNSPECIFIED: No replacement has been made.

  • PENDING: A replacement has been proposed, but the customer hasn't responded yet.

  • APPROVED: The customer approved the replacement.

  • REJECTED: The customer rejected the replacement.

statusstringRequired

Reflects the current state of the originally ordered item. One of the following values:

  • NOT_PICKED: The shopper has yet to pick the ordered item.

  • FOUND: The shopper found the ordered item.

  • REPLACED: The shopper replaced the ordered item.

  • TO_REFUND: The ordered item is to be refunded.

certified_deliverybooleanOptional

Whether the line item requires certified delivery.

line_numstringOptional

The line number of the item.

itemOrderItemRequired

The order line item.

replacementOrderItemOptional

The replacement for this item if one exists.

OrderItem Object

FieldTypeRequiredDescription
namestringRequired

The name of the item.

image_urlstringOptional

The URL of the item image.

quantitystringRequired

The number of items.

cost_unitstringRequired

The unit of item quantity.

Response examples

200 Success

{
"line_items": [
{
"id": "qwertyuiop",
"replacement_status": "SUBSTITUTION_STATUS_UNSPECIFIED",
"status": "REPLACED",
"certified_delivery": false,
"line_num": "1",
"item": {
"name": "Bananas",
"image_url": "fakeUrl.com",
"quantity": "30.0",
"cost_unit": "LB"
},
"replacement": {
"name": "Bananas",
"image_url": "fakeUrl.com",
"quantity": "30.0",
"cost_unit": "LB"
}
}
]
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Order was not created with Fulfillment v3, trying to fetch with client credentials"User ID not found"4001Not applicable
404Order items not found"Resource not found"4000Not applicable