Amend Tax Invoice - Cancellation of Contract
Pass only the date (write date) field, and Bolta offsets the original issued invoice. You cannot amend the invoice if an item’s supply cost on the original tax invoice is negative.
See the Amendment types guide.
POST
/
v1
/
taxInvoices
/
{issuanceKey}
/
amend
/
termination
Amend Tax Invoice - Cancellation of Contract
curl --request POST \
--url https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2024-08-24"
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload = { "date": "2024-08-24" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({date: '2024-08-24'})
};
fetch('https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination', 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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination",
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([
'date' => '2024-08-24'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload := strings.NewReader("{\n \"date\": \"2024-08-24\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2024-08-24\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2024-08-24\"\n}"
response = http.request(request)
puts response.read_body{
"issuanceKey": "8D529FAD3EBAE050B79CE943CCC7CEDE"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}Authorizations
Headers
Client reference ID for a tax invoice request. This header is optional. Enter a non-blank value between 1 and 255 characters. After this value is used with a tax invoice issuance API, the same API key cannot reuse it, regardless of the request content or endpoint. A duplicate returns 400 Bad Request with INVALID_REQUEST. If you do not receive a response, do not resend the request. Check the accepted request with the request status API.
Required string length:
1 - 255Pattern:
\SAmend Tax Invoice - Cancellation of Contract
curl --request POST \
--url https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2024-08-24"
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload = { "date": "2024-08-24" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({date: '2024-08-24'})
};
fetch('https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination', 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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination",
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([
'date' => '2024-08-24'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload := strings.NewReader("{\n \"date\": \"2024-08-24\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2024-08-24\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2024-08-24\"\n}"
response = http.request(request)
puts response.read_body{
"issuanceKey": "8D529FAD3EBAE050B79CE943CCC7CEDE"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}