cURL
curl --request POST \
--url https://api.example.com/v1/panel/gifts/{giftID}/revoke \
--header 'X-CSRF-Token: <x-csrf-token>' \
--header 'X-Operator-Reason: <x-operator-reason>'import requests
url = "https://api.example.com/v1/panel/gifts/{giftID}/revoke"
headers = {
"X-CSRF-Token": "<x-csrf-token>",
"X-Operator-Reason": "<x-operator-reason>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CSRF-Token': '<x-csrf-token>', 'X-Operator-Reason': '<x-operator-reason>'}
};
fetch('https://api.example.com/v1/panel/gifts/{giftID}/revoke', 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://api.example.com/v1/panel/gifts/{giftID}/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-CSRF-Token: <x-csrf-token>",
"X-Operator-Reason: <x-operator-reason>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/panel/gifts/{giftID}/revoke"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
req.Header.Add("X-Operator-Reason", "<x-operator-reason>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/panel/gifts/{giftID}/revoke")
.header("X-CSRF-Token", "<x-csrf-token>")
.header("X-Operator-Reason", "<x-operator-reason>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/panel/gifts/{giftID}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CSRF-Token"] = '<x-csrf-token>'
request["X-Operator-Reason"] = '<x-operator-reason>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"senderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "subscription",
"currency": "<string>",
"codeHint": "<string>",
"status": "pending",
"claimAttempts": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"creditMinor": 123,
"claimedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"revokeReason": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}panel
Post v1panelgifts revoke
Requires gifts.write and a reason. A claimed gift is not revocable: the recipient already holds what it bought, and taking that back is a refund decision against their entitlement.
POST
/
v1
/
panel
/
gifts
/
{giftID}
/
revoke
cURL
curl --request POST \
--url https://api.example.com/v1/panel/gifts/{giftID}/revoke \
--header 'X-CSRF-Token: <x-csrf-token>' \
--header 'X-Operator-Reason: <x-operator-reason>'import requests
url = "https://api.example.com/v1/panel/gifts/{giftID}/revoke"
headers = {
"X-CSRF-Token": "<x-csrf-token>",
"X-Operator-Reason": "<x-operator-reason>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CSRF-Token': '<x-csrf-token>', 'X-Operator-Reason': '<x-operator-reason>'}
};
fetch('https://api.example.com/v1/panel/gifts/{giftID}/revoke', 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://api.example.com/v1/panel/gifts/{giftID}/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-CSRF-Token: <x-csrf-token>",
"X-Operator-Reason: <x-operator-reason>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/panel/gifts/{giftID}/revoke"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
req.Header.Add("X-Operator-Reason", "<x-operator-reason>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/panel/gifts/{giftID}/revoke")
.header("X-CSRF-Token", "<x-csrf-token>")
.header("X-Operator-Reason", "<x-operator-reason>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/panel/gifts/{giftID}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CSRF-Token"] = '<x-csrf-token>'
request["X-Operator-Reason"] = '<x-operator-reason>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"senderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "subscription",
"currency": "<string>",
"codeHint": "<string>",
"status": "pending",
"claimAttempts": 123,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"recipientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"creditMinor": 123,
"claimedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"revokeReason": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Headers
Echoes the token from the current session. Required on every unsafe method.
Why the change is being made. Carried as a header because almost every operations mutation needs one; the API refuses a change that requires a reason and did not get one.
Required string length:
1 - 400Path Parameters
Response
Revoked
Available options:
subscription, addon, wallet_credit The last four characters of the claim code. The code itself is stored only as a digest.
Available options:
pending, deliverable, claimed, expired, revoked, refunded