API Docs
/
No Results Found
Customer Debit Notes

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.

Download Customer Debit Notes OpenAPI Document
End Points
Create a customer debit note
List customer debit notes
Update a customer debit note
Get a customer debit note
Delete a customer debit note

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

customer_id
string
(Required)
Unique identifier for the customer
type
string
(Required)
Type of the document. For customer debit notes, this should be debit_note
currency_id
string
Unique identifier for the currency
contact_persons
array
List of contact person IDs
invoice_number
string
Debit note number
date
string
Debit note date
payment_terms
integer
Payment terms in days
payment_terms_label
string
Payment terms label
due_date
string
Due date
exchange_rate
number
Exchange rate
location_id
string
Location ID
custom_fields
array
Show Sub-Attributes arrow
customfield_id
string
value
string
reference_invoice_id
string
(Required)
Invoice ID
reference_invoice_type
string
Invoice type description
line_items
array
(Required)
Show Sub-Attributes arrow
item_id
string
(Required)
Item ID
hsn_or_sac
string
HSN or SAC code
location_id
string
Location ID
description
string
Description
rate
number
Rate
quantity
number
Quantity
tax_id
string
Tax ID

Query Parameters

organization_id
string
(Required)
Organization ID for the request
send
boolean
Send the debit note to the contact person(s) associated with the debit note. Allowed values true and false.
ignore_auto_number_generation
boolean
Ignore auto debit note number generation for this debit note. This mandates the debit note number. Allowed values true and false

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" } ] }

Response Example

{ "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

organization_id
string
(Required)
Organization ID for the request
item_name
string
Search debit notes by item name. Filters debit notes based on product or service names in debit note line items. Supports item_name_startswith and item_name_contains variants. Maximum length is 100 characters. Useful for finding debit notes with specific products or services.
item_id
string
Search debit notes by item ID. Filters debit notes based on the unique identifier of specific products or services in line items. Use the GET `/items` API to find available item IDs. Useful for finding all debit notes containing a specific product or service.
item_description
string
Search debit notes by item description. Filters debit notes based on detailed descriptions of products or services in line items. Supports 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.
customer_name
string
Search debit notes by customer name. Filters debit notes based on the business or individual name associated with the debit note. Maximum length is 100 characters. Useful for finding all debit notes for a specific customer or generating customer reports.
email
string
Search debit notes by customer email address. Filters debit notes based on the email address of the customer or contact person. Maximum length is 100 characters. Useful for finding debit notes for specific customers or generating customer segment reports.
total
string
Search debit notes by total amount. Filters debit notes based on the final debit note amount including taxes, discounts, and adjustments. Useful for finding debit notes within specific price ranges or identifying high-value transactions.
balance
string
Search debit notes by outstanding balance. Filters debit notes based on the remaining unpaid amount owed by the customer. Useful for finding overdue debit notes, tracking receivables, or generating aging reports.
custom_field
string
Search debit notes by custom fields.Variants: custom_field_startswith and custom_field_contains
date
string
Search debit notes by debit note date. Filters debit notes based on the date they were created. Use yyyy-mm-dd format. Supports variants: date_start, date_end, date_before and date_after. Useful for finding debit notes within date ranges or specific time periods.
due_date
string
Search debit notes by due date. Filters debit notes based on the payment due date. Use yyyy-mm-dd format. Supports variants: 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
string
Search debit notes by creation date. Filters debit notes based on the date they were created. Use yyyy-mm-dd format. Supports variants: 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.
last_modified_time
string
Search debit notes modified after a specific time. Filters debit notes based on their last modification timestamp. Use YYYY-MM-DDTHH:MM:SS-UTC format. Useful for finding recently updated debit notes or syncing data changes. Example : 2023-11-18T02:02:51-0800, 2025-19-19T02:02:51%2B0800
status
string
Search debit notes by status. Filters debit notes based on their current state in the billing workflow. Allowed values: sent, draft, overdue, paid, void, unpaid, partially_paid and viewed. Useful for finding debit notes in specific stages of the billing process.
customer_id
string
Search debit notes by customer ID. Filters debit notes based on the unique identifier of the customer for whom the debit note was created. Use the customer ID returned by the Contacts API to find all debit notes for a specific customer.
filter_by
string
Filter needs to be Type.DebitNote.
search_text
string
Search debit notes by debit note number, purchase order, or customer name. This parameter performs a general search across multiple debit note fields. Maximum length is 100 characters. Useful for quick searches when you know part of the debit note information but are unsure which specific field to search.
sort_column
string
Sort debit notes by specific column. Allowed values: 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.
page
integer
Page number to be fetched from the paginated results. Default value is 1. Use this parameter along with per_page to navigate through large sets of debit note data. Useful for implementing pagination in your application.
per_page
integer
Number of records to be fetched per page. Default value is 200. Use this parameter to control the size of each page of results. Maximum value is 200. Useful for optimizing data transfer and improving application performance.

Request Example

Click to copy
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'

Response Example

{ "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

customer_id
string
(Required)
Unique identifier for the customer
type
string
Type of the document. For customer debit notes, this should be debit_note
currency_id
string
Unique identifier for the currency
invoice_number
string
Debit note number
template_id
string
Template ID
date
string
Debit note date
payment_terms
integer
Payment terms in days
payment_terms_label
string
Payment terms label
due_date
string
Due date
discount
number
Discount amount
exchange_rate
number
Exchange rate
location_id
string
Location ID
custom_fields
array
Show Sub-Attributes arrow
customfield_id
string
value
string
line_items
array
(Required)
Show Sub-Attributes arrow
item_id
string
(Required)
Item ID
product_type
string
Product type
hsn_or_sac
string
HSN or SAC code
location_id
string
Location ID
description
string
Description
rate
number
Rate
quantity
number
Quantity
unit
string
Unit
tax_id
string
Tax ID
item_total
number
Item total

Path Parameters

debit_note_id
string
(Required)
Unique identifier for the debit note

Query Parameters

organization_id
string
(Required)
Organization ID for the request
ignore_auto_number_generation
boolean
Ignore auto debit note number generation for this debit note. This mandates the debit note number. Allowed values true and false

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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 } ] }

Response Example

{ "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

debit_note_id
string
(Required)
Unique identifier for the debit note

Query Parameters

organization_id
string
(Required)
Organization ID for the request
print
boolean
Print the exported pdf.
accept
string
Get the details of a particular debit note in formats such as json/ pdf/ html. Default format is json. Allowed values json pdf and html

Request Example

Click to copy
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'

Response Example

{ "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

debit_note_id
string
(Required)
Unique identifier for the debit note

Query Parameters

organization_id
string
(Required)
Organization ID for the request

Request Example

Click to copy
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'

Response Example

{ "code": 0, "message": "The invoice has been deleted." }