$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "cartsFile": {
< "format": "json",
< "content": "[{\"cart_id\": \"DEMO-1\", \"currency\": \"USD\", \"items\": [{\"sku\": \"A\", \"quantity\": 1, \"unit_price\": \"100.00\"}]}]"
< },
< "productCostsFile": {
< "format": "json",
< "content": "[{\"sku\": \"A\", \"currency\": \"USD\", \"unit_cost\": \"60.00\"}]"
< },
< "promotionRules": [
< {
< "id": "TENPCT",
< "type": "percent",
< "scope": "cart",
< "value": "10"
< },
< {
< "id": "TENUSD",
< "type": "fixed",
< "scope": "cart",
< "value": "10"
< },
< {
< "id": "SHIP",
< "type": "free_shipping"
< }
< ],
< "rulePriority": [
< "TENPCT",
< "TENUSD",
< "SHIP"
< ],
< "scenarios": [
< [
< "TENPCT",
< "TENUSD"
< ],
< [
< "TENPCT",
< "TENUSD",
< "SHIP"
< ]
< ],
< "shippingInputs": {
< "DEMO-1": {
< "revenue": "10",
< "cost": "7",
< "variable_cost": "3"
< }
< },
< "roundingPolicy": {
< "mode": "HALF_UP",
< "decimals": 2
< },
< "marginThreshold": {
< "type": "amount",
< "value": "25"
< },
< "maxScenarios": 100
<}
<EOF
$curl "https://api.apify.com/v2/actors/afkdigital~newapi90-promotion-stacking-simulator/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'