Amend Tax Invoice - Cancellation of Contract
For a “Cancellation of Contract” amendment, you pass only the single date (write date) field, and the original issued invoice is offset. Amendment is not possible if an item’s supply cost on the original tax invoice is negative.
For details, 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": "2023-12-25"
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload = { "date": "2023-12-25" }
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: '2023-12-25'})
};
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' => '2023-12-25'
]),
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\": \"2023-12-25\"\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\": \"2023-12-25\"\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\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"issuanceKey": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}Authorizations
Base64-encode your API key and pass it. Enter the API key as the username and leave the password empty.
Path Parameters
Issuance request identifier
Body
application/json
Contract cancellation date
Example:
"2024-08-24"
Response
The IssuanceKey of the amended tax invoice
Example:
"8D529FAD3EBAE050B79CE943CCC7CEDE"
⌘I
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": "2023-12-25"
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/termination"
payload = { "date": "2023-12-25" }
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: '2023-12-25'})
};
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' => '2023-12-25'
]),
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\": \"2023-12-25\"\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\": \"2023-12-25\"\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\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"issuanceKey": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"traceId": "<string>"
}