curl -X PUT https://api2.ecomailapp.cz/tracker/transaction/transaction_1234 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"order_id": "transaction_1234",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1500,
"tax": 200,
"shipping": 100,
"city": "Praha",
"timestamp": 1441905935,
"status": "completed"
},
"transaction_items": [
{
"code": "product code",
"title": "product name",
"categories": ["my category 1", "my category 2"],
"price": 1500,
"amount": 1,
"tags": ["M", "3+", "puzzle"]
}
]
}'
$orderId = 'transaction_1234';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/tracker/transaction/{$orderId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction' => [
'order_id' => 'transaction_1234',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1500,
'tax' => 200,
'shipping' => 100,
'city' => 'Praha',
'timestamp' => 1441905935,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code',
'title' => 'product name',
'categories' => ['my category 1', 'my category 2'],
'price' => 1500,
'amount' => 1,
'tags' => ['M', '3+', 'puzzle'],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{}
Transactions
Update a transaction
Overwrite an existing transaction with new data.
PUT
/
tracker
/
transaction
/
{order_id}
curl -X PUT https://api2.ecomailapp.cz/tracker/transaction/transaction_1234 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"order_id": "transaction_1234",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1500,
"tax": 200,
"shipping": 100,
"city": "Praha",
"timestamp": 1441905935,
"status": "completed"
},
"transaction_items": [
{
"code": "product code",
"title": "product name",
"categories": ["my category 1", "my category 2"],
"price": 1500,
"amount": 1,
"tags": ["M", "3+", "puzzle"]
}
]
}'
$orderId = 'transaction_1234';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/tracker/transaction/{$orderId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction' => [
'order_id' => 'transaction_1234',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1500,
'tax' => 200,
'shipping' => 100,
'city' => 'Praha',
'timestamp' => 1441905935,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code',
'title' => 'product name',
'categories' => ['my category 1', 'my category 2'],
'price' => 1500,
'amount' => 1,
'tags' => ['M', '3+', 'puzzle'],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{}
This endpoint overwrites the entire order with the new data from the request.
Timestamps are saved and returned in UTC+0.
Transaction details. Same structure as the Create a transaction endpoint.
Show transaction properties
Show transaction properties
Array of transaction items. Same structure as the Create a transaction endpoint.
curl -X PUT https://api2.ecomailapp.cz/tracker/transaction/transaction_1234 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"order_id": "transaction_1234",
"email": "foo@bar.cz",
"shop": "myshop.cz",
"amount": 1500,
"tax": 200,
"shipping": 100,
"city": "Praha",
"timestamp": 1441905935,
"status": "completed"
},
"transaction_items": [
{
"code": "product code",
"title": "product name",
"categories": ["my category 1", "my category 2"],
"price": 1500,
"amount": 1,
"tags": ["M", "3+", "puzzle"]
}
]
}'
$orderId = 'transaction_1234';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/tracker/transaction/{$orderId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'transaction' => [
'order_id' => 'transaction_1234',
'email' => 'foo@bar.cz',
'shop' => 'myshop.cz',
'amount' => 1500,
'tax' => 200,
'shipping' => 100,
'city' => 'Praha',
'timestamp' => 1441905935,
'status' => 'completed',
],
'transaction_items' => [
[
'code' => 'product code',
'title' => 'product name',
'categories' => ['my category 1', 'my category 2'],
'price' => 1500,
'amount' => 1,
'tags' => ['M', '3+', 'puzzle'],
],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{}