Recurring Invoices
Recurring invoices are invoices that are created and sent to your customers on a recurring schedule.
Attribute
business_gst
, business_none
, overseas
, consumer
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
supported only for UAE.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
).place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.uae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
.Supported values for Saudi Arabia are ksa_pvt_health
, ksa_pvt_edu
, ksa_reimbursed_expense
and ksa_house_sales
.standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
{
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_name": "Sujin Kumar",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "overseas",
"place_of_supply": "TN",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"sku": "LEV-JN-SL-36-GN",
"product_type": "goods",
"sat_item_key_code": 71121206,
"unitkey_code": "box",
"warehouse_id": "",
"warehouse_name": "string",
"warehouses": [
{
"warehouse_id": "",
"warehouse_name": "string",
"warehouse_stock_on_hand": ""
}
],
"tags": [
{
"is_tag_mandatory": false,
"tag_id": 982000000009070,
"tag_name": "Location",
"tag_option_id": 982000000002670,
"tag_option_name": "USA"
}
],
"tax_id": "903000000000356",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"project_name": "Sample Project",
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"avatax_exempt_no": "string",
"avatax_use_code": "string"
}
Create a Recurring Invoice
Creating a new recurring invoice.
OAuth Scope : ZohoBooks.invoices.CREATE
Arguments
place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.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
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
supported only for UAE.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
.false
for PPU-Single Payments and true
for PPD-Installment Paymentsuae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
.Supported values for Saudi Arabia are ksa_pvt_health
, ksa_pvt_edu
, ksa_reimbursed_expense
and ksa_house_sales
.standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
entity_level
and item_level
.parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/recurringinvoices?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"contact_persons": [
"90300000065322"
],
"place_of_supply": "TN",
"vat_treatment": "overseas",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"allow_partial_payments": true,
"gst_no": "22AAAAA0000A1Z5",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"recurrence_frequency": "weeks",
"repeat_every": 2,
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"product_type": "goods",
"hsn_or_sac": 80540,
"sat_item_key_code": 71121206,
"unitkey_code": "box",
"tags": [
{
"tag_id": 982000000009070,
"tag_option_id": 982000000002670
}
],
"warehouse_id": "",
"tax_id": "903000000000356",
"tds_tax_id": "903000000000357",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"header_name": "Electronic devices"
}
],
"tax_id": "903000000000356",
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"email": "benjamin.george@bowmanfurniture.com",
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"avatax_use_code": "string",
"avatax_exempt_no": "string",
"template_id": "90300000001336",
"payment_terms": 0,
"payment_terms_label": "Next 15 days",
"tax_authority_id": "903000006345",
"tax_exemption_id": "903000006345",
"exchange_rate": "5.5",
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"discount": "30%",
"is_discount_before_tax": true,
"discount_type": "entity level",
"is_inclusive_tax": false,
"item_id": "90300000081501",
"name": "Hard Drive",
"description": "prorated amount for items",
"rate": 0,
"quantity": 1,
"unit": "kgs",
"avatax_tax_code": " ",
"salesperson_name": " ",
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": "Rounding off"
}
{
"code": 0,
"message": "The recurring invoice has been created.",
"recurring_invoice": {
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_name": "Sujin Kumar",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "overseas",
"place_of_supply": "TN",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"sku": "LEV-JN-SL-36-GN",
"product_type": "goods",
"sat_item_key_code": 71121206,
"unitkey_code": "box",
"warehouse_id": "",
"warehouse_name": "string",
"warehouses": [
{
"warehouse_id": "",
"warehouse_name": "string",
"warehouse_stock_on_hand": ""
}
],
"tags": [
{
"is_tag_mandatory": false,
"tag_id": 982000000009070,
"tag_name": "Location",
"tag_option_id": 982000000002670,
"tag_option_name": "USA"
}
],
"tax_id": "903000000000356",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"project_name": "Sample Project",
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"avatax_exempt_no": "string",
"avatax_use_code": "string"
},
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Recurring Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
}
Update a recurring invoice using a custom field's unique value
A custom field will have unique values if it's configured to not accept duplicate values. Now, you can use that custom field's value to update a recurring invoice by providing its API name in the X-Unique-Identifier-Key header and its value in the X-Unique-Identifier-Value header. Based on this value, the corresponding recurring invoice will be retrieved and updated. Additionally, there is an optional X-Upsert header. If the X-Upsert header is true and the custom field's unique value is not found in any of the existing recurring invoices, a new recurring invoice will be created if the necessary payload details are available
OAuth Scope : ZohoBooks.invoices.UPDATE
Arguments
place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.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
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
supported only for UAE.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
.false
for PPU-Single Payments and true
for PPD-Installment Paymentsuae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
.Supported values for Saudi Arabia are ksa_pvt_health
, ksa_pvt_edu
, ksa_reimbursed_expense
and ksa_house_sales
.standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-Unique-Identifier-Key", "cf_unique_cf");
headers_data.put("X-Unique-Identifier-Value", "unique Value");
headers_data.put("X-Upsert", "true");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695")
.put(body)
.addHeader("X-Unique-Identifier-Key", "cf_unique_cf")
.addHeader("X-Unique-Identifier-Value", "unique Value")
.addHeader("X-Upsert", "true")
.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-Unique-Identifier-Key': 'cf_unique_cf',
'X-Unique-Identifier-Value': 'unique Value',
'X-Upsert': 'true',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-Unique-Identifier-Key': "cf_unique_cf",
'X-Unique-Identifier-Value': "unique Value",
'X-Upsert': "true",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/recurringinvoices?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices?organization_id=10234695",
"headers": {
"X-Unique-Identifier-Key": "cf_unique_cf",
"X-Unique-Identifier-Value": "unique Value",
"X-Upsert": "true",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-Unique-Identifier-Key: cf_unique_cf' \
--header 'X-Unique-Identifier-Value: unique Value' \
--header 'X-Upsert: true' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"contact_persons": [
"90300000065322"
],
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"recurrence_frequency": "weeks",
"repeat_every": 2,
"place_of_supply": "TN",
"vat_treatment": "overseas",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"allow_partial_payments": true,
"gst_no": "22AAAAA0000A1Z5",
"line_items": [
{
"item_id": "90300000081501",
"name": "Hard Drive",
"description": "prorated amount for items",
"rate": 0,
"quantity": 1,
"discount": "30%",
"tags": [
{
"tag_id": 982000000009070,
"tag_option_id": 982000000002670
}
],
"tax_id": "903000000000356",
"tds_tax_id": "903000000000357",
"tax_exemption_id": "903000006345",
"tax_treatment_code": "uae_others",
"avatax_tax_code": " ",
"avatax_use_code": "string",
"item_total": 100,
"product_type": "goods",
"hsn_or_sac": 80540,
"sat_item_key_code": 71121206,
"unitkey_code": "box",
"warehouse_id": "",
"project_id": 90300000087378,
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"email": "benjamin.george@bowmanfurniture.com",
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"tax_id": "903000000000356",
"tax_authority_id": "903000006345",
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"tax_exemption_id": "903000006345",
"avatax_use_code": "string",
"avatax_exempt_no": "string"
}
{
"code": 0,
"message": "success",
"recurring_invoice": {
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_name": "Sujin Kumar",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "overseas",
"place_of_supply": "TN",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"sku": "LEV-JN-SL-36-GN",
"product_type": "goods",
"warehouse_id": "",
"warehouse_name": "string",
"warehouses": [
{
"warehouse_id": "",
"warehouse_name": "string",
"warehouse_stock_on_hand": ""
}
],
"tags": [
{
"is_tag_mandatory": false,
"tag_id": 982000000009070,
"tag_name": "Location",
"tag_option_id": 982000000002670,
"tag_option_name": "USA"
}
],
"tax_id": "903000000000356",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"project_name": "Sample Project",
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"avatax_exempt_no": "string",
"avatax_use_code": "string"
}
}
List all Recurring Invoice
List the details of all recurring invoice.
OAuth Scope : ZohoBooks.invoices.READ
Query Parameters
item_name_startswith
and profileitemname_contains
.item_description_startswith
and item_description_contains
.active
, stopped
or expired
. Status.All
, Status.Active
, Status.Stopped
, Status.Expired
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/recurringinvoices?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Details of a recurring invoice is displayed successfully.",
"recurring_invoices": [
{
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"customer_name": "Sujin Kumar",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
}
},
{...},
{...}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Recurring Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
}
Update Recurring Invoice
Update the recurring invoice.
OAuth Scope : ZohoBooks.invoices.UPDATE
Arguments
place of contact
given for the contact will be taken)Supported codes for UAE emirates are : Abu Dhabi -
AB
,Ajman - AJ
,Dubai - DU
,Fujairah - FU
,Ras al-Khaimah - RA
,Sharjah - SH
,Umm al-Quwain - UM
Supported codes for the GCC countries are : United Arab Emirates -
AE
,Saudi Arabia - SA
,Bahrain - BH
,Kuwait - KW
,Oman - OM
,Qatar - QA
.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
.vat_registered
,vat_not_registered
,gcc_vat_not_registered
,gcc_vat_registered
,non_gcc
.dz_vat_registered
and dz_vat_not_registered
supported only for UAE.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
.false
for PPU-Single Payments and true
for PPD-Installment Paymentsuae_same_tax_group
, uae_reimbursed_expense
and uae_others
. Supported values for Bahrain are bahrain_same_tax_group
, bahrain_transfer_of_concern
, bahrain_disbursement
, bahrain_head_to_branch_transaction
, bahrain_warranty_repair_services
and bahrain_others
.Supported values for Saudi Arabia are ksa_pvt_health
, ksa_pvt_edu
, ksa_reimbursed_expense
and ksa_house_sales
.standard
and adaptive
paypal
, authorize_net
, payflow_pro
, stripe
, 2checkout
and braintree
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/recurringinvoices/90300000072369?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"contact_persons": [
"90300000065322"
],
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"recurrence_frequency": "weeks",
"repeat_every": 2,
"place_of_supply": "TN",
"vat_treatment": "overseas",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"allow_partial_payments": true,
"gst_no": "22AAAAA0000A1Z5",
"line_items": [
{
"item_id": "90300000081501",
"name": "Hard Drive",
"description": "prorated amount for items",
"rate": 0,
"quantity": 1,
"discount": "30%",
"tags": [
{
"tag_id": 982000000009070,
"tag_option_id": 982000000002670
}
],
"tax_id": "903000000000356",
"tds_tax_id": "903000000000357",
"tax_exemption_id": "903000006345",
"tax_treatment_code": "uae_others",
"avatax_tax_code": " ",
"avatax_use_code": "string",
"item_total": 100,
"product_type": "goods",
"hsn_or_sac": 80540,
"sat_item_key_code": 71121206,
"unitkey_code": "box",
"warehouse_id": "",
"project_id": 90300000087378,
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"email": "benjamin.george@bowmanfurniture.com",
"custom_fields": [
{
"value": "129890",
"label": "label",
"data_type": "text"
}
],
"tax_id": "903000000000356",
"tax_authority_id": "903000006345",
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"tax_exemption_id": "903000006345",
"avatax_use_code": "string",
"avatax_exempt_no": "string"
}
{
"code": 0,
"message": "success",
"recurring_invoice": {
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_name": "Sujin Kumar",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "overseas",
"place_of_supply": "TN",
"customer_id": "903000000000099",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"sku": "LEV-JN-SL-36-GN",
"product_type": "goods",
"warehouse_id": "",
"warehouse_name": "string",
"warehouses": [
{
"warehouse_id": "",
"warehouse_name": "string",
"warehouse_stock_on_hand": ""
}
],
"tags": [
{
"is_tag_mandatory": false,
"tag_id": 982000000009070,
"tag_name": "Location",
"tag_option_id": 982000000002670,
"tag_option_name": "USA"
}
],
"tax_id": "903000000000356",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"project_name": "Sample Project",
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"avatax_exempt_no": "string",
"avatax_use_code": "string"
}
}
Get a Recurring Invoice
Get the details of a recurring invoice.
OAuth Scope : ZohoBooks.invoices.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/recurringinvoices/90300000072369?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Details of a recurring invoice is displayed successfully.",
"recurring_invoice": {
"recurring_invoice_id": "90300000072369",
"recurrence_name": "MonthlyInvoice",
"reference_number": "12314",
"customer_name": "Sujin Kumar",
"customer_id": "903000000000099",
"company_name": "ABC Studios",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"cfdi_usage": "acquisition_of_merchandise",
"vat_treatment": "overseas",
"place_of_supply": "TN",
"customer_email": "emailid@abcstudios.com",
"customer_mobile_phone": 9876543210,
"customer_phone": "012-12345678",
"photo_url": "https://secure.gravatar.com/avatar/xxxxxxxxxx?&d=mm",
"currency_id": "982000000000190",
"currency_code": "USD",
"start_date": "2016-06-12",
"end_date": "2017-06-12",
"last_sent_date": "2016-06-12",
"next_invoice_date": "2016-06-17",
"line_items": [
{
"line_item_id": "982000000567021",
"quantity": 1,
"name": "Hard Drive",
"item_total": 100,
"sku": "LEV-JN-SL-36-GN",
"product_type": "goods",
"warehouse_id": "",
"warehouse_name": "string",
"warehouses": [
{
"warehouse_id": "",
"warehouse_name": "string",
"warehouse_stock_on_hand": ""
}
],
"tags": [
{
"is_tag_mandatory": false,
"tag_id": 982000000009070,
"tag_name": "Location",
"tag_option_id": 982000000002670,
"tag_option_name": "USA"
}
],
"tax_id": "903000000000356",
"tax_treatment_code": "uae_others",
"project_id": 90300000087378,
"project_name": "Sample Project",
"header_name": "Electronic devices",
"header_id": 982000000000670
}
],
"paid_invoices_total": 100,
"unpaid_invoices_balance": 100,
"billing_address": {
"address": "4900 Hopyard Rd, Suite 310",
"street2": "McMillan Avenue",
"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"
},
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
}
},
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Recurring Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
}
Delete a Recurring Invoice
Delete an existing recurring invoice.
OAuth Scope : ZohoBooks.invoices.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/recurringinvoices/90300000072369?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The recurring invoice is deleted successfully."
}
Stop a Recurring Invoice
Stop an active recurring invoice.
OAuth Scope : ZohoBooks.invoices.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/stop?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurring_invoice_id": "90300000072369"
}
{
"code": 0,
"message": "The recurring invoice has been stopped."
}
Resume a Recurring Invoice
Resume a stopped recurring invoice.
OAuth Scope : ZohoBooks.invoices.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/status/resume?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurring_invoice_id": "90300000072369"
}
{
"code": 0,
"message": "The recurring invoice has been resumed."
}
Update Recurring Invoice template
Update the pdf template associated with the recurring invoice.
OAuth Scope : ZohoBooks.invoices.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/templates/90300000001336?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"recurring_invoice_id": "90300000072369",
"template_id": "90300043563547"
}
{
"code": 0,
"message": "The template of the recurring invoice has been updated."
}
List Recurring Invoice History
Get the complete history and comments of a recurring invoice.
OAuth Scope : ZohoBooks.invoices.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/recurringinvoices/90300000072369/comments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The complete history and comments of a recurring invoice are displayed successfully.",
"comments": [
{
"comment_id": "982000000567019",
"recurring_invoice_id": "90300000072369",
"comment_description": "Recurring Invoice created",
"commented_by_id": "982000000554041",
"commented_by": "Sujin Kumar",
"comment_type": "system",
"operation_type": "Added",
"date": "2016-06-05",
"date_description": "yesterday",
"time": "2:02 AM",
"transaction_id": "903000002072369",
"transaction_type": "estimate"
},
{...},
{...}
]
}