Skip to main content
POST
/
accounts
/
{account_id}
/
features
/
{feature_id}
/
entries
/
{entry_id}
/
void
Void a feature credits entry of a feature for an account
curl --request POST \
  --url https://api.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void', 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.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.togai.com/accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<Reason message>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_id
string
required

account_id corresponding to an account

Maximum string length: 50
Example:

"ACC00001"

feature_id
string
required

feature_id corresponding to a feature

Maximum string length: 50
Example:

"feat.fdjskl.sdkjl"

entry_id
string
required

entryId corresponding to a particular entitlement/overage grant entry

Formats:

  1. If source of entry is an entitlement grant rate card in price plan: schedule_id#pricing_cycle_start_date$PRICE_PLAN
  2. If source of entry is an entitlement overage rate card in price plan: schedule_id#pricing_cycle_start_date$OVERAGE
  3. If source of entry is a purchase: purchase_id#int_index$PURCHASE
Maximum string length: 50
Example:

"purchase.21HbazIT3JQ.D90jC#1$PURCHASE"

Response

Success response

success
boolean
required
Example:

true