Guest API: Shared links
Links the user makes in the app to share a place in it.
| What it does | Route |
|---|---|
| Make a link to share | POST /guest/v1/links |
| Read the user’s referral link | GET /guest/v1/referral |
Make a link to share
Section titled “Make a link to share”POST /guest/v1/links
Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.
Body (application/json): ShareLinkBody
| Field | Type | Description |
|---|---|---|
channel | string | |
data | object of string | |
path (always) | string |
Answers
| Status | Body | Meaning |
|---|---|---|
| 201 | SharedLink | Made |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 409 | problem | Refused as things stand: the problem says why. |
| 429 | problem | Too many requests: wait for Retry-After. |
Read the user’s referral link
Section titled “Read the user’s referral link”GET /guest/v1/referral
The user’s own link for the app’s referral programme, made the first time it is asked for and the same every time after. A new user who arrives by it is the user’s referral, and the programme’s reward is counted for them. 409 for an app with no programme or no link domain.
Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | ReferralLink | OK |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 409 | problem | Refused as things stand: the problem says why. |
| 429 | problem | Too many requests: wait for Retry-After. |