Conversions
Track a sale
Record an idempotent server-side sale with direct or deferred attribution.
POST
Track a sale
Use this endpoint from a trusted server after a paid order, subscription,
renewal, or other revenue event.
Authentication and permission
Send a secretbiqli_... workspace API key with Conversions: Write
(conversions.create). The key selects the workspace. Never expose it in
browser code and never send a workspace ID.
Direct sale request
PassclickId when the checkout or order still carries the Biqli bq_id.
Amounts are integers in the currency’s minor unit, so $54.99 is 5499 for
usd.
Deferred sale request
After a lead has established customer attribution, you may omitclickId.
Biqli first uses the named lead when leadEventName is present, then the
customer attribution selected by the workspace’s first-click or last-click
model.
Idempotency
Use a stableinvoiceId and paymentProcessor for durable financial-event
deduplication. Also send Idempotency-Key for safe transport retries. An exact
replay returns the original 201 response and the
Idempotency-Replayed: true header without repeating side effects.
Reusing an invoice, event, or idempotency identifier with different data
returns 409 idempotency_conflict.
Response
The response includes the same event, click, link, customer, and request fields as a lead, plus normalized sale data:amountUsd is an integer in USD cents. A non-USD request requires a current
exchange rate; otherwise the API returns 422 currency_unavailable.
Errors
Read Track a lead for customer
attribution setup and Authentication for
API-key rotation and least-privilege access.
Authorizations
A workspace API key beginning with biqli_.
Headers
Stable retry key. Reuse only for the same logical request and payload.
Required string length:
1 - 255Integration name recorded in API diagnostics.
Maximum string length:
64Integration version recorded in API diagnostics.
Maximum string length:
64Caller-generated request identifier for tracing.
Required string length:
1 - 100Pattern:
^[A-Za-z0-9._:-]+$Body
application/json
Required string length:
1 - 100Amount in the currency's minor unit.
Required range:
0 <= x <= 9007199254740991Required string length:
1 - 100Pattern:
^[A-Za-z0-9_-]+$Pattern:
^[a-z]{3}$Required string length:
1 - 255Maximum string length:
32Pattern:
^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$Required string length:
1 - 255Required string length:
1 - 255Maximum string length:
255Maximum string length:
254Maximum string length:
2048Pattern:
^https?://Required string length:
1 - 100Pattern:
^[A-Za-z0-9](?:[A-Za-z0-9._:-]*[A-Za-z0-9])?$Pattern:
Z$
