Skip to main content
Documentation for version v74

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

ParameterTypeExampleRequiredDescription
tokenstring"abc123def456"YesAPI token
loyalty_program_idint123YesLoyalty program ID
points_currency_eidstring"bonus_points"Yes, if points_currency_iid is not providedExternal points currency ID
points_currency_iidint1Yes, if points_currency_eid is not providedInternal points currency ID
date_fromstring (RFC3339)"2023-09-01T00:00:00Z"YesPeriod start date (inclusive)
date_tostring (RFC3339)"2023-09-30T23:59:59Z"YesPeriod end date (inclusive)
matchingstring"email"YesProfile lookup method. Possible values: "email", "phone", "profile_id", "custom"
field_namestring"user_id"Yes, if matching = customCustom field name
field_valuestring / int"12345"Yes, if matching = customCustom field value
emailstring"user@example.com"Yes, if matching = emailMember email
phonestring"+1234567890"Yes, if matching = phoneMember phone number in international format
profile_idstring"profile_123"Yes, if matching = profile_idProfile ID

Request example

{
"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"
}

Response example

{
"data": {
"expiring_points": "150.24"
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
expiring_pointsstringNumber of points that will expire during the specified period