Invoices
An invoice is a statement of items sold by a seller. It includes all the details of sale including units of goods, price of goods sold, shipping details, etc.
Possible error codes:
Error Code | Message |
---|---|
1001 | Invoice Number already exist |
1002 | Contact Person does not exist |
3009 | The contact details of this invoice cannot be edited as the credits have been applied to it |
3010 | The customer for this invoice cannot be changed because payments have been recorded for this invoice |
4001 | Payments have been recorded for these invoices.Hence they cannot be deleted |
12008 | This invoice has credits applied to it. Hence, it cannot be deleted |
Attribute
Maximum length [100]
place of contact
given for the contact will be taken) business_gst
, business_none
, overseas
, consumer
.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.acquisition_of_merchandise
, return_discount_bonus
, general_expense
, buildings
, furniture_office_equipment
, transport_equipment
, computer_equipmentdye_molds_tools
, telephone_communication
, satellite_communication
, other_machinery_equipment
, hospital_expense
, medical_expense_disability
, funeral_expense
, donation
, interest_mortage_loans
, contribution_sar
, medical_expense_insurance_pormium
, school_transportation_expense
, deposit_saving_account
, payment_educational_service
, no_tax_effect
, payment
, payroll
.uk
. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered
, if he resides outside of the UK then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
).Date format yyyy-mm-dd
sent
, draft
, overdue
, paid
, void
, unpaid
, partially_paid
and viewed
Maximum length [100]
Maximum length [100]
Date format yyyy-mm-dd
Maximum length [100]
Maximum length [100]
entity_level
and item_level
.Maximum length [100]
Maximum length [2000]
Maximum length [100]
Maximum length [100]
Maximum length [100]
standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
Maximum length [200]
{
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"invoice_number": "INV-00003",
"is_pre_gst": true,
"place_of_supply": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "string",
"vat_reg_no": "string",
"date": "2013-11-17",
"status": "draft",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"payment_expected_date": " ",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000870911",
"982000000870915"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"exchange_rate": 1,
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"recurring_invoice_id": " ",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"line_items": [
{
"line_item_id": 982000000567021,
"item_id": 982000000030049,
"project_id": 90300000087378,
"project_name": "Sample Project",
"time_entry_ids": [],
"item_type": "goods",
"product_type": "goods",
"expense_id": " ",
"name": "Hard Drive",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"bcy_rate": 120,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount_amount": 0,
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120,
"sat_item_key_code": 71121206,
"unitkey_code": "E48"
}
],
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"sub_total": 153,
"tax_total": 22.6,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_reminder_enabled": true,
"payment_made": 26.91,
"credits_applied": 22.43,
"tax_amount_withheld": 0,
"balance": 40.6,
"write_off_amount": 0,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"shipping_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"customfield_id": 439910000000236000,
"data_type": "number",
"index": 1,
"label": "Record Number",
"show_on_pdf": true,
"show_in_all_pdf": true,
"value": 23
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"created_time": "2013-11-17T02:17:40-0800",
"last_modified_time": "2013-12-18T02:02:51-0800",
"attachment_name": " ",
"can_send_in_mail": true,
"salesperson_id": " ",
"salesperson_name": " ",
"invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
}
Create an invoice
Create an invoice for your customer.
OAuth Scope : ZohoInvoice.invoices.CREATE
Arguments
Maximum length [100]
place of contact
given for the contact will be taken)uk
. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered
, if he resides outside of the UK then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
). business_gst
, business_none
, overseas
, consumer
.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.acquisition_of_merchandise
, return_discount_bonus
, general_expense
, buildings
, furniture_office_equipment
, transport_equipment
, computer_equipmentdye_molds_tools
, telephone_communication
, satellite_communication
, other_machinery_equipment
, hospital_expense
, medical_expense_disability
, funeral_expense
, donation
, interest_mortage_loans
, contribution_sar
, medical_expense_insurance_pormium
, school_transportation_expense
, deposit_saving_account
, payment_educational_service
, no_tax_effect
, payment
, payroll
.Date format yyyy-mm-dd
Maximum length [100]
Maximum length [100]
Date format yyyy-mm-dd
Maximum length [100]
entity_level
and item_level
.Maximum length [200]
Maximum length [100]
Maximum length [2000]
Maximum length [100]
Maximum length [100]
Maximum length [25]
Maximum length [25]
standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
Maximum length [100]
Maximum length [25]
Maximum length [25]
Maximum length [25]
Query Parameters
true
and false
.true
and false
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices"
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/invoice/v3/invoices")
.post(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/invoice/v3/invoices", 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": "/invoice/v3/invoices",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"customer_id": 982000000567001,
"contact_persons": [
"982000000870911",
"982000000870915"
],
"invoice_number": "INV-00003",
"reference_number": " ",
"place_of_supply": "TN",
"vat_treatment": "string",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"gst_no": "22AAAAA0000A1Z5",
"template_id": 982000000000143,
"date": "2013-11-17",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"exchange_rate": 1,
"recurring_invoice_id": " ",
"invoiced_estimate_id": " ",
"salesperson_name": " ",
"custom_fields": [
{
"label": "Record Number",
"value": 23
}
],
"project_id": 90300000087378,
"line_items": [
{
"item_id": 982000000030049,
"project_id": 90300000087378,
"time_entry_ids": [],
"expense_id": " ",
"name": "Hard Drive",
"product_type": "goods",
"hsn_or_sac": 80540,
"sat_item_key_code": 71121206,
"unitkey_code": "E48",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_exemption_id": 11149000000061054,
"avatax_use_code": "string",
"avatax_exempt_no": "string",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"allow_partial_payments": true,
"custom_body": " ",
"custom_subject": " ",
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"reason": " ",
"tax_authority_id": 11149000000061052,
"tax_exemption_id": 11149000000061054,
"avatax_use_code": "string",
"avatax_tax_code": "string",
"avatax_exempt_no": "string"
}
{
"code": 0,
"message": "The invoice has been created.",
"invoice": {
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"invoice_number": "INV-00003",
"is_pre_gst": true,
"place_of_supply": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "string",
"vat_reg_no": "string",
"date": "2013-11-17",
"status": "draft",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"payment_expected_date": " ",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000870911",
"982000000870915"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"exchange_rate": 1,
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"recurring_invoice_id": " ",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"line_items": [
{
"line_item_id": 982000000567021,
"item_id": 982000000030049,
"project_id": 90300000087378,
"project_name": "Sample Project",
"time_entry_ids": [],
"item_type": "goods",
"product_type": "goods",
"expense_id": " ",
"name": "Hard Drive",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"bcy_rate": 120,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount_amount": 0,
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120,
"sat_item_key_code": 71121206,
"unitkey_code": "E48"
}
],
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"sub_total": 153,
"tax_total": 22.6,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_reminder_enabled": true,
"payment_made": 26.91,
"credits_applied": 22.43,
"tax_amount_withheld": 0,
"balance": 40.6,
"write_off_amount": 0,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"shipping_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"customfield_id": 439910000000236000,
"data_type": "number",
"index": 1,
"label": "Record Number",
"show_on_pdf": true,
"show_in_all_pdf": true,
"value": 23
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"created_time": "2013-11-17T02:17:40-0800",
"last_modified_time": "2013-12-18T02:02:51-0800",
"attachment_name": " ",
"can_send_in_mail": true,
"salesperson_id": " ",
"salesperson_name": " ",
"invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
}
}
List invoices
List all invoices with pagination.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
Maximum length [100]
item_name_startswith
and item_name_contains
. Maximum length [100]
item_description_startswith
and item_description_contains
. Maximum length [100]
Maximum length [100]
Maximum length [100]
custom_field_startswith
and custom_field_contains
Date format yyyy-mm-dd
. Variants: due_date_start, due_date_end, due_date_before and due_date_after
.Date format yyyy-mm-dd
. Variants: due_date_start, due_date_end, due_date_before and due_date_after
sent
, draft
, overdue
, paid
, void
, unpaid
, partially_paid
and viewed
Status.All
, Status.Sent
, Status.Draft
, Status.OverDue
, Status.Paid
, Status.Void
, Status.Unpaid
, Status.PartiallyPaid
, Status.Viewed
and Date.PaymentExpectedDate
Maximum length [100]
customer_name
, invoice_number
, date
, due_date
, total
, balance
and created_time
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices", 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": "/invoice/v3/invoices",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"invoices": [
{
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"customer_name": "Bowman & Co",
"customer_id": 982000000567001,
"status": "draft",
"invoice_number": "INV-00003",
"reference_number": " ",
"date": "2013-11-17",
"due_date": "2013-12-03",
"due_days": "Due in 14 day(s)",
"currency_id": 982000000000190,
"schedule_time": "",
"currency_code": "USD",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-17T02:17:40-0800",
"last_modified_time": "2013-12-18T02:02:51-0800",
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"payment_expected_date": " ",
"last_payment_date": " ",
"custom_fields": [
{
"customfield_id": 439910000000236000,
"data_type": "number",
"index": 1,
"label": "Record Number",
"show_on_pdf": true,
"show_in_all_pdf": true,
"value": 23
}
],
"documents": "",
"salesperson_id": " ",
"salesperson_name": " ",
"shipping_charge": 0,
"adjustment": 0,
"write_off_amount": 0,
"exchange_rate": 1
},
{...},
{...}
]
}
Update an invoice
Update an existing invoice. To delete a line item just remove it from the line_items list.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Arguments
Maximum length [100]
place of contact
given for the contact will be taken)uk
. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered
, if he resides outside of the UK then his VAT treatment is overseas
(For Pre Brexit, this can be split as eu_vat_registered
, eu_vat_not_registered
and non_eu
). business_gst
, business_none
, overseas
, consumer
.home_country_mexico
,border_region_mexico
,non_mexico
supported only for MX.acquisition_of_merchandise
, return_discount_bonus
, general_expense
, buildings
, furniture_office_equipment
, transport_equipment
, computer_equipmentdye_molds_tools
, telephone_communication
, satellite_communication
, other_machinery_equipment
, hospital_expense
, medical_expense_disability
, funeral_expense
, donation
, interest_mortage_loans
, contribution_sar
, medical_expense_insurance_pormium
, school_transportation_expense
, deposit_saving_account
, payment_educational_service
, no_tax_effect
, payment
, payroll
.Date format yyyy-mm-dd
Maximum length [100]
Maximum length [100]
Date format yyyy-mm-dd
Maximum length [100]
entity_level
and item_level
.Maximum length [200]
Maximum length [100]
Maximum length [2000]
Maximum length [100]
Maximum length [100]
Maximum length [25]
Maximum length [25]
standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
Maximum length [100]
Maximum length [25]
Maximum length [25]
Maximum length [25]
Query Parameters
true
and false
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114"
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/invoice/v3/invoices/982000000567114")
.put(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114", 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": "/invoice/v3/invoices/982000000567114",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"customer_id": 982000000567001,
"contact_persons": [
"982000000870911",
"982000000870915"
],
"invoice_number": "INV-00003",
"reference_number": " ",
"place_of_supply": "TN",
"vat_treatment": "string",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"gst_no": "22AAAAA0000A1Z5",
"template_id": 982000000000143,
"date": "2013-11-17",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"exchange_rate": 1,
"recurring_invoice_id": " ",
"invoiced_estimate_id": " ",
"salesperson_name": " ",
"custom_fields": [
{
"label": "Record Number",
"value": 23
}
],
"project_id": 90300000087378,
"line_items": [
{
"item_id": 982000000030049,
"project_id": 90300000087378,
"time_entry_ids": [],
"expense_id": " ",
"name": "Hard Drive",
"product_type": "goods",
"hsn_or_sac": 80540,
"sat_item_key_code": 71121206,
"unitkey_code": "E48",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_exemption_id": 11149000000061054,
"avatax_use_code": "string",
"avatax_exempt_no": "string",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"allow_partial_payments": true,
"custom_body": " ",
"custom_subject": " ",
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"reason": " ",
"tax_authority_id": 11149000000061052,
"tax_exemption_id": 11149000000061054,
"avatax_use_code": "string",
"avatax_tax_code": "string",
"avatax_exempt_no": "string"
}
{
"code": 0,
"message": "Invoice information has been updated.",
"invoice": {
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"invoice_number": "INV-00003",
"date": "2013-11-17",
"status": "draft",
"is_pre_gst": true,
"place_of_supply": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "string",
"vat_reg_no": "string",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"payment_expected_date": " ",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000870911",
"982000000870915"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"exchange_rate": 1,
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"recurring_invoice_id": " ",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"line_items": [
{
"line_item_id": 982000000567021,
"item_id": 982000000030049,
"project_id": 90300000087378,
"project_name": "Sample Project",
"item_type": "goods",
"product_type": "goods",
"time_entry_ids": [],
"expense_id": " ",
"expense_receipt_name": "string",
"name": "Hard Drive",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"bcy_rate": 120,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount_amount": 0,
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120,
"sat_item_key_code": 71121206,
"unitkey_code": "E48"
}
],
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"sub_total": 153,
"tax_total": 22.6,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_reminder_enabled": true,
"payment_made": 26.91,
"credits_applied": 22.43,
"tax_amount_withheld": 0,
"balance": 40.6,
"write_off_amount": 0,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"shipping_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"customfield_id": 439910000000236000,
"data_type": "number",
"index": 1,
"label": "Record Number",
"show_on_pdf": true,
"show_in_all_pdf": true,
"value": 23
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"created_time": "2013-11-17T02:17:40-0800",
"last_modified_time": "2013-12-18T02:02:51-0800",
"attachment_name": " ",
"can_send_in_mail": true,
"salesperson_id": " ",
"salesperson_name": " ",
"invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
}
}
Get an invoice
Get the details of an invoice.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
json
pdf
and html
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114", 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": "/invoice/v3/invoices/982000000567114",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"invoice": {
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"invoice_number": "INV-00003",
"is_pre_gst": true,
"place_of_supply": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "string",
"vat_reg_no": "string",
"date": "2013-11-17",
"status": "draft",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"due_date": "2013-12-03",
"payment_expected_date": " ",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000870911",
"982000000870915"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"exchange_rate": 1,
"discount": 0,
"is_discount_before_tax": true,
"discount_type": "item_level",
"is_inclusive_tax": false,
"recurring_invoice_id": " ",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"line_items": [
{
"line_item_id": 982000000567021,
"item_id": 982000000030049,
"project_id": 90300000087378,
"project_name": "Sample Project",
"item_type": "goods",
"product_type": "goods",
"time_entry_ids": [],
"expense_id": " ",
"expense_receipt_name": "string",
"name": "Hard Drive",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"bcy_rate": 120,
"rate": 120,
"quantity": 1,
"unit": " ",
"discount_amount": 0,
"discount": 0,
"tax_id": 982000000557028,
"tds_tax_id": "982000000557012",
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120,
"sat_item_key_code": 71121206,
"unitkey_code": "E48"
}
],
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": " ",
"sub_total": 153,
"tax_total": 22.6,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_reminder_enabled": true,
"payment_made": 26.91,
"credits_applied": 22.43,
"tax_amount_withheld": 0,
"balance": 40.6,
"write_off_amount": 0,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"shipping_address": {
"address": "4900 Hopyard Rd, Suite 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588,
"country": "U.S.A",
"fax": "+1-925-924-9600"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"customfield_id": 439910000000236000,
"data_type": "number",
"index": 1,
"label": "Record Number",
"show_on_pdf": true,
"show_in_all_pdf": true,
"value": 23
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"created_time": "2013-11-17T02:17:40-0800",
"last_modified_time": "2013-12-18T02:02:51-0800",
"attachment_name": " ",
"can_send_in_mail": true,
"salesperson_id": " ",
"salesperson_name": " ",
"invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
}
}
Delete an invoice
Delete an existing invoice. Invoices which have payment or credits note applied cannot be deleted.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/982000000567114", 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": "/invoice/v3/invoices/982000000567114",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "The invoice has been deleted."
}
Update custom field in existing invoices
Update the value of the custom field in existing invoices.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoice/982000000567114/customfields"
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/invoice/v3/invoice/982000000567114/customfields")
.put(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoice/982000000567114/customfields', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/invoice/v3/invoice/982000000567114/customfields", 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": "/invoice/v3/invoice/982000000567114/customfields",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoice/982000000567114/customfields \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
[
{
"customfield_id": "46000000012845",
"value": 23
}
]
{
"code": 0,
"message": "Custom Fields Updated Successfully"
}
Mark an invoice as sent
Mark a draft invoice as sent.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/sent"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/sent")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/sent', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/status/sent", headers=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": "/invoice/v3/invoices/982000000567114/status/sent",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/sent \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Invoice status has been changed to Sent."
}
Void an invoice
Mark an invoice status as void. Upon voiding, the payments and credits associated with the invoices will be unassociated and will be under customer credits.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/void"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/void")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/void', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/status/void", headers=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": "/invoice/v3/invoices/982000000567114/status/void",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/void \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Invoice status has been changed to Void."
}
Mark as draft
Mark a voided invoice as draft.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/draft"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/draft")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/draft', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/status/draft", headers=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": "/invoice/v3/invoices/982000000567114/status/draft",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/status/draft \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Status of invoice changed from void to draft"
}
Email an invoice
Email an invoice to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
OAuth Scope : ZohoInvoice.invoices.CREATE
Arguments
Query Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/email"
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/invoice/v3/invoices/982000000567114/email")
.post(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/email', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/email", 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": "/invoice/v3/invoices/982000000567114/email",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/email \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"send_from_org_email_id": false,
"to_mail_ids": [
"willsmith@bowmanfurniture.com"
],
"cc_mail_ids": [
"peterparker@bowmanfurniture.com"
],
"subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
"body": "Dear Customer, <br><br><br><br>Thanks for your business. <br><br><br><br>The invoice INV-00001 is attached with this email. You can choose the easy way out and <a href= https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=b9800228e011ae86abe71227bdacb3c68e1af685f647dcaed747812e0b9314635e55ac6223925675b371fcbd2d5ae3dc >pay online for this invoice.</a> <br><br>Here's an overview of the invoice for your reference. <br><br><br><br>Invoice Overview: <br><br>Invoice : INV-00001 <br><br>Date : 05 Aug 2013 <br><br>Amount : $541.82 <br><br><br><br>It was great working with you. Looking forward to working with you again.<br><br><br>\\nRegards<br>\\nZillium Inc<br>\\n\","
}
{
"code": 0,
"message": "Your invoice has been sent."
}
Get invoice email content
Get the email content of an invoice.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/email"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/email")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/email', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/email", 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": "/invoice/v3/invoices/982000000567114/email",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/email \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"data": {
"bcc_mails": "",
"gateways_configured": true,
"gateways_associated": true,
"bcc_mails_str": "",
"body": "Dear Customer, <br><br><br><br>Thanks for your business. <br><br><br><br>The invoice INV-00001 is attached with this email. You can choose the easy way out and <a href= https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=b9800228e011ae86abe71227bdacb3c68e1af685f647dcaed747812e0b9314635e55ac6223925675b371fcbd2d5ae3dc >pay online for this invoice.</a> <br><br>Here's an overview of the invoice for your reference. <br><br><br><br>Invoice Overview: <br><br>Invoice : INV-00001 <br><br>Date : 05 Aug 2013 <br><br>Amount : $541.82 <br><br><br><br>It was great working with you. Looking forward to working with you again.<br><br><br>\\nRegards<br>\\nZillium Inc<br>\\n\",",
"documents": "",
"customer_name": "Bowman & Co",
"attach_pdf": true,
"entity_id": "2000000007037",
"cc_mails_list": [
{
"user_name": "David Sujin",
"email": "string"
}
],
"file_name_without_extension": "INV-000004",
"to_mails_str": "",
"cc_mails_str": "",
"from_email": "",
"from_address": "",
"deprecated_placeholders_used": [],
"error_list": [],
"subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
"emailtemplates": [
{
"selected": true,
"name": "Default",
"email_template_id": "982000000000067"
}
],
"emailtemplate_documents": "",
"to_contacts": [
{
"first_name": "David",
"selected": true,
"phone": "+1-925-921-9201",
"email": "string",
"last_name": "Sujin",
"salutation": "Mr",
"contact_person_id": 982000000567003,
"mobile": "+1-4054439562"
}
],
"attachment_name": " ",
"file_name": "INV-00001.pdf",
"from_emails": [
{
"user_name": "David Sujin",
"selected": true,
"email": "string",
"organization_contact_id": "2000000002266",
"is_org_email_id": true
}
],
"customer_id": 982000000567001
}
}
Email invoices
Send invoices to your customers by email. Maximum of 10 invoices can be sent at once.
OAuth Scope : ZohoInvoice.invoices.CREATE
Arguments
Query Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/email?invoice_ids="
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/invoice/v3/invoices/email?invoice_ids=")
.post(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/email?invoice_ids=', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/invoice/v3/invoices/email?invoice_ids=", 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": "/invoice/v3/invoices/email?invoice_ids=",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/email?invoice_ids=' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"contacts": [
{
"contact_id": 460000000026049,
"email": true,
"snail_mail": false
}
]
}
{
"code": 0,
"message": "Mission accomplished! We've sent all the invoices."
}
Remind Customer
Remind your customer about an unpaid invoice by email. Reminder will be sent, only for the invoices which are in open or overdue status.
OAuth Scope : ZohoInvoice.invoices.CREATE
Arguments
Query Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder"
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/invoice/v3/invoices/982000000567114/paymentreminder")
.post(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/paymentreminder", 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": "/invoice/v3/invoices/982000000567114/paymentreminder",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/paymentreminder \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"to_mail_ids": [
"willsmith@bowmanfurniture.com"
],
"cc_mail_ids": [
"peterparker@bowmanfurniture.com"
],
"subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
"body": "<br>Dear Mr. Sujin, <br><br>You might have missed the payment date and the invoice is now overdue by 1 days.<br><br>----------------------------------------------------------------------------------------<br><h2>Invoice# : INV-000004 </h2>Dated : 23 Dec 2016<br>----------------------------------------------------------------------------------------<br><b> Due Date : 23 Dec 2016</b><br><b> Amount : $139.65</b><br>----------------------------------------------------------------------------------------<br><br><span>Not to worry at all ! </span>View your invoice and take the easy way out by making an <a href=\"https://invoice.zoho.com/portal/zilliuminc/index#/invoices/invoice/2000000007037 \">online payment</a>.<br><br>If you have already paid, please accept our apologies and kindly ignore this payment reminder.<br><br><br>Regards,<br><br>David Sujin<br>Zillium Inc<br><br><br>",
"send_from_org_email_id": false
}
{
"code": 0,
"message": "Your payment reminder has been sent."
}
Get payment reminder mail content
Get the mail content of the payment reminder.
OAuth Scope : ZohoInvoice.invoices.READ
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/paymentreminder", 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": "/invoice/v3/invoices/982000000567114/paymentreminder",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/paymentreminder \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"data": {
"bcc_mails": "",
"gateways_configured": true,
"gateways_associated": true,
"bcc_mails_str": "",
"body": "<br>Dear Mr. Sujin, <br><br>You might have missed the payment date and the invoice is now overdue by 1 days.<br><br>----------------------------------------------------------------------------------------<br><h2>Invoice# : INV-000004 </h2>Dated : 23 Dec 2016<br>----------------------------------------------------------------------------------------<br><b> Due Date : 23 Dec 2016</b><br><b> Amount : $139.65</b><br>----------------------------------------------------------------------------------------<br><br><span>Not to worry at all ! </span>View your invoice and take the easy way out by making an <a href=\"https://invoice.zoho.com/portal/zilliuminc/index#/invoices/invoice/2000000007037 \">online payment</a>.<br><br>If you have already paid, please accept our apologies and kindly ignore this payment reminder.<br><br><br>Regards,<br><br>David Sujin<br>Zillium Inc<br><br><br>",
"documents": "",
"customer_name": "Bowman & Co",
"attach_pdf": true,
"entity_id": "2000000007037",
"cc_mails_list": [
{
"user_name": "David Sujin",
"email": "string"
}
],
"file_name_without_extension": "INV-000004",
"to_mails_str": "",
"cc_mails_str": "",
"from_email": "",
"from_address": "",
"deprecated_placeholders_used": [],
"error_list": [],
"subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
"emailtemplates": [
{
"selected": true,
"name": "Default",
"email_template_id": "982000000000067"
}
],
"emailtemplate_documents": "",
"to_contacts": [
{
"first_name": "David",
"selected": true,
"phone": "+1-925-921-9201",
"email": "string",
"last_name": "Sujin",
"salutation": "Mr",
"contact_person_id": 982000000567003,
"mobile": "+1-4054439562"
}
],
"attachment_name": " ",
"file_name": "INV-00001.pdf",
"from_emails": [
{
"user_name": "David Sujin",
"selected": true,
"email": "string",
"organization_contact_id": "2000000002266",
"is_org_email_id": true
}
],
"customer_id": 982000000567001
}
}
Bulk invoice reminder
Remind your customer about an unpaid invoices by email. Reminder mail will be send, only for the invoices is in open or overdue status. Maximum 10 invoices can be reminded at once.
OAuth Scope : ZohoInvoice.invoices.CREATE
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/paymentreminder?invoice_ids="
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/paymentreminder?invoice_ids=")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/paymentreminder?invoice_ids=', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/paymentreminder?invoice_ids=", headers=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": "/invoice/v3/invoices/paymentreminder?invoice_ids=",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url 'https://www.zohoapis.com/invoice/v3/invoices/paymentreminder?invoice_ids=' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"info": {
"email_success_info": {
"message": "The reminders were successfully sent",
"sent_count": 2
},
"email_errors_info": [
{
"message": "The reminders were successfully sent",
"ids": "2000000007037"
}
],
"code": 4083
}
}
Bulk export Invoices
Maximum of 25 invoices can be exported in a single pdf.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/pdf?invoice_ids="
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/pdf?invoice_ids=")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/pdf?invoice_ids=', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/pdf?invoice_ids=", 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": "/invoice/v3/invoices/pdf?invoice_ids=",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/pdf?invoice_ids=' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success"
}
Bulk print invoices
Export invoices as pdf and print them. Maximum of 25 invoices can be printed.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/print?invoice_ids="
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/print?invoice_ids=")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/print?invoice_ids=', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/print?invoice_ids=", 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": "/invoice/v3/invoices/print?invoice_ids=",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/print?invoice_ids=' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success"
}
Disable payment reminder
Disable automated payment reminders for an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/disable"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/disable")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/disable', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/paymentreminder/disable", headers=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": "/invoice/v3/invoices/982000000567114/paymentreminder/disable",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/disable \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Reminders stopped."
}
Enable payment reminder
Enable automated payment reminders for an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/enable"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/enable")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/enable', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/paymentreminder/enable", headers=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": "/invoice/v3/invoices/982000000567114/paymentreminder/enable",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/paymentreminder/enable \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Reminders enabled."
}
Write off invoice
Write off the invoice balance amount of an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/writeoff", headers=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": "/invoice/v3/invoices/982000000567114/writeoff",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Invoice has been written off"
}
Cancel write off
Cancel the write off amount of an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff/cancel"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff/cancel")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff/cancel', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/writeoff/cancel", headers=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": "/invoice/v3/invoices/982000000567114/writeoff/cancel",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/writeoff/cancel \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "The write off done for this invoice has been cancelled."
}
Update billing address
Updates the billing address for this invoice alone.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/address/billing"
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/invoice/v3/invoices/982000000567114/address/billing")
.put(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/address/billing', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114/address/billing", 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": "/invoice/v3/invoices/982000000567114/address/billing",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/address/billing \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District",
"city": "Beijing",
"state": "Beijing",
"zip": 1000881,
"country": "string",
"fax": "+86-10-82637827"
}
{
"code": 0,
"message": "Billing address updated"
}
Update shipping address
Updates the shipping address for this invoice alone.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/address/shipping"
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/invoice/v3/invoices/982000000567114/address/shipping")
.put(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/address/shipping', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114/address/shipping", 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": "/invoice/v3/invoices/982000000567114/address/shipping",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/address/shipping \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"address": "4900 Hopyard Rd, Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 945881,
"country": "USA",
"fax": "+1-925-924-9600"
}
{
"code": 0,
"message": "Shipping address updated"
}
List invoice templates
Get all invoice pdf templates.
OAuth Scope : ZohoInvoice.invoices.READ
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/templates"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/templates")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/templates', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/templates", 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": "/invoice/v3/invoices/templates",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/templates \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"templates": [
{
"template_name": "Service - Classic",
"template_id": 982000000000143,
"template_type": "classic"
},
{...},
{...}
]
}
Update invoice template
Update the pdf template associated with the invoice.
OAuth Scope : ZohoInvoice.invoices.UPDATE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/templates/982000000000143"
type: PUT
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/templates/982000000000143")
.put(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/templates/982000000000143', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114/templates/982000000000143", headers=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": "/invoice/v3/invoices/982000000567114/templates/982000000000143",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 PUT \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/templates/982000000000143 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Invoice information has been updated."
}
List invoice payments
Get the list of payments made for an invoice.
OAuth Scope : ZohoInvoice.invoices.READ
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/payments", 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": "/invoice/v3/invoices/982000000567114/payments",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/payments \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"payments": [
{
"payment_id": 982000000567190,
"payment_number": 7,
"invoice_id": 982000000567114,
"invoice_payment_id": 982000000567192,
"payment_mode": "cash",
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"date": "2013-11-17",
"reference_number": " ",
"exchange_rate": 1,
"amount": 10.57,
"tax_amount_withheld": 0,
"online_transaction_id": "",
"is_single_invoice_payment": true
},
{...},
{...}
]
}
List credits applied
Get the list of credits applied for an invoice.
OAuth Scope : ZohoInvoice.invoices.READ
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/creditsapplied", 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": "/invoice/v3/invoices/982000000567114/creditsapplied",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/creditsapplied \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"credits": [
{
"creditnote_id": 982000000567134,
"creditnotes_invoice_id": "982000000567172",
"creditnotes_number": "CN-00001",
"credited_date": "2013-11-18",
"amount_applied": 12.2
},
{...},
{...}
]
}
Apply credits
Apply the customer credits either from credit notes or excess customer payments to an invoice. Multiple credits can be applied at once.
OAuth Scope : ZohoInvoice.invoices.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/credits"
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/invoice/v3/invoices/982000000567114/credits")
.post(body)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/credits', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/credits", 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": "/invoice/v3/invoices/982000000567114/credits",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/credits \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"invoice_payments": [
{
"payment_id": 460000000031003,
"amount_applied": 15
}
],
"apply_creditnotes": [
{
"creditnote_id": 460000000029003,
"amount_applied": 22.5
}
]
}
{
"code": 0,
"message": "Credits have been applied to the invoice(s)."
}
Delete a payment
Delete a payment made to an invoice.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments/982000000567192"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments/982000000567192")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/payments/982000000567192', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/982000000567114/payments/982000000567192", 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": "/invoice/v3/invoices/982000000567114/payments/982000000567192",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/payments/982000000567192 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "The payment has been deleted."
}
Delete applied credit
Delete a particular credit applied to an invoice.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172", 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": "/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/creditsapplied/982000000567172 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Credits applied to an invoice have been deleted."
}
Add attachment to an invoice
Attach a file to an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
Query Parameters
gif
, png
, jpeg
, jpg
, bmp
and pdf
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/attachment", headers=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": "/invoice/v3/invoices/982000000567114/attachment",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Your file has been successfully attached to the invoice."
}
Update attachment preference
Set whether you want to send the attached file while emailing the invoice.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true"
type: PUT
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true")
.put(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true", headers=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": "/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 PUT \
--url 'https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment?can_send_in_mail=true' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Invoice information has been updated."
}
Get an invoice attachment
Returns the file attached to the invoice.
OAuth Scope : ZohoInvoice.invoices.READ
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/attachment", 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": "/invoice/v3/invoices/982000000567114/attachment",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/attachment \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success"
}
Delete an attachment
Delete the file attached to the invoice.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/attachment', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/982000000567114/attachment", 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": "/invoice/v3/invoices/982000000567114/attachment",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/attachment \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Your file is no longer attached to the invoice."
}
Delete the expense receipt
Delete the expense receipts attached to an invoice which is raised from an expense.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/expenses//receipt"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/expenses//receipt")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/expenses//receipt', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/expenses//receipt", 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": "/invoice/v3/invoices/expenses//receipt",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/expenses//receipt \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "The attached expense receipt has been deleted."
}
Add comment
Add a comment for an invoice.
OAuth Scope : ZohoInvoice.invoices.CREATE
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments"
type: POST
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments")
.post(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/invoice/v3/invoices/982000000567114/comments", headers=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": "/invoice/v3/invoices/982000000567114/comments",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 POST \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "Comments added."
}
List invoice comments & history
Get the complete history and comments of an invoice.
OAuth Scope : ZohoInvoice.invoices.READ
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments")
.get()
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/invoice/v3/invoices/982000000567114/comments", 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": "/invoice/v3/invoices/982000000567114/comments",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/comments \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"comments": [
{
"comment_id": 982000000567019,
"invoice_id": 982000000567114,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"commented_by_id": 982000000554041,
"commented_by": "John David",
"comment_type": "system",
"operation_type": "Added",
"date": "2013-11-18",
"date_description": "yesterday",
"time": "2:38 AM",
"transaction_id": "982000000567204",
"transaction_type": "invoice"
},
{...},
{...}
]
}
Update comment
Update an existing comment of an invoice.
OAuth Scope : ZohoInvoice.invoices.UPDATE
Query Parameters
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019"
type: PUT
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019")
.put(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("PUT", "/invoice/v3/invoices/982000000567114/comments/982000000567019", headers=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": "/invoice/v3/invoices/982000000567114/comments/982000000567019",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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 PUT \
--url https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "success",
"comment_id": 982000000567019,
"invoice_id": 982000000567114,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"commented_by_id": 982000000554041,
"commented_by": "John David",
"date": "2013-11-17",
"date_description": "yesterday",
"time": "2:02 AM",
"comment_type": "system"
}
Delete a comment
Delete an invoice comment.
OAuth Scope : ZohoInvoice.invoices.DELETE
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019")
.delete(null)
.addHeader("X-com-zoho-invoice-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-invoice-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/invoice/v3/invoices/982000000567114/comments/982000000567019', 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 = {
'X-com-zoho-invoice-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/invoice/v3/invoices/982000000567114/comments/982000000567019", 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": "/invoice/v3/invoices/982000000567114/comments/982000000567019",
"headers": {
"X-com-zoho-invoice-organizationid": "10234695",
"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/invoice/v3/invoices/982000000567114/comments/982000000567019 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-invoice-organizationid: 10234695'
{
"code": 0,
"message": "The comment has been deleted."
}