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-IdheaderstringOptional

The retailer slug. This is only required for a retailer with multiple banners. Retailers with single banners can leave this empty.

Request

FieldTypeRequiredDescription
eventstringRequired

The type of the event. Always set to “order.created”.

propertiesOrderPropertiesRequired

The properties of the order.

user_idstringRequired

The unique identifier of the user.

sent_at_utcstringRequired

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

The unique identifier of the order.

created_at_utcstringRequired

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

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

The location code of the store where the order was fulfilled.

delivery_statusstringOptional

The delivery status of the order.

order_itemsArray(OrderItem)Required

The items in the order as an array.

OrderItem Object

FieldTypeRequiredDescription
ordered_rrcstringRequired

The item's retailer reference code (RRC). At least one of UPC or RRC should be provided.

ordered_upcstringRequired

The item's universal product code (UPC). At least one of UPC or RRC should be provided.

ordered_price_per_unitstringRequired

The price of one unit of this item in nanos before tax.

ordered_total_discountstringOptional

Total discount of the ordered items in nanos.

ordered_quantitystringRequired

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

Response 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"}