Record a customer purchase
referralrock_record_customerWRITE: reports a paying customer to Referral Rock. A customer whose email matches a pending referral turns that referral to approved, which triggers the program's configured rewards for the referring member (a financial commitment that may be paid out automatically). A customer with no matching referral is added as a pre-loaded member to every program that has Preload New Customers on. Returns the outcome per customer (ReferralApproved, MemberPreloaded, Skipped…). Not idempotent. POST /api/customerfeed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | The customer's email address; the match key against pending referrals and members. | ||
| phone | No | Customer phone number. | |
| amount | No | Purchase amount; feeds percentage rewards (default 0). | |
| confirm | Yes | Must be true: confirms a matching pending referral may be approved and its rewards issued. | |
| last_name | No | Customer last name. | |
| first_name | No | Customer first name. | |
| external_id | No | Your own id for this customer (for example a CRM id). | |
| purchase_date | No | Purchase date, ISO 8601 (default: now, UTC). |