Conversions and Product catalog v2.0

Commanders Act Data API v2.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
It is highly recommended that you send multiple objects in one HTTP request. This API allows streaming using newline separated JSON format or ndjson (http://ndjson.org/)

Rate-limits

  • You may send up to 30 requests per second
  • You may have up to 30 concurrent connections
  • If you send many conversions/products/etc. in bulk, the upload speed will be limited to 30 conversions/products/etc. per second

Rate limiting examples

  • If you send 1 conversion per request you will be limited to 30 requests per second
  • If you send 90 conversions in one request your upload will be completed in about 3 seconds
  • If you send 40 requests, each with one conversion in the same second, 30 of them will be processed and 10 of them will be rejected
  • If you send 3 requests, each with 100 conversions they will be completed in 10 seconds

Date formats

Use the long format with timezone for passing ISO-8601 dates. The following formats are accepted:
  • "2019-04-29T13:47:47.315Z"
  • "2019-04-29T13:47:47Z"
  • "2019-04-29T13:47:47.315+02:00"
  • "2019-04-29T13:47:47+02:00"

Errors

Errors are always returned as an array of objects in the top-level "errors" property.

Errors in bulk operations

For bulk operations you may have "errors" and "data" properties at the same time since some objects may have errors while others may not. Bulk errors are aggregated which means there won't be an error for each instance of an error but one error for each type of error with the number of occurrences and some examples of line numbers or ids.
1
{
2
"errors": [
3
{
4
"code": "YOU_CAN_CHECK_THIS_IN_CODE",
5
"detail": "This explains the error",
6
"meta": {
7
"context_property_example": "value_example",
8
"error_count": 3,
9
"line_numbers": [34, 45],
10
"ids": [
11
"c9017b85-8016-4f13-88b4-18d57c67b866",
12
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
13
]
14
}
15
}
16
]
17
"data": {
18
"accepted_object_count": 4,
19
"rejected_object_count": 3
20
}
21
}
Copied!

Error object

Error objects have the following properties
Property
Type
Required
Description
code
string
true
Always present and contains error code that can be checked programmatically
detail
string
true
Human readable message that explains the problem. You should not check the value of this property programmatically because it may change
meta
object
false
Error specific object that contains details about what generated the error
Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer Token will be provided by our support/consulting team

Default

Upsert conversions

Code samples
1
POST https://api.commander1.com/v2/{siteId}/conversions/bulk HTTP/1.1
2
Host: api.commander1.com
3
Content-Type: application/x-ndjson
4
Accept: application/json
5
Authorization: Bearer NJtcKaoCYu...mGZDxRgMBMUw==
6
Copied!
POST /conversions/bulk
This endpoint creates and updates conversions. Your request will be processed asynchronously. It can take up to 24 hours until the request is processed and updates are made in the database.
Body parameter
1
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","user":{"user_email":"[email protected]"},"type":"offline","status":"in_progress","created":"2018-01-01T20:00:00.000+01:00","updated":"2018-01-01T20:00:00.000+01:00","acknowledged":true,"currency":"EUR","comment":"Package needs to be smaller than 30cm by 30cm","billing_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"contact_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_provider":"UPS","shipping_tracking_code":"702c7a16-2c3d-4946-bb35-69ba540773f6","payment_method":"card","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"shipping_amount":0,"discount_amount":0,"tax_amount":5,"final_amount":10,"custom":{"internal_reference":"fa34dc2","referer":"[email protected]","website_version":"2.4"},"conversion_items":[{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}},{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}}]}
2
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","user":{"user_email":"[email protected]"},"type":"offline","status":"in_progress","created":"2018-01-01T20:00:00.000+01:00","updated":"2018-01-01T20:00:00.000+01:00","acknowledged":true,"currency":"EUR","comment":"Package needs to be smaller than 30cm by 30cm","billing_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"contact_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_provider":"UPS","shipping_tracking_code":"702c7a16-2c3d-4946-bb35-69ba540773f6","payment_method":"card","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"shipping_amount":0,"discount_amount":0,"tax_amount":5,"final_amount":10,"custom":{"internal_reference":"fa34dc2","referer":"[email protected]","website_version":"2.4"},"conversion_items":[{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}},{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}}]}
3
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","user":{"user_email":"[email protected]"},"type":"offline","status":"in_progress","created":"2018-01-01T20:00:00.000+01:00","updated":"2018-01-01T20:00:00.000+01:00","acknowledged":true,"currency":"EUR","comment":"Package needs to be smaller than 30cm by 30cm","billing_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"contact_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_address":{"country":"France","iso_country_code":"FR","country_code":"FRA","region":"Ile-de-France","locality":"Paris","postal_code":"75009","recipient":"Commanders Act","street_address":"3-5 Rue Saint-Georges","full_address":null,"label":"home","coordinates":{"latitude":48.857764,"longitude":2.33935}},"shipping_provider":"UPS","shipping_tracking_code":"702c7a16-2c3d-4946-bb35-69ba540773f6","payment_method":"card","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"shipping_amount":0,"discount_amount":0,"tax_amount":5,"final_amount":10,"custom":{"internal_reference":"fa34dc2","referer":"[email protected]","website_version":"2.4"},"conversion_items":[{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}},{"id":"68cd1310-4b7a-454c-99fb-2510f0e156ec","original_quantity":3,"cancelled_quantity":1,"returned_quantity":1,"exchanged_quantity":0,"final_quantity":1,"original_amount":30,"cancelled_amount":10,"returned_amount":10,"exchanged_amount":0,"final_amount":10,"price":10,"original_item":true,"custom":{"remarketing_campaign":"christmas_2018","time_to_checkout":"25 minutes","ab_testing_group":"3245fcda"},"product":{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}}]}
Copied!

Parameters

Name
In
Type
Required
Description
Authorization
header
string
true
Authorization token
body
body
true
Conversions as newline delimited JSON strings
Example responses
202 Response
1
{
2
"data": {
3
"accepted_object_count": 4,
4
"rejected_object_count": 0
5
}
6
}
Copied!
400 Cannot parse nd-json line
1
{
2
"errors": [
3
{
4
"code": "PARSE_ERROR",
5
"detail": "Cannot parse nd-json"
6
}
7
],
8
"data": {}
9
}
Copied!
400 Missing required property
1
{
2
"errors": [
3
{
4
"code": "MISSING_REQUIRED_PROPERTY",
5
"detail": "should have required property 'id'\n",
6
"meta": {
7
"line_numbers": [
8
34,
9
45
10
],
11
"error_count": 2,
12
"ids": [
13
"c9017b85-8016-4f13-88b4-18d57c67b866",
14
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
15
]
16
}
17
}
18
],
19
"data": {
20
"accepted_object_count": 4,
21
"rejected_object_count": 2
22
}
23
}
Copied!
400 Invalid property type
1
{
2
"errors": [
3
{
4
"code": "INVALID_PROPERTY_TYPE",
5
"detail": "\"original_amount\" property is not a number",
6
"meta": {
7
"property": "original_amount",
8
"line_numbers": [
9
34,
10
45
11
],
12
"error_count": 2,
13
"ids": [
14
"c9017b85-8016-4f13-88b4-18d57c67b866",
15
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
16
]
17
}
18
}
19
],
20
"data": {
21
"accepted_object_count": 4,
22
"rejected_object_count": 2
23
}
24
}
Copied!
400 Invalid property format
1
{
2
"errors": [
3
{
4
"code": "INVALID_PROPERTY_FORMAT",
5
"detail": "\"original_amount\" property is not a number",
6
"meta": {
7
"property": "original_amount",
8
"line_numbers": [
9
34,
10
45
11
],
12
"error_count": 2,
13
"ids": [
14
"c9017b85-8016-4f13-88b4-18d57c67b866",
15
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
16
]
17
}
18
}
19
],
20
"data": {
21
"accepted_object_count": 4,
22
"rejected_object_count": 2
23
}
24
}
Copied!
401 Authorization header is missing
1
{
2
"errors": [
3
{
4
"code": "MISSING_AUTHORIZATION_HEADER",
5
"detail": "The \"Authorization\" header is required"
6
}
7
]
8
}
Copied!
401 Token type is missing
1
{
2
"errors": [
3
{
4
"code": "UNKNOWN_TOKEN_TYPE",
5
"detail": "The token type is missing"
6
}
7
]
8
}
Copied!
401 The token type is invalid
1
{
2
"errors": [
3
{
4
"code": "INVALID_TOKEN_TYPE",
5
"detail": "The token type \"Bear\" is invalid. Expecting \"Bearer\" instead"
6
}
7
]
8
}
Copied!
401 The provided token is unknown
1
{
2
"errors": [
3
{
4
"code": "UNKNOWN_TOKEN",
5
"detail": "The provided token is unknown. Please contact our support team [email protected]"
6
}
7
]
8
}
Copied!
403 Response
1
{
2
"errors": [
3
{
4
"code": "SITE_ACCESS_FORBIDDEN",
5
"detail": "You cannot access this site"
6
}
7
]
8
}
Copied!
Too Many Requests
1
{
2
"description": "You have too many open connections",
3
"errors": [
4
{
5
"code": "CONNECTION_LIMIT_REACHED",
6
"detail": "Your account is limited to 30 simultaneous connections"
7
}
8
]
9
}
Copied!
1
{
2
"description": "You have reached the request limit",
3
"errors": [
4
{
5
"code": "REQUEST_LIMIT_REACHED",
6
"detail": "Your account is limited to 30 requests per second"
7
}
8
]
9
}
Copied!
500 Response
1
{
2
"errors": [
3
{
4
"code": "SERVER_ERROR",
5
"detail": "An internal error occurred. Please contact our support team [email protected]"
6
}
7
]
8
}
Copied!

Responses

Status
Meaning
Description
Schema
202
Accepted
All objects are accepted for processing
None
400
Cannot process request or part of the request due to client error
None
401
Cannot identify the API caller
None
403
Forbidden
API caller does not have access to this resource
None
429
Too Many Requests
None
500
Internal server error
None

Response Schema

Upsert products

Code samples
1
POST https://api.commander1.com/v2/{siteId}/products/bulk HTTP/1.1
2
Host: api.commander1.com
3
Content-Type: application/x-ndjson
4
5
Authorization: Bearer NJtcKaoCYu...mGZDxRgMBMUw==
6
Copied!
POST /products/bulk
This endpoint creates and updates products. Your request will be processed asynchronously. It can take up to 24 hours until the request is processed and updates are made in the database.
Body parameter
1
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}
2
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}
3
{"id":"db050bb1-810d-4420-a6fb-c1ce472a4ca9","name":"Mug Commanders Act","description":"White stoneware mug with C-Handle is the perfect cup for any beverage","category_1":"Home","category_2":"Kitchen","category_3":"Accessories","category_4":"Containers","category_5":"Mugs","tags":["mugs","handle","white","brand"],"condition":"new","availability":"in_stock","availability_date":"2019-02-06T17:41:31.427+01:00","expiration_date":"2019-02-06T17:41:31.427+01:00","price":10,"sale_price":8,"currency":"EUR","image_link":"https://commandersact.com/images/shopping/mug_hi_res.jpg","link":"https://commandersact.com/shopping/mug","brand":"Commanders Act","width":6.4,"length":7.3,"height":9.5,"weight":80.7,"size":"medium","colors":["white","red"],"gtin":"134588842456789000","mpn":"134588842","custom":{"internal_category_id":721,"warehouse":"building B","box_barcode":1830135586179}}
Copied!

Parameters

Name
In
Type
Required
Description
Authorization
header
string
true
Authorization token
body
body
Product
true
Products as newline delimited JSON strings

Responses

Status
Meaning
Description
Schema
202
Accepted
Accepted
None
207
Multi-Status
None
401
Unauthorized
None
405
Invalid input
None

Schemas

Conversion

1
{
2
"id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
3
"user": {
4
"email": "[email protected]",
5
"consent_categories": [1,3]
6
},
7
"type": "offline",
8
"status": "in_progress",
9
"created": "2018-01-01T20:00:00.000+01:00",
10
"updated": "2018-01-01T20:00:00.000+01:00",
11
"acknowledged": true,
12
"currency": "EUR",
13
"comment": "Package needs to be smaller than 30cm by 30cm",
14
"billing_address": {
15
"country": "France",
16
"iso_country_code": "FR",
17
"country_code": "FRA",
18
"region": "Ile-de-France",
19
"locality": "Paris",
20
"postal_code": "75009",
21
"recipient": "Commanders Act",
22
"street_address": "3-5 Rue Saint-Georges",
23
"full_address": null,
24
"label": "home",
25
"coordinates": {
26
"latitude": 48.857764,
27
"longitude": 2.33935
28
}
29
},
30
"contact_address": {
31
"country": "France",
32
"iso_country_code": "FR",
33
"country_code": "FRA",
34
"region": "Ile-de-France",
35
"locality": "Paris",
36
"postal_code": "75009",
37
"recipient": "Commanders Act",
38
"street_address": "3-5 Rue Saint-Georges",
39
"full_address": null,
40
"label": "home",
41
"coordinates": {
42
"latitude": 48.857764,
43
"longitude": 2.33935
44
}
45
},
46
"shipping_address": {
47
"country": "France",
48
"iso_country_code": "FR",
49
"country_code": "FRA",
50
"region": "Ile-de-France",
51
"locality": "Paris",
52
"postal_code": "75009",
53
"recipient": "Commanders Act",
54
"street_address": "3-5 Rue Saint-Georges",
55
"full_address": null,
56
"label": "home",
57
"coordinates": {
58
"latitude": 48.857764,
59
"longitude": 2.33935
60
}
61
},
62
"shipping_provider": "UPS",
63
"shipping_tracking_code": "702c7a16-2c3d-4946-bb35-69ba540773f6",
64
"payment_method": "card",
65
"original_quantity": 3,
66
"cancelled_quantity": 1,
67
"returned_quantity": 1,
68
"exchanged_quantity": 0,
69
"final_quantity": 1,
70
"original_amount": 30,
71
"cancelled_amount": 10,
72
"returned_amount": 10,
73
"exchanged_amount": 0,
74
"shipping_amount": 0,
75
"discount_amount": 0,
76
"tax_amount": 5,
77
"final_amount": 10,
78
"custom": {
79
"internal_reference": "fa34dc2",
80
"referer": "[email protected]",
81
"website_version": "2.4"
82
},
83
"conversion_items": [
84
{
85
"id": "68cd1310-4b7a-454c-99fb-2510f0e156ec",
86
"original_quantity": 3,
87
"cancelled_quantity": 1,
88
"returned_quantity": 1,
89
"exchanged_quantity": 0,
90
"final_quantity": 1,
91
"original_amount": 30,
92
"cancelled_amount": 10,
93
"returned_amount": 10,
94
"exchanged_amount": 0,
95
"final_amount": 10,
96
"price": 10,
97
"original_item": true,
98
"custom": {
99
"remarketing_campaign": "christmas_2018",
100
"time_to_checkout": "25 minutes",
101
"ab_testing_group": "3245fcda"
102
},
103
"product": {
104
"id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
105
"name": "Mug Commanders Act",
106
"description": "White stoneware mug with C-Handle is the perfect cup for any beverage",
107
"category_1": "Home",
108
"category_2": "Kitchen",
109
"category_3": "Accessories",
110
"category_4": "Containers",
111
"category_5": "Mugs",
112
"tags": [
113
"mugs",
114
"handle",
115
"white",
116
"brand"
117
],
118
"condition": "new",
119
"availability": "in_stock",
120
"availability_date": "2019-02-06T17:41:31.427+01:00",
121
"expiration_date": "2019-02-06T17:41:31.427+01:00",
122
"price": 10,
123
"sale_price": 8,
124
"currency": "EUR",
125
"image_link": "https://commandersact.com/images/shopping/mug_hi_res.jpg",
126
"link": "https://commandersact.com/shopping/mug",
127
"brand": "Commanders Act",
128
"width": 6.4,
129
"length": 7.3,
130
"height": 9.5,
131
"weight": 80.7,
132
"size": "medium",
133
"colors": [
134
"white",
135
"red"
136
],
137
"gtin": "134588842456789000",
138
"mpn": "134588842",
139
"custom": {
140
"internal_category_id": 721,
141
"warehouse": "building B",
142
"box_barcode": 1830135586179
143
}
144
}
145
},
146
{
147
"id": "68cd1310-4b7a-454c-99fb-2510f0e156ec",
148
"original_quantity": 3,
149
"cancelled_quantity": 1,
150
"returned_quantity": 1,
151
"exchanged_quantity": 0,
152
"final_quantity": 1,
153
"original_amount": 30,
154
"cancelled_amount": 10,
155
"returned_amount": 10,
156
"exchanged_amount": 0,
157
"final_amount": 10,
158
"price": 10,
159
"original_item": true,
160
"custom": {
161
"remarketing_campaign": "christmas_2018",
162
"time_to_checkout": "25 minutes",
163
"ab_testing_group": "3245fcda"
164
},
165
"product": {
166
"id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
167
"name": "Mug Commanders Act",
168
"description": "White stoneware mug with C-Handle is the perfect cup for any beverage",
169
"category_1": "Home",
170
"category_2": "Kitchen",
171
"category_3": "Accessories",
172
"category_4": "Containers",
173
"category_5": "Mugs",
174
"tags": [
175
"mugs",
176
"handle",
177
"white",
178
"brand"
179
],
180
"condition": "new",
181
"availability": "in_stock",
182
"availability_date": "2019-02-06T17:41:31.427+01:00",
183
"expiration_date": "2019-02-06T17:41:31.427+01:00",
184
"price": 10,
185
"sale_price": 8,
186
"currency": "EUR",
187
"image_link": "https://commandersact.com/images/shopping/mug_hi_res.jpg",
188
"link": "https://commandersact.com/shopping/mug",
189
"brand": "Commanders Act",
190
"width": 6.4,
191
"length": 7.3,
192
"height": 9.5,
193
"weight": 80.7,
194
"size": "medium",
195
"colors": [
196
"white",
197
"red"
198
],
199
"gtin": "134588842456789000",
200
"mpn": "134588842",
201
"custom": {
202
"internal_category_id": 721,
203
"warehouse": "building B",
204
"box_barcode": 1830135586179
205
}
206
}
207
}
208
]
209
}
210
Copied!
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions

Properties

Name
Type
Required
Restrictions
Description
id
string(1-50)
true
none
Conversion id. Used as key for updates
user
object
true
none
All properties that you add here will be used as conditions for matching users in our database. You must ensure that values used inside these properties are unique. Use same property names as those defined in variables interface for the user.
» user.email
string(1-250)
false
none
Email of the user
»user.consent_categories
string
false
none
Consent categories of the user, to be allowed to share conversions with partners
type
string(1-250)
true
none
Type of conversion (online, offline, call etc.)
status
string
true
none
Status of your conversion (see list of possible values below). Conversions with status "pending" are not included in default sum and counts aggregated on a user.
created
string(ISO-8601)
true
none
Time when conversion occurred. See "Date formats" section above for a list of allowed formats.
updated
string(ISO-8601)
false
none
Time when conversion was updated. See "Date formats" section above for a list of allowed formats.
acknowledged
boolean
false
none
Set to true if conversion was acknowledged
currency
string(ISO-4217)
true
none
Currency
comment
string(1-250)
false
none
Comment of the buyer
billing_address
Address
false
none
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
contact_address
Address
false
none
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
shipping_address
Address
false
none
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
shipping_provider
string(1-250)
false
none
Shipping provider
shipping_tracking_code
string(1-250)
false
none
Shipping tracking code
payment_method
string
false
none
Payment method type (see list of possible values below)
payment_provider
string
false
none
Payment provider used for this transaction
original_quantity
float
false
read-only
Sum of all articles in the original conversion (CALCULATED)
cancelled_quantity
float
false
read-only
Quantity of cancelled articles in the conversion (CALCULATED)
returned_quantity
float
false
read-only
Quantity of returned articles in the conversion (CALCULATED)
exchanged_quantity
float
false
read-only
Quantity of exchanged articles in the conversion (CALCULATED)
final_quantity
float
false
read-only
Quantity of articles in final transaction for this conversion (original_quantity - cancelled_quantity - returned_quantity - exchanged_quantity) (CALCULATED)
original_amount
float
false
write-once
Original amount for this conversion (shipping price and taxes included)
cancelled_amount
float
false
none
Cancelled amount for this conversion
returned_amount
float
false
none
Returned amount for this conversion
exchanged_amount
float
false
none
Exchanged amount for this conversion
shipping_amount
float
false
none
Shipping amount for this conversion
discount_amount
float
false
none
Discount amount for this conversion
tax_amount
float
false
none
Tax amount for this conversion
final_amount
float
false
none
Final amount for this conversion after returns, exchanges, cancellations etc. (shipping price and taxes included). This represents the overall transaction amount between the buyer and the seller
custom
object
false
none
Object containing custom properties
conversion_items
true
none
List of products in the conversion + their own attributes. You cannot have the same product twice inside a conversion unless you provide a conversion item id
Enumerated Values
Property
Value
status
canceled
status
delivered
status
in_progress
status
partially_delivered
status
partially_returned
status
partially_shipped
status
pending_shipment
status
returned
status
shipped
status
pending
payment_method
by_bank_transfer_in_advance
payment_method
by_invoice
payment_method
card
payment_method
check_in_advance
payment_method
cod
payment_method
coupon
payment_method
direct_debit
payment_method
online_payment_system
payment_method
other

ConversionItem

1
{
2
"id": "68cd1310-4b7a-454c-99fb-2510f0e156ec",
3
"original_quantity": 3,
4
"cancelled_quantity": 1,
5
"returned_quantity": 1,
6
"exchanged_quantity": 0,
7
"final_quantity": 1,
8
"original_amount": 30,
9
"cancelled_amount": 10,
10
"returned_amount": 10,
11
"exchanged_amount": 0,
12
"final_amount": 10,
13
"price": 10,
14
"original_item": true,
15
"custom": {
16
"remarketing_campaign": "christmas_2018",
17
"time_to_checkout": "25 minutes",
18
"ab_testing_group": "3245fcda"
19
},
20
"product": {
21
"id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
22
"name": "Mug Commanders Act",
23
"description": "White stoneware mug with C-Handle is the perfect cup for any beverage",
24
"category_1": "Home",
25
"category_2": "Kitchen",
26
"category_3": "Accessories",
27
"category_4": "Containers",
28
"category_5": "Mugs",
29
"tags": [
30
"mugs",
31
"handle",
32
"white",
33
"brand"
34
],
35
"condition": "new",
36
"availability": "in_stock",
37
"availability_date": "2019-02-06T17:41:31.427+01:00",
38
"expiration_date": "2019-02-06T17:41:31.427+01:00",
39
"price": 10,
40
"sale_price": 8,
41
"currency": "EUR",
42
"image_link": "https://commandersact.com/images/shopping/mug_hi_res.jpg",
43
"link": "https://commandersact.com/shopping/mug",
44
"brand": "Commanders Act",
45
"width": 6.4,
46
"length": 7.3,
47
"height": 9.5,
48
"weight": 80.7,
49
"size": "medium",
50
"colors": [
51
"white",
52
"red"
53
],
54
"gtin": "134588842456789000",
55
"mpn": "134588842",
56
"custom": {
57
"internal_category_id": 721,
58
"warehouse": "building B",
59
"box_barcode": 1830135586179
60
}
61
}
62
}
63
Copied!
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions

Properties

Name
Type
Required
Restrictions
Description
id
string
true
none
Id of this item in the conversion. This id is required. If you don't have an item id in your database and the same product id cannot repeat within a conversion you can use the product id as value. This field is used for identifying the item in updates.
original_quantity
float
true
none
Quantity of items in the original conversion
cancelled_quantity
float
false
none
Quantity of cancelled items
returned_quantity
float
false
none
Quantity of returned items
exchanged_quantity
float
false
none
Quantity of exchanged items
final_quantity
float
false
none
Quantity of items in final transaction (original_quantity - cancelled_quantity - returned_quantity - exchanged_quantity)
original_amount
float
false
none
Original amount for this item
cancelled_amount
float
false
none
Cancelled amount for this item
returned_amount
float
false
none
Returned amount for this item
exchanged_amount
float
false
none
Exchanged amount for this item
final_amount
float
false
none
Final amount for this item (original_amount - cancelled_amount - returned_amount - exchanged_amount)
price
float
false
none
Price of item (using same currency as for conversion)
original_item
boolean
false
none
Wether this item was present in the original conversion. This is automatically set to false to all items added in conversion updates
custom
object
false
none
Object containing custom properties
product
Product
true
none
There are three ways to have product information in your conversion items. First method is to put product properties inline for each conversion item. Second method is to synchronize your product catalog with our database using "POST /products/bulk" endpoint and only send product ids in conversion items (our server will copy product properties from catalog). Third method is a combination of previous ones and implies having a product catalog and send the product information inline. In case a property is present in both catalog product and inline product, properties from inline product will overwrite properties from catalog. This method is useful when product information is incomplete or complementary in inline products. It is recommended to send products inline, except when you do not have all product information. In most cases you don't need to use the catalog. It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions. When you only send the id of the product in a conversion item, you need to make sure that your catalog already contains the product, otherwise product properties will not be added to your conversion item.

Address

1
{
2
"country": "France",
3
"iso_country_code": "FR",
4
"country_code": "FRA",
5
"region": "Ile-de-France",
6
"locality": "Paris",
7
"postal_code": "75009",
8
"recipient": "Commanders Act",
9
"street_address": "3-5 Rue Saint-Georges",
10
"full_address": null,
11
"label": "home",
12
"coordinates": {
13
"latitude": 48.857764,
14
"longitude": 2.33935
15
}
16
}
17
Copied!
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions

Properties

Name
Type
Required
Restrictions
Description
country
string(1-250)
false
none
Readable country name
iso_country_code
string(ISO-3166)
false
none
ISO-3166 country code
country_code
string
false
none
Use this field in case you use country codes other than ISO-3166
region
string(1-250)
false
none
Administrative region
locality
string(1-250)
false
none
Name of city/town/village etc.
postal_code
string(1-250)
false
none
Postal code
recipient
string(1-250)
false
none
Recipient name
street_address
string(1-250)
false
none
Street name, street number, building number etc.
full_address
string(1-250)
false
none
Full address as a string that can contain newlines. Not usable in segmentation but available for exports
label
string(1-250)
false
none
Label for this address (home, work etc.)
coordinates
object
false
none
Coordinates for this address
» latitude
float
false
none
Latitude
» longitude
float
false
none
Longitude

Product

1
{
2
"id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
3
"name": "Mug Commanders Act",
4
"description": "White stoneware mug with C-Handle is the perfect cup for any beverage",
5
"category_1": "Home",
6
"category_2": "Kitchen",
7
"category_3": "Accessories",
8
"category_4": "Containers",
9
"category_5": "Mugs",
10
"tags": [
11
"mugs",
12
"handle",
13
"white",
14
"brand"
15
],
16
"condition": "new",
17
"availability": "in_stock",
18
"availability_date": "2019-02-06T17:41:31.427+01:00",
19
"expiration_date": "2019-02-06T17:41:31.427+01:00",
20
"price": 10,
21
"sale_price": 8,
22
"currency": "EUR",
23
"image_link": "https://commandersact.com/images/shopping/mug_hi_res.jpg",
24
"link": "https://commandersact.com/shopping/mug",
25
"brand": "Commanders Act",
26
"width": 6.4,
27
"length": 7.3,
28
"height": 9.5,
29
"weight": 80.7,
30
"size": "medium",
31
"colors": [
32
"white",
33
"red"
34
],
35
"gtin": "134588842456789000",
36
"mpn": "134588842",
37
"custom": {
38
"internal_category_id": 721,
39
"warehouse": "building B",
40
"box_barcode": 1830135586179
41
}
42
}
43
Copied!
There are three ways to have product information in your conversion items. First method is to put product properties inline for each conversion item. Second method is to synchronize your product catalog with our database using "POST /products/bulk" endpoint and only send product ids in conversion items (our server will copy product properties from catalog). Third method is a combination of previous ones and implies having a product catalog and send the product information inline. In case a property is present in both catalog product and inline product, properties from inline product will overwrite properties from catalog. This method is useful when product information is incomplete or complementary in inline products. It is recommended to send products inline, except when you do not have all product information. In most cases you don't need to use the catalog. It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions. When you only send the id of the product in a conversion item, you need to make sure that your catalog already contains the product, otherwise product properties will not be added to your conversion item.

Properties

Name
Type
Required
Restrictions
Description
id
string(1-50)
true
none
Unique identifier for the article (try using the most specific identifier or SKU), such as a reference. If there are several occurrences for the same identifier, only the last one will be recorded
name
string(1-500)
false
none
Name of the article
description
string(max 5000 chars)
false
none
Description of the article
category_1
string(1-250)
false
none
Main category of the article
category_2
string(1-250)
false
none
Second sub-category of the article
category_3
string(1-250)
false
none
Third sub-category of the article
category_4
string(1-250)
false
none
Fourth sub-category of the article
category_5
string(1-250)
false
none
Fifth sub-category of the article. If you have more than five levels of category you may choose to concatenate the remaining ones like 'Bikes/Parts/Wheels/Front' or simply ignore the remaining ones like 'Bikes', depending on your segmentation needs.
tags
[string]
false
none
Array of tags for the product. Tags can be anything that labels the product: hand-made, eco-friendly, heat-resistant etc.
condition
string
false
none
Current status of the material in your store (see list of possible values below)
availability
string
false
none
Current availability of the item in your store. Make sure to indicate the availability of the item on your store page and keep it up to date (see list of possible values below)
availability_date
string(ISO-8601)
false
none
Date when product became or will become available. See "Date formats" section above for a list of allowed formats.
expiration_date
string(ISO-8601)
false
none
Date when product became or will become unavailable. See "Date formats" section above for a list of allowed formats.
price
float
false
none
Default price for the article. In a conversion you can specify the real price at which the item was sold in case of sales, discounts etc.
sale_price
float
false
none
Default price for the article during sales periods. In a conversion you can specify the real price at which the item was sold in case of discounts
currency
string(ISO-4217)
false
none
Currency used for given prices. Note that you have to use the same currency for products and conversions
image_link
string(url)
false
none
URL of product image
link
string(url)
false
none
URL to the website where you can buy the item
brand
string(1-250)
false
none
Brand of the article
width
float
false
none
Width of the article in centimeters (cm)
length
float
false
none
Length of the article in centimeters (cm)
height
float
false
none
Height of the article in centimeters (cm)
weight
float
false
none
Height of the article in centimeters (grams)
size
string(1-250)
false
none
Size of the article when width, height and lengts are not applicable. You can use any value that describes the size. Examples: S, XL, large
colors
[string]
false
none
Colors of product
gender
string(1-250)
false
none
Gender for gender specific products (male, female, unisex)
gtin
string(1-250)
false
none
International trade identification number of the article Supported numbers: UPC (North America, 12 digits), EAN (Europe, 13 digits), JAN (Japan, 8 to 13 digits), ISBN (books, 13 digits)
mpn
string(1-250)
false
none
Manufacturer part number of the material
custom
object
false
none
Object containing custom properties
Enumerated Values
Property
Value
condition
new
condition
refurbished