Remove member from loyalty program
Description
Removes a member from a loyalty program. Before removal, the profile is searched using the selected matching method: email, phone number, profile ID, or a custom field.
Request URL
Method: POST
https://example.com/api/v1.1/loyalty/delete_member
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abc123def456" | Yes | API token |
| loyalty_program_id | int | 123 | Yes | Loyalty program ID |
| matching | string | "email" | Yes | Profile lookup method: email, phone, profile_id, custom |
| string | "user@example.com" | Yes, if matching = email | Email used to find the profile | |
| phone | string | "+1234567890" | Yes, if matching = phone | Phone number in international format |
| profile_id | string | "profile123" | Yes, if matching = profile_id | Profile ID |
| field_name | string | "user_id" | Yes, if matching = custom | Custom field name |
| field_value | string / int | "123456" | Yes, if matching = custom | Custom field value |
Request example
- JSON
- XML
{
"token": "abc123def456",
"loyalty_program_id": 123,
"matching": "email",
"email": "user@example.com"
}
<xml>
<token>abc123def456</token>
<loyalty_program_id>123</loyalty_program_id>
<matching>email</matching>
<email>user@example.com</email>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "Successful operation",
"profile_id": "123456"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<profile_id>123456</profile_id>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| profile_id | string | ID of the removed profile |