curl -X POST https://api2.ecomailapp.cz/tracker/transaction-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_data": [
{
"transaction": {
"order_id": "transaction_1001",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1000,
"timestamp": 1673342224,
"status": "completed"
},
"transaction_items": [
{
"code": "product code 1",
"title": "product name 1",
"price": 400,
"amount": "1"
}
]
}
]
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/tracker/transaction-bulk');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction_data' => [
[
'transaction' => [
'order_id' => 'transaction_1001',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1000,
'timestamp' => 1673342224,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code 1',
'title' => 'product name 1',
'price' => 400,
'amount' => '1',
],
],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"inserts": 2
}
Transactions
Create bulk transactions
Create multiple transactions in a single request.
POST
/
tracker
/
transaction-bulk
curl -X POST https://api2.ecomailapp.cz/tracker/transaction-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_data": [
{
"transaction": {
"order_id": "transaction_1001",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1000,
"timestamp": 1673342224,
"status": "completed"
},
"transaction_items": [
{
"code": "product code 1",
"title": "product name 1",
"price": 400,
"amount": "1"
}
]
}
]
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/tracker/transaction-bulk');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction_data' => [
[
'transaction' => [
'order_id' => 'transaction_1001',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1000,
'timestamp' => 1673342224,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code 1',
'title' => 'product name 1',
'price' => 400,
'amount' => '1',
],
],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"inserts": 2
}
Limited to 1000 transactions per request. Bulk imports do not trigger automations with the “Makes an order” trigger.
Timestamps are saved and returned in UTC+0.
array
required
Array of transaction objects, each containing a
transaction and transaction_items object with the same structure as the single create endpoint.Show transaction_data item properties
Show transaction_data item properties
object
required
Transaction details. See Create a transaction for all available properties.
array
required
Array of transaction items. See Create a transaction for all available properties.
curl -X POST https://api2.ecomailapp.cz/tracker/transaction-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_data": [
{
"transaction": {
"order_id": "transaction_1001",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1000,
"timestamp": 1673342224,
"status": "completed"
},
"transaction_items": [
{
"code": "product code 1",
"title": "product name 1",
"price": 400,
"amount": "1"
}
]
}
]
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/tracker/transaction-bulk');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction_data' => [
[
'transaction' => [
'order_id' => 'transaction_1001',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1000,
'timestamp' => 1673342224,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code 1',
'title' => 'product name 1',
'price' => 400,
'amount' => '1',
],
],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"inserts": 2
}
⌘I