Expiring points for a period
Description
Returns the number of points that are subject to expiration during the specified period for the selected points currency.
Request URL
Method: POST
https://example.com/api/v1.1/loyalty/account/expiring_points
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abc123def456" | Yes | API token |
| loyalty_program_id | int | 123 | Yes | Loyalty program ID |
| points_currency_eid | string | "bonus_points" | Yes, if points_currency_iid is not provided | External points currency ID |
| points_currency_iid | int | 1 | Yes, if points_currency_eid is not provided | Internal points currency ID |
| date_from | string (RFC3339) | "2023-09-01T00:00:00Z" | Yes | Period start date (inclusive) |
| date_to | string (RFC3339) | "2023-09-30T23:59:59Z" | Yes | Period end date (inclusive) |
| matching | string | "email" | Yes | Profile lookup method. Possible values: "email", "phone", "profile_id", "custom" |
| field_name | string | "user_id" | Yes, if matching = custom | Custom field name |
| field_value | string / int | "12345" | Yes, if matching = custom | Custom field value |
| string | "user@example.com" | Yes, if matching = email | Member email | |
| phone | string | "+1234567890" | Yes, if matching = phone | Member phone number in international format |
| profile_id | string | "profile_123" | Yes, if matching = profile_id | Profile ID |
Request example
- JSON
- XML
{
"token": "abc123def456",
"loyalty_program_id": 123,
"points_currency_eid": "bonus_points",
"matching": "email",
"email": "user@example.com",
"date_from": "2023-09-01T00:00:00Z",
"date_to": "2023-09-30T23:59:59Z"
}
<xml>
<token>abc123def456</token>
<loyalty_program_id>123</loyalty_program_id>
<points_currency_eid>bonus_points</points_currency_eid>
<matching>email</matching>
<email>user@example.com</email>
<date_from>2023-09-01T00:00:00Z</date_from>
<date_to>2023-09-30T23:59:59Z</date_to>
</xml>
Response example
- JSON
- XML
{
"data": {
"expiring_points": "150.24"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<expiring_points>150.24</expiring_points>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| expiring_points | string | Number of points that will expire during the specified period |