Documentation Index Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
Use this file to discover all available pages before exploring further.
GET https://api.baanx.com/v1/referral/{code}/validate
Validates a referral code when a user enters it, checking whether it is valid or has expired.
Overview
Use this endpoint during the registration flow to verify a referral code before accepting it. Returns a boolean indicating whether the code is currently valid.
This endpoint only requires the client key — no user Bearer token is needed, as it is intended for use during registration before a user account exists.
Authentication
This endpoint requires only a client key:
x-client-key: YOUR_CLIENT_KEY
Request
Your public API client key
Set to true to route requests to the US backend environment
Path Parameters
The referral code to validate (e.g., FHLSO5)
Request Example
cURL
JavaScript
Python
TypeScript
curl -X GET https://api.baanx.com/v1/referral/FHLSO5/validate \
-H "x-client-key: YOUR_CLIENT_KEY"
Response
200 Success
true if the referral code is valid and can be used. false if the code is expired or has reached its usage cap.
200 - Valid Code
200 - Invalid Code
Error Responses
400 - Bad Request
422 - Validation Error
500 - Internal Server Error
{
"message" : "Invalid request"
}
GET /v1/referral/ - Get the authenticated user’s own referral code