Order History API
Last updated
Last updated
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.
Log into your engage account
Go to Data Platform > Integrations and select the Order History API
Follow the instructions to get started
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.
POST
https://api.zubi.ai/e/data/orders
This endpoint allows you to upload your orders to engage. Both historical orders dating back the last 2 years, and new orders can be sent through this endpoint. Sending two orders with identical order_id will overwrite the first record.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
city*
string
"New York"
completion_date_gmt
string
Check the accepted date formats below
country*
string
"US" or "USA" or "United States"
currency*
string
"USD"
date_created_gmt*
string
Check the accepted date formats below
date_modified_gmt*
string
Check the accepted date formats below
email*
string
first_name
string
"John"
last_name
string
"Doe"
order_id*
integer
10021
phone
string
"+46 123 456 789"
status*
string
"completed"
order_value*
number
76.99
zip_code
string
"10800"
line_items*
object
[ { "line_item_product_id": 1002, [required] "line_item_price": 17.49, [required] "line_item_quantity": 1 [required] "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 }, ... ]
Authorization*
string
"Bearer eyJhbGciOiJIUzI1NiIssdzNCw..." Log in to retrieve your user token.
Format
Example
YYYY-MM-DD HH:MM:SS+HH:MM
2020-01-01 04:23:01+04:00
YYYY-MM-DD HH:MM:SS.ffffff
2020-01-01 04:23:01.000384
YYYY-MM-DD HH:MM:SS
2020-01-01 04:23:01
YYYY-MM-DDTHH:MM:SS+HH:MM
2020-01-01T04:23:01+04:00
YYYY-MM-DDTHH:MM:SS.ffffff
2020-01-01T04:23:01.000384
YYYY-MM-DDTHH:MM:SS
2020-01-01T04:23:01