Cancel Points API
curl --request POST \
--url https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "storesAdmin.mutation.cancelBalance",
"tag": "storeAdmin",
"variables": {
"recipients_data": {
"recipients": [
{
"unique_id": 987654321
}
]
}
}
}
'import requests
url = "https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints"
payload = {
"query": "storesAdmin.mutation.cancelBalance",
"tag": "storeAdmin",
"variables": { "recipients_data": { "recipients": [{ "unique_id": 987654321 }] } }
}
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.mutation.cancelBalance',
tag: 'storeAdmin',
variables: {recipients_data: {recipients: [{unique_id: 987654321}]}}
})
};
fetch('https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints', 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/cancelPoints",
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.mutation.cancelBalance',
'tag' => 'storeAdmin',
'variables' => [
'recipients_data' => [
'recipients' => [
[
'unique_id' => 987654321
]
]
]
]
]),
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/cancelPoints"
payload := strings.NewReader("{\n \"query\": \"storesAdmin.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\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/cancelPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"storesAdmin.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints")
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.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cancelBalance": {
"error": false,
"message": "Cancellation processed successfully",
"recipients": [
{
"unique_id": 987654321,
"success": true,
"message": "Points cancelled successfully"
}
]
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Unauthorized"
}Cancel Points API
Cancel previously issued points for one or more recipients using their unique transaction ID.
Real URL: POST https://accounts.xoxoday.com/chef/v1/oauth/api
POST
/
cancelPoints
Cancel Points API
curl --request POST \
--url https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "storesAdmin.mutation.cancelBalance",
"tag": "storeAdmin",
"variables": {
"recipients_data": {
"recipients": [
{
"unique_id": 987654321
}
]
}
}
}
'import requests
url = "https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints"
payload = {
"query": "storesAdmin.mutation.cancelBalance",
"tag": "storeAdmin",
"variables": { "recipients_data": { "recipients": [{ "unique_id": 987654321 }] } }
}
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.mutation.cancelBalance',
tag: 'storeAdmin',
variables: {recipients_data: {recipients: [{unique_id: 987654321}]}}
})
};
fetch('https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints', 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/cancelPoints",
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.mutation.cancelBalance',
'tag' => 'storeAdmin',
'variables' => [
'recipients_data' => [
'recipients' => [
[
'unique_id' => 987654321
]
]
]
]
]),
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/cancelPoints"
payload := strings.NewReader("{\n \"query\": \"storesAdmin.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\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/cancelPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"storesAdmin.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stagingstores.xoxoday.com/chef/v1/oauth/api/cancelPoints")
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.mutation.cancelBalance\",\n \"tag\": \"storeAdmin\",\n \"variables\": {\n \"recipients_data\": {\n \"recipients\": [\n {\n \"unique_id\": 987654321\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cancelBalance": {
"error": false,
"message": "Cancellation processed successfully",
"recipients": [
{
"unique_id": 987654321,
"success": true,
"message": "Points cancelled successfully"
}
]
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Unauthorized"
}| Property | Type | Description |
|---|---|---|
recipients_data.recipients | array | List of recipients for whom points cancellation is requested. |
recipients_data.recipients[].unique_id | number | Unique transaction ID of the points issuance that needs to be cancelled. |
Response Schema
| Property | Type | Description |
|---|---|---|
data.cancelBalance.error | boolean | Indicates whether the cancellation operation failed (false = success). |
data.cancelBalance.message | string | Summary message describing the overall cancellation result. |
data.cancelBalance.recipients | array | List of point transactions processed in the cancellation request. |
data.cancelBalance.recipients[].unique_id | number | Unique transaction ID of the points issuance. |
data.cancelBalance.recipients[].success | boolean | Indicates whether the transaction cancellation was successful. |
data.cancelBalance.recipients[].message | string | Transaction-level status message explaining the outcome of the cancellation. |
Body
application/json