Skip to main content

Handle order item replacement

PUT /v2/post_checkout/orders/{order_id}/items/{order_item_id}/replacement

Approve a replacement made to an item while the order is being shopped or request a refund. Replacements must be resolved before the shopper has checked out.

Security

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

Parameters

NameInTypeRequiredDescription
order_idpathstringRequired

The order ID.

order_item_idpathstringRequired

The order item ID.

Request

FieldTypeRequiredDescription
statusstringRequired

The requested status of the replacement. One of 'APPROVED' or 'REJECTED'.

Request examples

curl --request PUT \
--url 'https://connect.instacart.com/v2/post_checkout/orders/{order_id}/items/{order_item_id}/replacement' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "APPROVED"
}'

Response

None.

Response examples

200 Success

{
// Empty
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Status not present*"There were issues with your request"9999Not applicable
400Status not valid"is not included in the list"1001{"key":"status"}
400Order was not created with Fulfillment v3, trying to fetch with client credentials"User ID not found"4001Not applicable
404Order not found"Resource not found"4000Not applicable
404Order item not found"Order item 1111 not found"4000Not applicable
* Multiple error