Skip to main content

Get Referral (v1)

Method & Path

GET /api/v1/admin/referrals/:referralId

Description

Retrieve a single admin referral by ID.

Backend path: /v1/admin/referrals/:referralId

Authentication

Required: Admin authentication with businesses.manage permission.

Authorization: Bearer <admin_token>

Headers

Authorization: Bearer <admin_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
referralIdstringYesReferral ID

Request Body

None.

Response 200 OK

{
"referral": {
"id": "65f1c1a2b3c4d5e6f7a8b901",
"name": "Ahmed Ali",
"phone": "0599123456",
"sharePercentage": 10,
"createdBy": "65aab1c2d3e4f5a6b7c8d901",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z"
}
}

Common Errors

  • 400 Bad Request: Invalid referral ID
  • 401 Unauthorized: Missing or invalid admin authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Referral not found
  • 500 Internal Server Error: Server error