If you wish to share your data via flat file feed integration, please use a CSV feed format, following the structure below.
The CSV format is based on the comma-separated value. The header must be declared in the first row of the file, it is recommended that headers are provided in the lower case and don't contain spaces.
Files can be uploaded to the Commandersact FTP or downloaded from your own FTP by CommandersAct. Get in touch with your Account Manager to agree the integration method that is best for you.
Use our CSV conversion importer connector to configure the FTP import.
Each line in the file should be a distinct product (conversion item) with their unit price and quantity. Transactions that include several products should be split into multiple lines, sharing the same conversion_id.
Example: conversion_ID_1, conversion_item_1, conversion_ID_1, conversion_item_2, conversion_ID_1, conversion_item_3,
Be sure you are using exactly the same headers as in this example CSV file:
Some columns are required, please check this link to see which fields are required or not.
Please sort your file and group it by conversion ID (all conversion items related to conversion_ID_1 then all conversion items related to conversion_ID_2 etc...)
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 ()
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
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
You can send up to 150 conversion items
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 are always returned as an array of objects in the top-level "errors" property.
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.
Error objects have the following properties
Base URLs:
HTTP Authentication, scheme: bearer Token will be provided by our support/consulting team
Code samples
POST /conversions/bulk
This endpoint creates and updates conversions. Your request will be processed asynchronously. It can take up to 1 hour until the request is processed and updates are made in the database.
Body parameter
The overwrite
url parameter determines how conversions are processed when an existing id
is found:
false
(default):
Only the specified fields will be updated.
Unspecified fields will retain their existing values.
true
:
The existing conversion will be fully replaced with the new data provided.
If you need to replace a conversion entirely, set overwrite=true
.
Example responses
202 Response
400 Cannot parse nd-json line
400 Missing required property
400 Invalid property type
400 Invalid property format
401 Authorization header is missing
401 Token type is missing
401 The token type is invalid
401 The provided token is unknown
403 Response
Too Many Requests
500 Response
Code samples
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
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
Enumerated Values
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
It is recommended to use as many fields as you can in order to be able to build good segments with advanced conditions
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.
Enumerated Values
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
Authorization
header
string
true
Authorization token
overwrite
query
boolean
false
Determines if conversions should be fully replaced (true
) or partially updated (false
- default).
body
body
true
Conversions as newline delimited JSON strings
202
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
API caller does not have access to this resource
None
429
Too Many Requests
None
500
Internal server error
None
Authorization
header
string
true
Authorization token
body
body
true
Products as newline delimited JSON strings
202
Accepted
None
207
Multi-Status
None
401
Unauthorized
None
405
Invalid input
None
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
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
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
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
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
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
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.
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
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
condition
new
condition
refurbished
condition
used
availability
in_stock
availability
available
availability
pre_order
availability
out_of_stock
gender
male
gender
female
gender
unisex
Offline or online conversions
You can send us your conversion's data in 4 ways :
Conversion API (online/offline conversions)
Files importer (FTP) online/offline conversions
HTTP tracking API source (online/offlinepurchase
event)
Web Container (online purchase
event)