Order History API

Overview

The order History API enables you to send order data to engage. While the Javascript source will catch order data through events happening now, this source let you send historic data to quickly add enough data to train the machine learning models, such as the recommendation engine.

Add this source

  1. Log into your engage account

  2. Click "Add sources" on the home page and select the Order History API

  3. Follow the instructions to get started

Use this source

Once activated, you may start to send orders to us. The endpoint accept single orders or batches of maximum 250 orders at a time. Check the API Reference for specifics and code examples in most languages.

Example call

curl --location --request POST 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders'
--header 'Authorization: Bearer [ADD YOUR USER TOKEN HERE]' \
--header 'Content-Type: application/json'
--data-raw '{
"city": "New York",
"country": "USA",
"currency": "USD",
"date_created_gmt": "2020-01-01 20:20:01+01:00",
"email": "me@my-store.com",
"order_id": 20200101,
"status": "completed",
"order_value": 40.00,
"line_items":[
{
"line_item_product_id": 1002,
"line_item_price": 17.49,
"line_item_quantity": 1,
"line_item_name": "Any name",
"line_item_sku": "sku 123",
"line_item_variation_id": 1234,
"line_item_subtotal": 17.49,
"line_item_total": 17.49,
"line_item_tax_class": "Class A",
"line_item_subtotal_tax": 0,
"line_item_total_tax": 0
}
]
}'