Skip to main content

Get User Registration Data

Retrieve registration data for a user based on their user ID and experience value. This endpoint is designed for vendor integrations and requires vendor API key authentication.

Endpoint

GET https://api.distinct.so/api/v1/user/registration-data

Authentication

This endpoint requires vendor API key authentication via HTTP header.

HeaderTypeRequiredDescription
x-distinct-api-keyStringYesYour vendor API key provided by Distinct
x-distinct-api-key: YOUR_VENDOR_API_KEY
caution

The API key must be valid and active. Invalid or missing API keys will result in a 401 Unauthorized response.

Query Parameters

All query parameters are required.

ParameterTypeRequiredDescriptionExample
userIdStringYesUnique identifier of the user"123e4567-e89b-12d3-a456-426614174000"
experienceValueStringYesThe experience value associated with the user's registration event"experience-2024"

Response

Success (200 OK)

{
"statusCode": 200,
"message": "User fetched successfully",
"data": {
"userData": {
"firstName": "John",
"lastName": "Doe",
"countryCode": "",
"userId": "",
"email": "john.doe@example.com",
"phoneNumber": "1234567890",
"phoneCountryCode": "+1",
"phoneCountryName": "United States",
"dob": "1990-01-15"
}
}
}
note
  • The response data may differ based on the requirements for the use case. The example above shows standard data only.
  • The userId value is the same as the QR Code scan value.

Response Fields

FieldTypeDescriptionNullable
firstNameStringUser's first nameYes
lastNameStringUser's last nameYes
emailStringUser's email addressYes
phoneNumberStringUser's phone numberYes
phoneCountryCodeStringCountry code for phone number (e.g. "+1")Yes
phoneCountryNameStringCountry name for phone numberYes
dobStringDate of birth (format: YYYY-MM-DD)Yes
info

All fields in the user data may be null if the data is not available for the user.

Example Request

cURL

curl -X GET 'https://api.distinct.so/api/v1/user/registration-data?userId=123&experienceValue=exp-001' \
-H 'x-distinct-api-key: <your-vendor-api-key>' \
-H 'Content-Type: application/json'

Replace the placeholders:

  • <your-vendor-api-key> — your actual vendor API key provided by Distinct
  • userId — the unique identifier of the user
  • experienceValue — the experience value associated with the registration

Error Responses

400 Bad Request — Missing API Key

{
"statusCode": 400,
"message": "Missing API key"
}

Cause: The x-distinct-api-key header is missing or empty.

401 Unauthorized — Invalid API Key

{
"statusCode": 401,
"message": "Invalid API key"
}

Cause: The provided API key is invalid, expired, or not found in the system.

500 Internal Server Error

{
"statusCode": 500,
"message": "Internal server error"
}

Cause: An unexpected error occurred on the server. Contact support if this persists.