$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "events": [
< {
< "name": "purchase",
< "params": {
< "transaction_id": "SYNTHETIC-001",
< "currency": "EUR",
< "value": 25,
< "tax": 5,
< "shipping": 2,
< "items": [
< {
< "item_id": "SKU-01",
< "price": 10,
< "quantity": 2
< },
< {
< "item_name": "Blue mug",
< "price": 5
< }
< ]
< }
< },
< {
< "name": "purchase",
< "params": {
< "transaction_id": "SYNTHETIC-002",
< "currency": "EUR",
< "value": 32,
< "tax": 5,
< "shipping": 2,
< "items": [
< {
< "item_id": "SKU-01",
< "price": 10,
< "quantity": 2
< },
< {
< "item_name": "Blue mug",
< "price": 5
< }
< ]
< }
< },
< {
< "name": "add_to_cart",
< "params": {
< "value": 1,
< "items": [
< {
< "item_id": "SKU-01",
< "price": 1,
< "quantity": 1
< }
< ]
< }
< },
< {
< "name": "refund",
< "params": {
< "transaction_id": "OUTSIDE-THIS-SYNTHETIC-SAMPLE",
< "value": 5,
< "currency": "EUR"
< }
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/danielmichalek~ga4-ecommerce-event-auditor/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'