Atomic Member Registration
Atomically creates a member along with an optional profile, credentials, and loyalty enrollments in a single request. If any part of the registration fails, no records are created.
Headers
- Type: stringContent
- Type application/json
Body·
application/json
- Type: objectmember
Responses
- application/json
- 400
Bad Request
- 422
Unprocessable Entity
- 500
Internal Server Error
Request Example for post/members/register
curl https://api-staging.sparkfly.com/v1.0/members/register \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: YOUR_SECRET_TOKEN' \
--data '{
"member": {
"identifier": "",
"member_profile": {
"first_name": "",
"last_name": "",
"email": "",
"phone": "",
"birth_month": 1,
"birth_day": 1,
"custom_data": {}
},
"credentials": [
{
"credential": {
"identifier": "",
"type": ""
}
}
],
"loyalty_enrollments": [
{
"loyalty_enrollment": {
"loyalty_program_id": 1,
"external_id": "",
"source": ""
}
}
]
}
}'
{
"member": {
"id": 1,
"identifier": "string",
"member_profile": {
"id": 1,
"first_name": "string",
"last_name": "string",
"email": "string",
"phone": "string",
"birth_month": 1,
"birth_day": 1,
"custom_data": {}
},
"credentials": [
{
"credential": {
"id": 1,
"identifier": "string",
"type": "string"
}
}
],
"loyalty_enrollments": [
{
"loyalty_enrollment": {
"id": 1,
"loyalty_program_id": 1,
"external_id": "string",
"source": "string"
}
}
]
}
}