Developer
Affiliate
POST
/api/affiliate/conversions
Token + HMAC
Record a conversion (S2S)
Record an attributed sale from an external store.
The request body is signed with the program's S2S secret: X-LP-Signature: hex(hmac_sha256(raw_body, secret)), X-LP-Program: <id>. Idempotent on external_id — replaying a sale is a safe no-op.
Rate limited.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
external_id
string
required
|
Your store's unique id for the sale (idempotency key). max: 255 |
|
amount_cents
integer
required
|
The sale value in minor units (e.g. pence). min: 0 |
|
ref
string
optional
|
The affiliate's referral code that drove the sale (required unless `coupon` is sent). |
|
coupon
string
optional
|
The affiliate's coupon code, if the buyer used one instead of a link (required unless `ref` is sent). |
|
currency
string
optional
|
ISO-4217 code (default GBP). |
|
kind
string
optional
|
"initial" (default) or "renewal". one of: initial, renewal, refund |
|
customer_ref
string
optional
|
Your opaque id for the buyer (optional). max: 255 |
|
occurred_at
string · date
optional
|
— |
Responses
201
{ "success": true, "recorded": true, "conversion_id": 4821 }
401
{ "success": false, "message": "Invalid signature" }
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
curl -X POST https://landing.pivotal.digital/api/affiliate/conversions \
-H "X-LP-Program: 5" -H "X-LP-Signature: $SIG" -H "Content-Type: application/json" -d "$BODY"
response
{ "success": true, "recorded": true, "conversion_id": 4821 }
{ "success": false, "message": "Invalid signature" }
Landing Platform