Check Availability
curl --request POST \
--url https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"RelationReference": "jane.doe@example.com",
"TransactionCurrency": "DEFAULT",
"RelationType": 4,
"ProgramId": 19
}
'import requests
url = "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability"
payload = {
"RelationReference": "jane.doe@example.com",
"TransactionCurrency": "DEFAULT",
"RelationType": 4,
"ProgramId": 19
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
RelationReference: 'jane.doe@example.com',
TransactionCurrency: 'DEFAULT',
RelationType: 4,
ProgramId: 19
})
};
fetch('https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'RelationReference' => 'jane.doe@example.com',
'TransactionCurrency' => 'DEFAULT',
'RelationType' => 4,
'ProgramId' => 19
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability"
payload := strings.NewReader("{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}"
response = http.request(request)
puts response.read_body{
"results": {
"IsSucessful": true,
"ErrorCode": "000",
"ExceptionMessage": "Success",
"ReturnObject": 910
}
}Points Redemption
Check Availability
Verify a member’s redeemable points balance before initiating a redemption via the Loyalife API.
POST
/
lbms-ingress
/
pg-lm
/
API
/
PG
/
CheckAvailability
Check Availability
curl --request POST \
--url https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"RelationReference": "jane.doe@example.com",
"TransactionCurrency": "DEFAULT",
"RelationType": 4,
"ProgramId": 19
}
'import requests
url = "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability"
payload = {
"RelationReference": "jane.doe@example.com",
"TransactionCurrency": "DEFAULT",
"RelationType": 4,
"ProgramId": 19
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
RelationReference: 'jane.doe@example.com',
TransactionCurrency: 'DEFAULT',
RelationType: 4,
ProgramId: 19
})
};
fetch('https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'RelationReference' => 'jane.doe@example.com',
'TransactionCurrency' => 'DEFAULT',
'RelationType' => 4,
'ProgramId' => 19
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability"
payload := strings.NewReader("{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalife-api.xoxoday.in/lbms-ingress/pg-lm/API/PG/CheckAvailability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"RelationReference\": \"jane.doe@example.com\",\n \"TransactionCurrency\": \"DEFAULT\",\n \"RelationType\": 4,\n \"ProgramId\": 19\n}"
response = http.request(request)
puts response.read_body{
"results": {
"IsSucessful": true,
"ErrorCode": "000",
"ExceptionMessage": "Success",
"ReturnObject": 910
}
}Queries a member’s current redeemable points balance in real time. Always call this before Redeem Points to confirm the member has sufficient balance.
Partial redemption is not supported — members must redeem points covering the full transaction value. The points-to-currency conversion rate is configurable per program; confirm the rate for your program with your Xoxoday implementation contact to correctly calculate how many points equal the cart value.
Responses
200 — Success
200 — Success
| Path | Type | Description |
|---|---|---|
results.IsSucessful | boolean | true |
results.ErrorCode | string | 000 |
results.ExceptionMessage | string | Success |
results.ReturnObject | integer | The member’s current redeemable points balance |
Error Codes
| Code | ExceptionMessage | Cause |
|---|---|---|
000 | Success | Current balance returned |
103 | Member does not exist | RelationReference not found in the program |
107 | Member status is not Active | Member has not been activated |
999 | Bad request | Missing required fields in the request payload |
Authorizations
JWT obtained from Generate Auth Token. Pass as Authorization: bearer {token}.
Body
application/json
Response
200 - application/json
Balance retrieved
Show child attributes
Show child attributes
⌘I