$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "beforeSnapshot": {
< "products": [
< {
< "id": 1001,
< "handle": "trail-bottle",
< "title": "Trail Bottle",
< "vendor": "Northline",
< "product_type": "Drinkware",
< "tags": "outdoor, steel",
< "variants": [
< {
< "id": 5001,
< "sku": "TB-500",
< "title": "500 ml",
< "price": "24.00",
< "available": true
< },
< {
< "id": 5002,
< "sku": "TB-750",
< "title": "750 ml",
< "price": "28.00",
< "available": true
< }
< ]
< },
< {
< "id": 1002,
< "handle": "camp-mug",
< "title": "Camp Mug",
< "vendor": "Northline",
< "product_type": "Drinkware",
< "tags": "outdoor",
< "variants": [
< {
< "id": 5003,
< "sku": "CM-1",
< "title": "Default",
< "price": "12.00",
< "available": true
< }
< ]
< }
< ]
< },
< "afterSnapshot": {
< "products": [
< {
< "id": 1001,
< "handle": "trail-bottle",
< "title": "Trail Bottle",
< "vendor": "Northline Outdoors",
< "product_type": "Drinkware",
< "tags": "outdoor, steel, bestseller",
< "variants": [
< {
< "id": 5001,
< "sku": "TB-500",
< "title": "500 ml",
< "price": "26.00",
< "available": true
< },
< {
< "id": 5004,
< "sku": "TB-1000",
< "title": "1 L",
< "price": "32.00",
< "available": false
< }
< ]
< },
< {
< "id": 1003,
< "handle": "camp-stove",
< "title": "Camp Stove",
< "vendor": "Northline Outdoors",
< "product_type": "Cooking",
< "tags": "outdoor",
< "variants": [
< {
< "id": 5005,
< "sku": "CS-1",
< "title": "Default",
< "price": "59.00",
< "available": true
< }
< ]
< }
< ]
< }
<}
<EOF
$curl "https://api.apify.com/v2/actors/practical_ai_lab_jp~pal-shopify-store-catalog-diff/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'