Skip to main content

Ingest orders from a third-party system

POST /v2/ian/order/log

Ingests orders that were fulfilled by a provider other than Instacart. To include this information in the ads metrics, orders must be sent within three days of the order creation date.

Security

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

Parameters

NameInTypeRequiredDescription
X-Retailer-IdheaderstringOptionalThe retailer slug. This is only required for a retailer with multiple banners. Retailers with single banners can leave this empty.

Request

FieldTypeRequiredDescription
eventstringRequiredThe type of the event. Always set to “order.created”.
propertiesOrderPropertiesRequiredThe properties of the order.
user_idstringRequiredThe unique identifier of the user.
sent_at_utcstringRequiredThe time when the request was sent. Use ISO8601 format with the time zone designator (TZD) appended. Example: 2022-12-03T10:15:30+08:00.

OrderProperties Object

FieldTypeRequiredDescription
order_idstringRequiredThe unique identifier of the order.
created_at_utcstringRequiredThe time the order was submitted by the user. Use ISO8601 format with the time zone designator (TZD) appended. Example: 2022-12-03T10:15:30+08:00.
updated_at_utcstringOptionalThe time an existing order was updated, if applicable. Use ISO8601 format with the time zone designator (TZD) appended. Example: 2022-12-03T10:15:30+08:00.
location_codestringRequiredThe location code of the store where the order was fulfilled.
delivery_statusstringOptionalThe delivery status of the order.
order_itemsArray(OrderItem)RequiredThe items in the order as an array.

OrderItem Object

FieldTypeRequiredDescription
ordered_rrcstringRequiredThe item's retailer reference code (RRC). At least one of UPC or RRC should be provided.
ordered_upcstringRequiredThe item's universal product code (UPC). At least one of UPC or RRC should be provided.
ordered_price_per_unitstringRequiredThe price of one unit of this item in nanos before tax.
ordered_total_discountstringOptionalTotal discount of the ordered items in nanos.
ordered_quantitystringRequiredThe quantity of the item ordered in terms of the specified size.

Request examples

curl --request POST \
--url https://connect-ian.instacart.com/v2/ian/order/log \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Retailer-Id: string' \
--data '{
"event": "order.created",
"properties": {
"order_id": "string",
"created_at_utc": "string",
"updated_at_utc": "string",
"location_code": "string",
"delivery_status": "created",
"order_items": [
{
"ordered_rrc": "string",
"ordered_upc": "string",
"ordered_price_per_unit": "string",
"ordered_total_discount": "string",
"ordered_quantity": "string"
}
]
},
"user_id": "string",
"sent_at_utc": "string"
}'

Response

FieldTypeRequiredDescription
messagestringRequiredResponse for the user.

Response examples

200 Success

{
"message": "Successfully processed"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Missing event properties"can't be blank"1001{"key":"properties"}
400Invalid event name"is not included in the list"1001{"key":"event"}
400order.created with empty order items"can't be blank"1001{"key":"properties.order_items"}