Amend Tax Invoice - Return of Goods
Pass the returned amount as negative items, and Bolta amends the invoice with the original tax type. The item supply costs must add up to a negative total. The API reuses the original’s tax type, receipt or claim purpose, supplier, supplied party, and trustee, so set each item’s tax (tax) to match the original tax type.
Item taxes must either all be integers or all be null or omitted. If the total tax is neither zero nor null, it must be negative.
See the Amendment types guide.
The API removes invisible characters from the request text but keeps tabs, line feeds, and carriage returns. It rejects supplementary characters above U+FFFF, such as emoji, with 400. See Unsupported characters.
curl --request POST \
--url https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2026-05-27",
"items": [
{
"date": "2026-05-27",
"name": "Returned item",
"unitPrice": null,
"quantity": null,
"supplyCost": -30000,
"tax": -3000,
"specification": null,
"description": null
}
]
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return"
payload = {
"date": "2026-05-27",
"items": [
{
"date": "2026-05-27",
"name": "Returned item",
"unitPrice": None,
"quantity": None,
"supplyCost": -30000,
"tax": -3000,
"specification": None,
"description": None
}
]
}
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: '2026-05-27',
items: [
{
date: '2026-05-27',
name: 'Returned item',
unitPrice: null,
quantity: null,
supplyCost: -30000,
tax: -3000,
specification: null,
description: null
}
]
})
};
fetch('https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return', 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/return",
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' => '2026-05-27',
'items' => [
[
'date' => '2026-05-27',
'name' => 'Returned item',
'unitPrice' => null,
'quantity' => null,
'supplyCost' => -30000,
'tax' => -3000,
'specification' => null,
'description' => null
]
]
]),
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/return"
payload := strings.NewReader("{\n \"date\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\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/return")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return")
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\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\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.
1 - 255\SBody
curl --request POST \
--url https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2026-05-27",
"items": [
{
"date": "2026-05-27",
"name": "Returned item",
"unitPrice": null,
"quantity": null,
"supplyCost": -30000,
"tax": -3000,
"specification": null,
"description": null
}
]
}
'import requests
url = "https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return"
payload = {
"date": "2026-05-27",
"items": [
{
"date": "2026-05-27",
"name": "Returned item",
"unitPrice": None,
"quantity": None,
"supplyCost": -30000,
"tax": -3000,
"specification": None,
"description": None
}
]
}
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: '2026-05-27',
items: [
{
date: '2026-05-27',
name: 'Returned item',
unitPrice: null,
quantity: null,
supplyCost: -30000,
tax: -3000,
specification: null,
description: null
}
]
})
};
fetch('https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return', 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/return",
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' => '2026-05-27',
'items' => [
[
'date' => '2026-05-27',
'name' => 'Returned item',
'unitPrice' => null,
'quantity' => null,
'supplyCost' => -30000,
'tax' => -3000,
'specification' => null,
'description' => null
]
]
]),
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/return"
payload := strings.NewReader("{\n \"date\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\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/return")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xapi.bolta.io/v1/taxInvoices/{issuanceKey}/amend/return")
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\": \"2026-05-27\",\n \"items\": [\n {\n \"date\": \"2026-05-27\",\n \"name\": \"Returned item\",\n \"unitPrice\": null,\n \"quantity\": null,\n \"supplyCost\": -30000,\n \"tax\": -3000,\n \"specification\": null,\n \"description\": null\n }\n ]\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>"
}