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_idpathintegerRequired

The ID of the shopper.

order_idpathstringRequired

The ID of the order.

X-Treat-Ids-As-InternalheaderbooleanOptional

Request

FieldTypeRequiredDescription
delivered_countintegerOptional

The delivered count of the item. Must be a non-negative integer.

delivered_weightnumberOptional

The delivered weight of the item (defaults to lbs in the US). Must be a non-negative number.

itemItemRequired

The item to add.

scansArray(ShopperOrderItemScan)Optional

The barcodes scans.

ShopperOrderItemScan Object

FieldTypeRequiredDescription
scanned_stringstringRequired

The barcode scanned.

scanned_string_typestringRequired

The type of barcode scanned.

Item Object

One of the following:

FieldTypeRequiredDescription
upcstringRequired

The item's universal product code.

or

FieldTypeRequiredDescription
rrcstringRequired

The 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
successbooleanRequired

Whether 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"}
400Order does not allow new items to be added"This order does not allow new items to be added"1001Not applicable
400Item not found"Item not found."1001{"key":"item"}
400Incompatible order status"Incompatible order status"3003Not applicable
400Create shopper order item error"Sorry, an unexpected error has occurred. Our team has been notified. Please try again later."5000Not applicable
404Order not found"Resource not found"4000Not applicable