# (optional) discover sourcing-catalog products
curl -s "https://api.platformdtc.com/api/v1/agent/v1/catalog/search?search=serum&price_max=40&limit=10" \
-H "X-Agent-Key: sq_agt_xxx" | jq '.data.items[].id'
# create (up to 200 products / 2,000 variants per call) — only after the merchant agreed
curl -s -X POST https://api.platformdtc.com/api/v1/agent/v1/products/bulk \
-H "X-Agent-Key: sq_agt_xxx" -H "X-Store-ID: <store_id>" -H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"approved_apply": true,
"products": [
{"title":"Vitamin-C Serum","price":"29.99","status":"active",
"variants":[{"sku":"VCS-30","inventory_quantity":120}]},
{"title":"Merino Crew Tee","status":"active","options":["Size","Color"],
"description":"<p>Soft, warm, never itchy.</p>",
"images":["https://cdn.example.com/tee-black.jpg"],
"variants":[
{"option1":"S","option2":"Black","price":"29.00","sku":"MCT-S-BLK","inventory_quantity":10},
{"option1":"M","option2":"Black","price":"29.00","sku":"MCT-M-BLK","inventory_quantity":12}
]}
]
}' | jq '.data'
# { "created_count": 2, "updated_count": 0, "failed_count": 0,
# "results": [ {"index":0,"status":"created","product_id":"…"}, … ] }