/member/register
Overview
This endpoint is used to register a new user into the loyalty program by collecting required personal data and consent flags.
When to Use This Endpoint
Use this endpoint during the first interaction with a customer when:
- A customer opts into the loyalty program
- A user signs up via POS, kiosk, or an online interface
Key Considerations
- An SMS or email may be triggered automatically for confirmation or consent
- All required consents (e.g., Terms of Use, GDPR) must be collected at registration time
- Use this call to capture and store the user's communication preferences from the start
Request Details
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
newMemberData | object | Yes | Object containing new member registration data |
newMemberData Fields
| Field | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Conditional | Phone number of the new member (required if email is absent) |
email | string | Conditional | Email address (required if phoneNumber is absent) |
firstName | string | No | First name |
lastName | string | No | Last name |
allowedSMS | boolean | No | Consent to receive SMS |
allowedEmail | boolean | No | Consent to receive email |
termsOfUse | boolean | No | Terms of use accepted |
gdpr | boolean | No | GDPR consent |
birthday | string | No | Member's date of birth (ISO date format) |
cardNumber | string | No | Physical card number |
commonExtId | string | No | External identifier |
preferredLanguage | string | No | Preferred language as an ISO 639-1 two-letter code — the primary language subtag of a BCP 47 tag (e.g. en, es, ca) |
Method & URL
POST /member/register
See API Servers for the base URL to use for your brand (the example below uses a fixed dev URL for illustration).
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | API key used for authentication |
x-source-type | string | Yes | Origin of the request (POS, Web, Kiosk, etc.) |
x-source-name | string | Yes | Name of the client or integration system |
x-pos-id | string | Yes | Unique POS terminal identifier |
x-branch-id | string | Yes | Identifier for the business branch or location |
Request Example
curl --location --request POST 'https://dev-pos-api.fidelizacion.app/v1/member/register' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: POS' \
--header 'x-source-name: pos_terminal_01' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"newMemberData": {
"phoneNumber": "1234567890",
"email": "member@example.com",
"firstName": "John",
"lastName": "Doe",
"allowedSMS": true,
"allowedEmail": true,
"termsOfUse": true,
"gdpr": true,
"preferredLanguage": "en",
"birthday": "1990-01-01",
"cardNumber": "1234567890123456"
}
}'
Success Response
{
"status": "success",
"member": {
"membershipKey": "abc123",
"commonExtId": "EXT-001",
"status": "active",
"phoneNumber": "1234567890"
}
}
Error Response Examples
Member Already Exists
{
"status": "error",
"error": {
"code": "204",
"message": "Member already exists with same phone number"
}
}
{
"status": "error",
"error": {
"code": "205",
"message": "Member already exists with same email"
}
}
Cannot Register Member
{
"status": "error",
"error": {
"code": "203",
"message": "Cannot register member (DB error)"
}
}
Error Codes
| Code | Description |
|---|---|
203 | Cannot register member (DB error) |
204 | Member already exists with same phone number |
205 | Member already exists with same email |
Field Reference
| Field | Type | Description |
|---|---|---|
phoneNumber | string | Phone number of the new member |
email | string | Email address of the new member |
firstName | string | First name |
lastName | string | Last name |
allowedSMS | boolean | Consent to receive SMS |
allowedEmail | boolean | Consent to receive email |
termsOfUse | boolean | Indicates if terms of use were accepted |
gdpr | boolean | Indicates if GDPR consent was given |
birthday | string | Birthday in ISO format (YYYY-MM-DD) |
cardNumber | string | Physical card number of the member |
commonExtId | string | External identifier |
preferredLanguage | string | Preferred language as an ISO 639-1 two-letter code — the primary language subtag of a BCP 47 tag (e.g. en, es, ca) |
Related Use Cases
- Registering a new customer during checkout or onboarding
- Capturing communication and consent preferences on initial interaction
- Enabling future access to loyalty features such as
/member/detailsand/payment