Appearance
GET referral_codes/[code]/referrals
Retrieve a list of users who signed up using a specific referral code that you own.
Endpoint
GET /api/v1/referral-codes/{code}/referralsAuthentication
Requires a valid API key in the Authorization header:
Authorization: Bearer <your-api-key>Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The referral code |
Example Request
bash
curl -X GET https://portal.eprospera.com/api/v1/referral-codes/MYCODE123/referrals \
-H "Authorization: Bearer <your-api-key>"Response
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
code | string | The referral code |
naturalPersons | array | List of natural persons referred with this code |
Natural Person Object Fields
| Field | Type | Description |
|---|---|---|
fullName | string | null | Full name of the referred person. Can be null if the user has not yet applied or been approved for residency |
referredAt | string | null | Timestamp when the user was referred (ISO 8601) |
Example Response
json
{
"code": "MYCODE123",
"naturalPersons": [
{
"fullName": "John Doe",
"referredAt": "2024-03-15T14:30:00.000Z"
},
{
"fullName": null,
"referredAt": "2024-03-20T09:15:00.000Z"
}
]
}Error Responses
401 Unauthorized
Invalid or missing API key:
json
{
"error": "Invalid API key"
}404 Not Found
Referral code not found or you don't have access:
json
{
"error": "Referral code not found"
}500 Internal Server Error
Server error:
json
{
"error": "Internal server error"
}Access Control
You can only access referral codes that belong to you. This includes:
- Referral codes associated with your natural person account
- Referral codes associated with legal entities where you are a representative