API Reference

Grab your User Token here.

post
Post Orders

https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders
This endpoint allows you to upload your orders to engage. Both historical orders dating back the last 5 years, and new orders can be sent through this endpoint. Sending to orders with identical order_id will overwrite the record.
Request
Response
Request
Headers
Authorization
required
string
"Bearer eyJhbGciOiJIUzI1NiIssdzNCw..." Log in to retrieve your user token.
Query Parameters
city
required
string
"New York"
completion_date_gmt
optional
string
Check the accepted date formats below
country
required
string
"US" or "USA" or "United States"
currency
required
string
"USD"
date_created_gmt
required
string
Check the accepted date formats below
date_modified_gmt
optional
string
Check the accepted date formats below
email
required
string
"me@my-store.com"
first_name
optional
string
"John"
last_name
optional
string
"Doe"
order_id
required
integer
10021
phone
optional
string
"+46 123 456 789"
status
required
string
"completed"
order_value
required
number
76.99
zip_code
optional
string
"10800"
line_items
required
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 }, ... ]
Response
200: OK
Cake successfully retrieved.
Order successfully added
400: Bad Request
Order upload failed

Example call

cURL
Javascript - jQuery
Javascript - Fetch
Nodejs - Axios
PHP - cURL
Python
cURL
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
}
]
}'
Javascript - jQuery
var settings = {
"url": "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer [ADD YOUR USER TOKEN HERE]",
"Content-Type": "application/json"
},
"data": JSON.stringify({"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":20200102,"status":"completed","order_value":40,"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}]}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Javascript - Fetch
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer [ADD YOUR USER TOKEN HERE]");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"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":20200102,"status":"completed","order_value":40,"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}]});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Nodejs - Axios
var axios = require('axios');
var data = JSON.stringify({"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":20200102,"status":"completed","order_value":40,"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}]});
var config = {
method: 'post',
url: 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders',
headers: {
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
PHP - cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\"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\": 20200102,\"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 } ] }",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer [ADD YOUR USER TOKEN HERE]",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python
import requests
import json
url = "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders"
order = {
"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": 20200102,
"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
}
]
}
payload = json.dumps(order)
headers = {
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))

post
Post Products

https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog
Upload your product catalog to engage. Note that only base products are supported at the moment, no need to add variants. Send one product per call. Sending two identical product_ids will overwrite the product.
Request
Response
Request
Headers
Authorization
optional
string
"Bearer eyJhbGciOiJIUzI1NiIssdzNCw..." Log in to retrieve your user token.
Query Parameters
average_rating
optional
number
3.0
categories
optional
string
"Category A, Category B"
currency
required
string
"USD"
description
optional
string
"A product description"
image
required
string
URL to a main product image
image2
optional
string
URL to a secondary product image
link
required
string
URL to product page
name
required
string
The product name / title
on_sale
optional
boolean
True / False
product_id
required
integer
100078
price
required
number
79.99
rating_count
optional
number
7
sku
optional
string
"ME3452"
Response
200: OK
Catalog successfully updated
400: Bad Request
Catalog upload failed

Only base products are required to be uploaded as part of the product catalog. Product variants are currently not supported.

Example call

cURL
Javascript - jQuery
Javascript - Fetch
Nodejs - Axios
PHP - cURL
Python
cURL
curl --location --request POST 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog'
--header 'Authorization: Bearer [ADD YOUR USER TOKEN HERE]' \
--header 'Content-Type: application/json'
--data-raw '{
"currency": "USD",
"image": "https://some-image-url.com",
"link": "https://a-link-to-the-product.com",
"product_id": 20200101,
"name": "My new product",
"price": 29.99,
}'
Javascript - jQuery
var settings = {
"url": "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer [ADD YOUR USER TOKEN HERE]",
"Content-Type": "application/json"
},
"data": JSON.stringify({"currency":"USD","image":"https://some-image-url.com","link":"https://a-link-to-the-product.com","product_id":20200101,"name":"My new product","price":29.99}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Javascript - Fetch
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer [ADD YOUR USER TOKEN HERE]");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"currency":"USD","image":"https://some-image-url.com","link":"https://a-link-to-the-product.com","product_id":20200101,"name":"My new product","price":29.99});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Nodejs - Axios
var axios = require('axios');
var data = JSON.stringify({"currency":"USD","image":"https://some-image-url.com","link":"https://a-link-to-the-product.com","product_id":20200101,"name":"My new product","price":29.99});
var config = {
method: 'post',
url: 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog',
headers: {
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
PHP - cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\n \"currency\": \"USD\",\n \"image\": \"https://some-image-url.com\",\n \"link\": \"https://a-link-to-the-product.com\",\n \"product_id\": 20200101,\n \"name\": \"My new product\",\n \"price\": 29.99\n}",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer [ADD YOUR USER TOKEN HERE]",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python
import requests
import json
url = "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/products/catalog"
payload = {
"currency": "USD",
"image": "https://some-image-url.com",
"link": "https://a-link-to-the-product.com",
"product_id": 20200101,
"name": "My new product",
"price": 29.99
}
headers = {
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = json.dumps(payload))
print(response.text.encode('utf8'))

Data types and formats

Learn more about accepted formats here.