$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "currentProducts": [
< {
< "id": 1001,
< "title": "Trail Jacket",
< "handle": "trail-jacket",
< "variants": [
< {
< "id": 2001,
< "product_id": 1001,
< "title": "Blue / S",
< "sku": "TJ-BLU-S",
< "image_id": 3001
< },
< {
< "id": 2002,
< "product_id": 1001,
< "title": "Blue / M",
< "sku": "TJ-BLU-S",
< "image_id": 3999
< }
< ],
< "images": [
< {
< "id": 3001,
< "product_id": 1001,
< "src": "https://cdn.example.com/trail-jacket-blue.jpg",
< "alt": "",
< "variant_ids": [
< 2001
< ]
< }
< ]
< }
< ],
< "baselineProducts": [
< {
< "id": 1001,
< "title": "Trail Jacket",
< "handle": "trail-jacket",
< "variants": [
< {
< "id": 2001,
< "product_id": 1001,
< "title": "Blue / S",
< "sku": "TJ-BLU-S",
< "image_id": 3001
< },
< {
< "id": 2002,
< "product_id": 1001,
< "title": "Blue / M",
< "sku": "TJ-BLU-M",
< "image_id": 3002
< }
< ],
< "images": [
< {
< "id": 3001,
< "product_id": 1001,
< "src": "https://cdn.example.com/trail-jacket-blue.jpg",
< "alt": "Blue trail jacket, front view",
< "variant_ids": [
< 2001
< ]
< },
< {
< "id": 3002,
< "product_id": 1001,
< "src": "https://cdn.example.com/trail-jacket-blue-m.jpg",
< "alt": "Blue trail jacket, size M",
< "variant_ids": [
< 2002
< ]
< }
< ]
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/practical_ai_lab_jp~pal-shopify-variant-image-association-audit/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'