Skip to main content

Create an order item as a shopper

POST /v2/fulfillment_sandbox/shoppers/{shopper_id}/orders/{order_id}/items

Creates an order item as a shopper.

Security

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

Parameters

NameInTypeRequiredDescription
shopper_idpathintegerRequiredThe ID of the shopper.
order_idpathstringRequiredThe ID of the order.
X-Treat-Ids-As-InternalheaderbooleanOptional

Request

FieldTypeRequiredDescription
delivered_countintegerOptionalThe delivered count of the item. Must be a non-negative integer.
delivered_weightnumberOptionalThe delivered weight of the item (defaults to lbs in the US). Must be a non-negative number.
itemItemRequiredThe item to add.
scansArray(ShopperOrderItemScan)OptionalThe barcodes scans.

ShopperOrderItemScan Object

FieldTypeRequiredDescription
scanned_stringstringRequiredThe barcode scanned.
scanned_string_typestringRequiredThe type of barcode scanned.

Item Object

One of the following:

FieldTypeRequiredDescription
upcstringRequiredThe item's universal product code.

or

FieldTypeRequiredDescription
rrcstringRequiredThe item's retailer reference code.

Request examples

curl --request POST \
--url 'https://connect.instacart.com/v2/fulfillment_sandbox/shoppers/{shopper_id}/orders/{order_id}/items' \
--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,
"item": {
"upc": "string"
},
"scans": [
{
"scanned_string": "string",
"scanned_string_type": "string"
}
]
}'

Response

FieldTypeRequiredDescription
successbooleanRequiredWhether 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
400Item not specified"can't be blank"1001{"key":"item"}
400Incompatible order status"Incompatible order status"3003Not applicable
400Item not found"Item not found."1001{"key":"item"}
404Order not found"Resource not found"4000Not applicable