Fetch Points API
curl --request POST \
--url https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "storesAdmin.query.user_balance",
"tag": "storeAdmin",
"variables": {
"user_data": {
"email": "your.email@example.com",
"phone": "+91-8999888887"
}
}
}
'import requests
url = "https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints"
payload = {
"query": "storesAdmin.query.user_balance",
"tag": "storeAdmin",
"variables": { "user_data": {
"email": "your.email@example.com",
"phone": "+91-8999888887"
} }
}
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({
query: 'storesAdmin.query.user_balance',
tag: 'storeAdmin',
variables: {user_data: {email: 'your.email@example.com', phone: '+91-8999888887'}}
})
};
fetch('https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints', 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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints",
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([
'query' => 'storesAdmin.query.user_balance',
'tag' => 'storeAdmin',
'variables' => [
'user_data' => [
'email' => 'your.email@example.com',
'phone' => '+91-8999888887'
]
]
]),
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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints"
payload := strings.NewReader("{\n \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints")
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 \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user_balance": {
"success": 1,
"message": null,
"data": {
"total": 1500
}
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Unauthorized"
}Fetch Points API
Fetch the current reward points balance for a specific user. Can be used to display balances inside your own UI.
Real URL: POST https://stagingstores.xoxoday.com/chef/v1/oauth/api
POST
/
fetchPoints
Fetch Points API
curl --request POST \
--url https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "storesAdmin.query.user_balance",
"tag": "storeAdmin",
"variables": {
"user_data": {
"email": "your.email@example.com",
"phone": "+91-8999888887"
}
}
}
'import requests
url = "https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints"
payload = {
"query": "storesAdmin.query.user_balance",
"tag": "storeAdmin",
"variables": { "user_data": {
"email": "your.email@example.com",
"phone": "+91-8999888887"
} }
}
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({
query: 'storesAdmin.query.user_balance',
tag: 'storeAdmin',
variables: {user_data: {email: 'your.email@example.com', phone: '+91-8999888887'}}
})
};
fetch('https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints', 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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints",
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([
'query' => 'storesAdmin.query.user_balance',
'tag' => 'storeAdmin',
'variables' => [
'user_data' => [
'email' => 'your.email@example.com',
'phone' => '+91-8999888887'
]
]
]),
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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints"
payload := strings.NewReader("{\n \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\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://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stagingstores.xoxoday.com/chef/v1/oauth/api/fetchPoints")
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 \"query\": \"storesAdmin.query.user_balance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"user_data\": {\n \"email\": \"your.email@example.com\",\n \"phone\": \"+91-8999888887\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user_balance": {
"success": 1,
"message": null,
"data": {
"total": 1500
}
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Unauthorized"
}| Property | Type | Description |
|---|---|---|
user_data.email | String | User’s email ID to fetch balance. |
user_data.phone | String | User’s phone number to fetch balance. |
Response Schema
| Path | Type | Description |
|---|---|---|
| data | object | Root response object. |
| data.user_balance | object | Container for user points/balance data. |
| data.user_balance.success | number | API execution status (1 = success). |
| data.user_balance.message | string/null | API message (null when no message is returned). |
| data.user_balance.data | object | Actual points data. |
| data.user_balance.data.total | number | Total available reward points for the user. |
Body
application/json