Creating links
One POST creates one unique link for one person. The same person always gets the same link from the same Service.
Create
| Parameter | Required | Notes |
|---|---|---|
ExternalUserId | Yes | Your id for the person, 1 to 128 characters. Not an email or phone number. |
ExternalRef | No | Your reference, for example an order or deal id |
Campaign | No | Campaign SID or reference; defaults to the Service’s campaign |
DateExpires | No | Earlier expiry than the default |
Metadata | No | Up to 10 string pairs, returned in webhooks. No personal data. |
JSON body
curl -X POST https://api-rewards.efiqone.com/v1/Services/RS8f2c…/Links \
-u $EFIQ_ACCOUNT_SID:$EFIQ_AUTH_TOKEN \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-88231" \
-d '{"externalUserId":"crm_1042","externalRef":"order-88231","metadata":{"tier":"gold"}}'Statuses
| Status | Meaning |
|---|---|
created | Link exists, not opened yet |
opened | The person opened the link |
claimed | They claimed the reward |
redeemed | The voucher was used |
expired | Past its expiry date |
revoked | You revoked it; the page shows it’s no longer valid |
Read, list and revoke
Endpoints
GET /v1/Services/{ServiceSid}/Links?ExternalUserId=crm_1042
GET /v1/Services/{ServiceSid}/Links/{LinkSid}
GET /v1/Services/{ServiceSid}/Links/{LinkSid}/Events
POST /v1/Services/{ServiceSid}/Links/{LinkSid} Status=revoked&RevokeReason=duplicateRevoking is immediate: the link page stops working and a link.revoked webhook is sent. Revoked links are not refunded.