Documentation Index
Fetch the complete documentation index at: https://docs.keenpartner.com/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Request
Must be
"create_purchase".The lead to record the purchase against. Your company must have access to this lead’s channel.
Amount of the purchase. Used by percentage reward triggers and stored on the purchase row.
Stored as the purchase name.
Stored as the purchase description.
The date of the purchase. Defaults to the current time if omitted.
If provided, only these specific reward triggers are evaluated and fired. Each trigger must belong to the lead’s channel and have an
"Active" status. If omitted, all active purchase triggers on the lead’s channel fire.Response
Returns the created purchase record.Side effects
- Purchase event: An event record is created with category
purchase, linked to the new purchase. - Reward triggers: If
trigger_idsis provided, only those triggers are evaluated. Otherwise, all activepurchasetriggers on the channel fire. Fixed rewards use the trigger’s configured amount; percentage rewards are calculated from thepurchase_amount. Only rewards with an amount greater than zero are inserted.
Example
Request
Response
Errors
| Status | Error | Cause |
|---|---|---|
400 | "lead_id required" | The lead_id field is missing. |
401 | "Invalid API key" | Missing or invalid X-Api-Key header. |
403 | "Lead not accessible" | Your company does not have access to this lead’s channel. |