Skip to main content

Authentication

Request

string
required
Must be "create_purchase".
uuid
required
The lead to record the purchase against. Your company must have access to this lead’s channel.
number
Amount of the purchase. Used by percentage reward triggers and stored on the purchase row.
string
Stored as the purchase name.
string
Stored as the purchase description.
timestamp
The date of the purchase. Defaults to the current time if omitted.
array of uuid
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.
object

Side effects

  • Purchase event: An event record is created with category purchase, linked to the new purchase.
  • Reward triggers: If trigger_ids is provided, only those triggers are evaluated. Otherwise, all active purchase triggers on the channel fire. Fixed rewards use the trigger’s configured amount; percentage rewards are calculated from the purchase_amount. Only rewards with an amount greater than zero are inserted.

Example

Request

Response

Errors