Customer Credits
Updated
GET ?action=get_referral_customer
One customer's full credit standing — balance, invite code, who invited them, who they invited, their lines, and the ledger itself.
Request Parameters
| Field | Type | Required | Description |
|---|
email | string | Requiredone of these two | The customer's email |
customer_id | integer | Requiredone of these two | The customer id |
ledger_limit | integer | Optional | Ledger entries to return, max 500 (default 100) |
Response Fields
| Field | Type | Description |
|---|
balance | integer | Current credit balance |
codes | array | Their invite code (one per customer) with disabled_at |
referred_by | object|null | Who invited them |
invited | array | Everyone they invited |
lines | array | The lines attached to their login |
ledger | array | Every credit movement: delta, reason, order, service, note, date |