Loading...
Loading...
Generate a Syndicate Links merchant test link and fire a synthetic test conversion using the shipped merchant test-link API. Avoids draft-only sandbox endpoints and avoids touching real affiliate payouts.
npx skill4agent add cmcgrabby-hue/attribution-skills syndicate-test-conversionPOST https://api.syndicatelinks.co/merchant/test-links
POST https://api.syndicatelinks.co/merchant/test-links/:code/fire-conversionisTestTOKENtest -n "${TOKEN:-}" || { echo "Set TOKEN to your Syndicate Links merchant key first"; exit 1; }curl -sS -X POST https://api.syndicatelinks.co/merchant/test-links \
-H "Authorization: Bearer ${MERCHANT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"productId": "product_uuid",
"programId": "program_uuid"
}' | python3 -m json.toolprogramId{
"trackingLink": {
"id": "...",
"code": "abc123xy",
"clickUrl": "https://api.syndicatelinks.co/click/abc123xy",
"destinationUrl": "https://merchant.example/product",
"productId": "...",
"programId": "...",
"affiliateId": "..."
},
"affiliate": {
"id": "...",
"name": "Merchant Name Internal Test",
"isInternalTest": true
}
}trackingLink.codeTRACKING_CODE="abc123xy"
ORDER_ID="test-$(date +%s)"
curl -sS -X POST "https://api.syndicatelinks.co/merchant/test-links/$TRACKING_CODE/fire-conversion" \
-H "Authorization: Bearer ${MERCHANT_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"saleAmount\": 99.99, \"orderId\": \"$ORDER_ID\"}" | python3 -m json.tooleventtype: "conversion"orderIdsaleAmountcommissionAmountcommissionStatus: "approved"curl -sS -X POST https://api.syndicatelinks.co/merchant/conversions \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"trackingCode": "real_tracking_code",
"orderId": "real_order_id",
"saleAmount": 99.99,
"currency": "USD"
}' | python3 -m json.tool#!/usr/bin/env bash
set -euo pipefail
PRODUCT_ID="${1:?Usage: $0 <product_uuid> [program_uuid]}"
PROGRAM_ID="${2:-}"
export PRODUCT_ID PROGRAM_ID
BODY=$(python3 - <<'PY'
import json, os
body = {"productId": os.environ["PRODUCT_ID"]}
program_id = os.environ.get("PROGRAM_ID")
if program_id:
body["programId"] = program_id
print(json.dumps(body))
PY
)
LINK_RESPONSE=$(curl -sS -X POST https://api.syndicatelinks.co/merchant/test-links \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d "$BODY")
CODE=$(printf '%s' "$LINK_RESPONSE" | python3 -c 'import json,sys; print(json.load(sys.stdin)["trackingLink"]["code"])')
ORDER_ID="test-$(date +%s)"
curl -sS -X POST "https://api.syndicatelinks.co/merchant/test-links/$CODE/fire-conversion" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"saleAmount\":99.99,\"orderId\":\"$ORDER_ID\"}" | python3 -m json.tool/merchant/test-links/:code/fire-conversionPOST /merchant/test-links