curl --request POST \
--url https://api.nocotax.app/invoices/{id}/add_items \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"items": {
"title": "<string>",
"extratax_amount": 123,
"product": {
"tax_code": "<string>"
},
"quantity": 123,
"tax_included_amount": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"taxes": [
{
"jurisdiction": "<string>",
"percentage": "<string>",
"tax_id": "<string>",
"tax_exemption": {
"type": "<string>",
"legal_notice": "<string>"
}
}
],
"unit_extratax_amount": "<string>",
"unit_tax_included_amount": "<string>"
}
}
'import requests
url = "https://api.nocotax.app/invoices/{id}/add_items"
payload = { "items": {
"title": "<string>",
"extratax_amount": 123,
"product": { "tax_code": "<string>" },
"quantity": 123,
"tax_included_amount": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"taxes": [
{
"jurisdiction": "<string>",
"percentage": "<string>",
"tax_id": "<string>",
"tax_exemption": {
"type": "<string>",
"legal_notice": "<string>"
}
}
],
"unit_extratax_amount": "<string>",
"unit_tax_included_amount": "<string>"
} }
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({
items: {
title: '<string>',
extratax_amount: 123,
product: {tax_code: '<string>'},
quantity: 123,
tax_included_amount: 123,
period: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'},
taxes: [
{
jurisdiction: '<string>',
percentage: '<string>',
tax_id: '<string>',
tax_exemption: {type: '<string>', legal_notice: '<string>'}
}
],
unit_extratax_amount: '<string>',
unit_tax_included_amount: '<string>'
}
})
};
fetch('https://api.nocotax.app/invoices/{id}/add_items', 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.nocotax.app/invoices/{id}/add_items",
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([
'items' => [
'title' => '<string>',
'extratax_amount' => 123,
'product' => [
'tax_code' => '<string>'
],
'quantity' => 123,
'tax_included_amount' => 123,
'period' => [
'end' => '2023-11-07T05:31:56Z',
'start' => '2023-11-07T05:31:56Z'
],
'taxes' => [
[
'jurisdiction' => '<string>',
'percentage' => '<string>',
'tax_id' => '<string>',
'tax_exemption' => [
'type' => '<string>',
'legal_notice' => '<string>'
]
]
],
'unit_extratax_amount' => '<string>',
'unit_tax_included_amount' => '<string>'
]
]),
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://api.nocotax.app/invoices/{id}/add_items"
payload := strings.NewReader("{\n \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\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://api.nocotax.app/invoices/{id}/add_items")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nocotax.app/invoices/{id}/add_items")
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 \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "inv_1792060760adpk87e1e1e0",
"livemode": false,
"object": "invoice",
"amount_due": null,
"amount_overpaid": null,
"amount_paid": null,
"amount_remaining": null,
"automatic_tax_calculation": {
"enabled": false
},
"currency": "EUR",
"customer_data": {
"name": "Ernser, Mertz and O'Conner",
"billing_address": {
"city": "Port Chuckfort",
"line1": "93532 Anna Place",
"line2": "Suite 295",
"country": "CG",
"postal_code": "35988"
},
"tax_identification_number": "600182166",
"business_registration_number": "21315649000665"
},
"customer_id": "org_17920607608zaq6f93426d",
"customer_tax_registration_data": [],
"customer_tax_registration_ids": [],
"document_date": null,
"document_number": null,
"due_date": null,
"flow": "sales",
"issuer": null,
"legal_notices": null,
"locale": "en",
"memo": null,
"metadata": {},
"numbering_sequence_id": "ns_17920607608pi9997c8046",
"order_reference": null,
"payment_status": null,
"payment_terms": null,
"period": null,
"postpayment_credit_notes_amount": null,
"prepayment_credit_notes_amount": null,
"representations": {},
"status": "draft",
"status_transitions": {},
"supplier_country": "KM",
"supplier_data": {
"name": "Mayert-Wisozk",
"billing_address": {
"city": "Dachhaven",
"line1": "12217 Shaun Springs",
"line2": "Suite 713",
"country": "KM",
"postal_code": "74865-2792"
},
"tax_identification_number": "195892286",
"business_registration_number": "13385657500450"
},
"supplier_id": "org_17920607608l2v7a082cd6",
"supplier_tax_registration_data": [],
"supplier_tax_registration_ids": [],
"taxes": [],
"total_extratax_amount": 3232787,
"total_tax_amount": 0,
"total_tax_included_amount": 3232787,
"created_at": "2026-10-15T10:39:20.489Z",
"updated_at": "2026-10-15T10:39:20.489Z"
}Add items
Add items to a draft Invoice. Fails if the Invoice has already been finalized
curl --request POST \
--url https://api.nocotax.app/invoices/{id}/add_items \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"items": {
"title": "<string>",
"extratax_amount": 123,
"product": {
"tax_code": "<string>"
},
"quantity": 123,
"tax_included_amount": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"taxes": [
{
"jurisdiction": "<string>",
"percentage": "<string>",
"tax_id": "<string>",
"tax_exemption": {
"type": "<string>",
"legal_notice": "<string>"
}
}
],
"unit_extratax_amount": "<string>",
"unit_tax_included_amount": "<string>"
}
}
'import requests
url = "https://api.nocotax.app/invoices/{id}/add_items"
payload = { "items": {
"title": "<string>",
"extratax_amount": 123,
"product": { "tax_code": "<string>" },
"quantity": 123,
"tax_included_amount": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"taxes": [
{
"jurisdiction": "<string>",
"percentage": "<string>",
"tax_id": "<string>",
"tax_exemption": {
"type": "<string>",
"legal_notice": "<string>"
}
}
],
"unit_extratax_amount": "<string>",
"unit_tax_included_amount": "<string>"
} }
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({
items: {
title: '<string>',
extratax_amount: 123,
product: {tax_code: '<string>'},
quantity: 123,
tax_included_amount: 123,
period: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'},
taxes: [
{
jurisdiction: '<string>',
percentage: '<string>',
tax_id: '<string>',
tax_exemption: {type: '<string>', legal_notice: '<string>'}
}
],
unit_extratax_amount: '<string>',
unit_tax_included_amount: '<string>'
}
})
};
fetch('https://api.nocotax.app/invoices/{id}/add_items', 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.nocotax.app/invoices/{id}/add_items",
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([
'items' => [
'title' => '<string>',
'extratax_amount' => 123,
'product' => [
'tax_code' => '<string>'
],
'quantity' => 123,
'tax_included_amount' => 123,
'period' => [
'end' => '2023-11-07T05:31:56Z',
'start' => '2023-11-07T05:31:56Z'
],
'taxes' => [
[
'jurisdiction' => '<string>',
'percentage' => '<string>',
'tax_id' => '<string>',
'tax_exemption' => [
'type' => '<string>',
'legal_notice' => '<string>'
]
]
],
'unit_extratax_amount' => '<string>',
'unit_tax_included_amount' => '<string>'
]
]),
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://api.nocotax.app/invoices/{id}/add_items"
payload := strings.NewReader("{\n \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\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://api.nocotax.app/invoices/{id}/add_items")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nocotax.app/invoices/{id}/add_items")
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 \"items\": {\n \"title\": \"<string>\",\n \"extratax_amount\": 123,\n \"product\": {\n \"tax_code\": \"<string>\"\n },\n \"quantity\": 123,\n \"tax_included_amount\": 123,\n \"period\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"taxes\": [\n {\n \"jurisdiction\": \"<string>\",\n \"percentage\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"tax_exemption\": {\n \"type\": \"<string>\",\n \"legal_notice\": \"<string>\"\n }\n }\n ],\n \"unit_extratax_amount\": \"<string>\",\n \"unit_tax_included_amount\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "inv_1792060760adpk87e1e1e0",
"livemode": false,
"object": "invoice",
"amount_due": null,
"amount_overpaid": null,
"amount_paid": null,
"amount_remaining": null,
"automatic_tax_calculation": {
"enabled": false
},
"currency": "EUR",
"customer_data": {
"name": "Ernser, Mertz and O'Conner",
"billing_address": {
"city": "Port Chuckfort",
"line1": "93532 Anna Place",
"line2": "Suite 295",
"country": "CG",
"postal_code": "35988"
},
"tax_identification_number": "600182166",
"business_registration_number": "21315649000665"
},
"customer_id": "org_17920607608zaq6f93426d",
"customer_tax_registration_data": [],
"customer_tax_registration_ids": [],
"document_date": null,
"document_number": null,
"due_date": null,
"flow": "sales",
"issuer": null,
"legal_notices": null,
"locale": "en",
"memo": null,
"metadata": {},
"numbering_sequence_id": "ns_17920607608pi9997c8046",
"order_reference": null,
"payment_status": null,
"payment_terms": null,
"period": null,
"postpayment_credit_notes_amount": null,
"prepayment_credit_notes_amount": null,
"representations": {},
"status": "draft",
"status_transitions": {},
"supplier_country": "KM",
"supplier_data": {
"name": "Mayert-Wisozk",
"billing_address": {
"city": "Dachhaven",
"line1": "12217 Shaun Springs",
"line2": "Suite 713",
"country": "KM",
"postal_code": "74865-2792"
},
"tax_identification_number": "195892286",
"business_registration_number": "13385657500450"
},
"supplier_id": "org_17920607608l2v7a082cd6",
"supplier_tax_registration_data": [],
"supplier_tax_registration_ids": [],
"taxes": [],
"total_extratax_amount": 3232787,
"total_tax_amount": 0,
"total_tax_included_amount": 3232787,
"created_at": "2026-10-15T10:39:20.489Z",
"updated_at": "2026-10-15T10:39:20.489Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
id
Body
Show child attributes
Show child attributes
Response
successful
The amount due at the time the invoice is finalized, in the currency's smaller unit (eg. cents)
If the amount of transactions attached to this invoice exceed its final amount, the amount overpaid, in the currency's smaller unit (eg. cents)
The amount that has been paid, in the currency's smaller unit (eg. cents)
The amount still due, in the currency's smaller unit (eg. cents)
When automatic tax calculation is enabled, Nocotax automatically determines which tax rates must be applied to each item sold within the document.
Show child attributes
Show child attributes
The currency ISO code of the document
Show child attributes
Show child attributes
The ID of the organization this document refers as a customer
The customer’s tax registration data. They are displayed on the PDF of the document, and may be used for automatic tax calculation if enabled.
Show child attributes
Show child attributes
The customer’s tax registration IDs.
The date of issuance of this document. Its value is null when the document status is draft
The number of this document. Its value is null when the document status is draft
The date on which payment for this invoice is due
If the issuer of the document is not the supplier (in case of white-label or self billing), information on the issuer
Show child attributes
Show child attributes
Specifies the direction or role of the account owner in the invoicing transaction.
sales: The account owner is the supplier (i.e., the entity issuing the document for goods or services provided).
purchases: The account owner is the customer (i.e., the entity receiving the document for goods or services purchased).
platform: The account owner is a facilitator (i.e., the entity enabling the transaction between a customer and a supplier, such as a marketplace or intermediary).
sales, purchases, platform A text representing a legal notice to display on document representations
The locale used for this invoice representations (PDF)
Document memo
The ID of the numbering sequence this document is using to generate its number at finalization
The status of the invoice payment. open: The invoice has not been paid, but the due date is in the future. due: A payment for the total or a part of this invoice is expected. paid: This invoice has been paid.
open, due, paid Payment terms for this invoice. Represent the number of days after finalization so the invoice is due. Do not provide along with due_date
Show child attributes
Show child attributes
The period associated with this document. Used to recognize and defer revenue
Show child attributes
Show child attributes
Sum of amounts of all post-payment credit notes issued for this invoice
Sum of amounts of all pre-payment credit notes issued for this invoice
After finalization of a document, you can share its representations to whoever you want. This is a set of URLs you can share.
Show child attributes
Show child attributes
The status of the document, one of draft, finalized, cancelled
draft, finalized, cancelled Show child attributes
Show child attributes
The country (ISO alpha 2) of the country of issuance of the document
Show child attributes
Show child attributes
The ID of the organization this document refers as a supplier
The supplier's tax registration data. They are displayed on the PDF of the document, and may be used for automatic tax calculation if enabled.
Show child attributes
Show child attributes
The customer’s tax registration IDs.
The document's tax breakdown
Show child attributes
Show child attributes
Total extratax amount of the document, in the currency's smaller unit (eg. cents)
Total tax amount of the document, in the currency's smaller unit (eg. cents)
Total tax included of the document, in the currency's smaller unit (eg. cents)
