Customer Debit Notes
Customer Debit Note is a document sent to your client that indicates additional charges or adjustments to be made to the original invoice.
Create a customer debit note
Create a customer debit note for additional charges or adjustments to be made to the original invoice.
OAuth Scope : ZohoBooks.invoices.CREATE
Arguments
debit_note
Query Parameters
true
and false
.true
and false
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/invoices?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/invoices?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/invoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"customer_id": "982000000567001",
"type": "debit_note",
"currency_id": "982000000000001",
"contact_persons": [
"string"
],
"invoice_number": "DN-00001",
"date": "2013-11-17",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-02",
"exchange_rate": 1,
"location_id": "460000000038080",
"custom_fields": [
{
"customfield_id": "string",
"value": "string"
}
],
"reference_invoice_id": "982000000567005",
"reference_invoice_type": "registered",
"line_items": [
{
"item_id": "982000000030049",
"hsn_or_sac": "80540",
"location_id": "460000000038080",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"tax_id": "982000000567104"
}
]
}
{
"code": 0,
"message": "The debit note has been created.",
"invoice": {
"invoice_id": "982000000567114",
"invoice_number": "DN-00001",
"date": "2013-11-17",
"status": "draft",
"customer_id": "982000000567001",
"customer_name": "Bowman & Co",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-17T17:09:00+0530",
"last_modified_time": "2013-11-17T17:09:00+0530",
"line_items": [
{
"line_item_id": "982000000567115",
"item_id": "982000000030049",
"item_name": "Desktop Units",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"unit": "Nos",
"item_total": 40
}
],
"reference_invoice": {
"reference_invoice_number": "INV-000887",
"reference_invoice_status": "draft",
"reference_invoice_amount": 3.52,
"reference_invoice_id": "982000000567005"
}
}
}
List customer debit notes
Get a list of customer debit notes with helpful pagination, filtering, search, and sorting features. Perfect for viewing your debit note data in organized ways, whether you need to find specific debit notes or browse through your records.
OAuth Scope : ZohoBooks.invoices.READ
Query Parameters
item_name_startswith
and item_name_contains
variants. Maximum length is 100 characters. Useful for finding debit notes with specific products or services.item_description_startswith
and item_description_contains
variants. Maximum length is 100 characters. Useful for finding debit notes with specific item descriptions or technical specifications.custom_field_startswith
and custom_field_contains
date_start
, date_end
, date_before
and date_after
. Useful for finding debit notes within date ranges or specific time periods.due_date_start
, due_date_end
, due_date_before
and due_date_after
. Useful for finding overdue debit notes or debit notes due within specific periods.created_date_start
, created_date_end
, created_date_before
and created_date_after
. Useful for finding debit notes created within specific time periods or date ranges.sent
, draft
, overdue
, paid
, void
, unpaid
, partially_paid
and viewed
. Useful for finding debit notes in specific stages of the billing process.Type.DebitNote
.customer_name
, debit_note_number
, date
, due_date
, total
, balance
and created_time
. Use this parameter to organize debit note results in a specific order for better data analysis and reporting.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/invoices?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/invoices?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/invoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"debit_notes": [
{
"invoice_id": "982000000567114",
"invoice_number": "DN-00001",
"date": "2013-11-17",
"status": "draft",
"customer_id": "982000000567001",
"customer_name": "Bowman & Co",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-17T17:09:00+0530",
"last_modified_time": "2013-11-17T17:09:00+0530",
"line_items": [
{
"line_item_id": "982000000567115",
"item_id": "982000000030049",
"item_name": "Desktop Units",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"unit": "Nos",
"item_total": 40
}
],
"reference_invoice": {
"reference_invoice_number": "INV-000887",
"reference_invoice_status": "draft",
"reference_invoice_amount": 3.52,
"reference_invoice_id": "982000000567005"
}
},
{...},
{...}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "debit_notes",
"sort_column": "created_time",
"sort_order": "D"
}
}
Update a customer debit note
Update an existing customer debit note. To delete a line item just remove it from the line_items list.
OAuth Scope : ZohoBooks.invoices.UPDATE
Arguments
Path Parameters
Query Parameters
true
and false
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/invoices/987000000654321?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices/987000000654321?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"customer_id": "982000000567001",
"type": "debit_note",
"currency_id": "982000000000001",
"invoice_number": "DN-00001",
"template_id": "982000000000143",
"date": "2013-11-17",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-02",
"discount": 0,
"exchange_rate": 1,
"location_id": "460000000038080",
"custom_fields": [
{
"customfield_id": "string",
"value": "string"
}
],
"line_items": [
{
"item_id": "982000000030049",
"product_type": "goods",
"hsn_or_sac": "80540",
"location_id": "460000000038080",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"unit": "Nos",
"tax_id": "982000000567104",
"item_total": 40
}
]
}
{
"code": 0,
"message": "The debit note has been updated.",
"invoice": {
"invoice_id": "982000000567114",
"invoice_number": "DN-00001",
"date": "2013-11-17",
"status": "draft",
"customer_id": "982000000567001",
"customer_name": "Bowman & Co",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-17T17:09:00+0530",
"last_modified_time": "2013-11-17T17:09:00+0530",
"line_items": [
{
"line_item_id": "982000000567115",
"item_id": "982000000030049",
"item_name": "Desktop Units",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"unit": "Nos",
"item_total": 40
}
],
"reference_invoice": {
"reference_invoice_number": "INV-000887",
"reference_invoice_status": "draft",
"reference_invoice_amount": 3.52,
"reference_invoice_id": "982000000567005"
}
}
}
Get a customer debit note
Get the details of a customer debit note.
OAuth Scope : ZohoBooks.invoices.READ
Path Parameters
Query Parameters
json
pdf
and html
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/invoices/987000000654321?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices/987000000654321?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"invoice": {
"invoice_id": "982000000567114",
"invoice_number": "DN-00001",
"date": "2013-11-17",
"status": "draft",
"customer_id": "982000000567001",
"customer_name": "Bowman & Co",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-17T17:09:00+0530",
"last_modified_time": "2013-11-17T17:09:00+0530",
"line_items": [
{
"line_item_id": "982000000567115",
"item_id": "982000000030049",
"item_name": "Desktop Units",
"description": "Desktop Units",
"rate": 20,
"quantity": 2,
"unit": "Nos",
"item_total": 40
}
],
"reference_invoice": {
"reference_invoice_number": "INV-000887",
"reference_invoice_status": "draft",
"reference_invoice_amount": 3.52,
"reference_invoice_id": "982000000567005"
}
}
}
Delete a customer debit note
Delete an existing customer debit note. Debit notes which have payment or credits note applied cannot be deleted.
OAuth Scope : ZohoBooks.invoices.DELETE
Path Parameters
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/invoices/987000000654321?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices/987000000654321?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/invoices/987000000654321?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The invoice has been deleted."
}