Skip to main content

Update an order item as a shopper

PUT /v2/fulfillment_sandbox/shoppers/{shopper_id}/orders/{order_id}/items/{line_num}

Updates an order item as a shopper.

The following table describes the valid values for the status attribute.

StatusDescription
not_foundBefore shopping starts, all items have this status.
foundShopper finds the item. You can adjust the delivered_count to simulate a shopper finding some of the item but not the quantity that the customer ordered.
replacedShopper replaces an item. You can specify the replacement item and delivered_count.
to_refundShopper can't find the item or a replacement. Set the delivered_count to 0 when you use this status.

Security

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

Parameters

NameInTypeRequiredDescription
shopper_idpathintegerThe ID of the shopper.
order_idpathstringThe ID of the order.
line_numpathstringThe line number of the item.
X-Treat-Ids-As-Internalheaderboolean

Request

FieldTypeRequiredDescription
delivered_countintegerThe delivered count of the item. Must be a non-negative integer.
delivered_weightnumberThe delivered weight of the item (defaults to lbs in the US). Must be a non-negative number.
statusstringThe status of the item.
replacement_itemReplacement_itemThe replacement item.
scansArray(Scans)The barcodes scans.

Scans Object

FieldTypeRequiredDescription
scanned_stringstringThe barcode scanned.
scanned_string_typestringThe type of barcode scanned.

Replacement_item Object

One of the following:

FieldTypeRequiredDescription
upcstringThe item's universal product code.

or

FieldTypeRequiredDescription
rrcstringThe item's retailer reference code.

Request examples

curl --request PUT \
--url 'https://connect.instacart.com/v2/fulfillment_sandbox/shoppers/{shopper_id}/orders/{order_id}/items/{line_num}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Treat-Ids-As-Internal: true' \
--data '{
"delivered_count": 1,
"delivered_weight": 1,
"status": "string",
"replacement_item": {
"upc": "string"
},
"scans": [
{
"scanned_string": "string",
"scanned_string_type": "string"
}
]
}'

Response

FieldTypeRequiredDescription
successbooleanWhether the request was successful.

Response examples

200 Success

{
"success": true
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Status not specified"can't be blank"1001{"key":"status"}
400Incompatible order status"Incompatible order status"3003{}
400Replacement item not found"Replacement item not found."1001{"key":"replacement_item"}
404Order not found"Resource not found"4000{}
404Order item not found"Order item not found."4000{}