curl --request POST \
--url https://api.example.com/v2/grants/{grant_id}/void \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/v2/grants/{grant_id}/void"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/v2/grants/{grant_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.example.com/v2/grants/{grant_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 => [
"x-api-key: <api-key>"
],
]);
$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/v2/grants/{grant_id}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/v2/grants/{grant_id}/void")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/grants/{grant_id}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "grant_0194f4e3a2b77c6aa91c4f6b4db2a980",
"description": "Usage tracked for Acme.",
"account_id": "account_0194f4e3a2b77c6aa91c4f6b4db2a980",
"metric_id": "metric_0194f4e3a2b77c6aa91c4f6b4db2a980",
"currency": "usd",
"amount": "100.0",
"expires_at": 1767225600,
"accepted_at": 1767225600,
"created_at": 1767225600,
"updated_at": 1767225600,
"status": "active",
"archived_at": 1767225600,
"contract_v1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_at": 1767225600
}"<string>""Invalid API key""<string>""not found""<string>""<string>""rate limit exceeded""<string>"Void a grant.
curl --request POST \
--url https://api.example.com/v2/grants/{grant_id}/void \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/v2/grants/{grant_id}/void"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/v2/grants/{grant_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.example.com/v2/grants/{grant_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 => [
"x-api-key: <api-key>"
],
]);
$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/v2/grants/{grant_id}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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/v2/grants/{grant_id}/void")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/grants/{grant_id}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "grant_0194f4e3a2b77c6aa91c4f6b4db2a980",
"description": "Usage tracked for Acme.",
"account_id": "account_0194f4e3a2b77c6aa91c4f6b4db2a980",
"metric_id": "metric_0194f4e3a2b77c6aa91c4f6b4db2a980",
"currency": "usd",
"amount": "100.0",
"expires_at": 1767225600,
"accepted_at": 1767225600,
"created_at": 1767225600,
"updated_at": 1767225600,
"status": "active",
"archived_at": 1767225600,
"contract_v1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_at": 1767225600
}"<string>""Invalid API key""<string>""not found""<string>""<string>""rate limit exceeded""<string>"Authorizations
LedgerUp API Key.
Headers
Optional. Duplicate keys within the same company namespace and route return 409. Non-empty idempotency key for deduplicating write requests on the same route.
"6f31c20e-725c-4be8-96f4-835042f67602"
Path Parameters
Resource identifier. LedgerUp grant identifier.
^grant_[0-9a-f]{32}$"grant_0194f4e3a2b77c6aa91c4f6b4db2a980"
Response
Voided.
LedgerUp grant identifier.
^grant_[0-9a-f]{32}$"grant_0194f4e3a2b77c6aa91c4f6b4db2a980"
Optional description. Maximum 2048 Unicode scalar values.
2048"Usage tracked for Acme."
LedgerUp account identifier.
^account_[0-9a-f]{32}$"account_0194f4e3a2b77c6aa91c4f6b4db2a980"
LedgerUp metric identifier. Null for currency grants.
^metric_[0-9a-f]{32}$"metric_0194f4e3a2b77c6aa91c4f6b4db2a980"
Three-letter lowercase currency code. Amount is expressed in major currency units, not minor units. Null for metric grants.
^[a-z]{3}$"usd"
Decimal amount serialized as a string.
^-?\d+(\.\d+)?$"100.0"
Unix timestamp in seconds.
1767225600
Unix timestamp in seconds.
1767225600
Unix timestamp in seconds.
1767225600
Unix timestamp in seconds.
1767225600
Derived grant status. Voided and archived take precedence over expiration and scheduled activation.
active, scheduled, voided, archived, expired "active"
Unix timestamp in seconds.
1767225600
Optional public.contracts identifier.
Unix timestamp in seconds.
1767225600