In Zoho Books, your business is termed as an organization. If you have multiple businesses, you simply set each of those up as an individual organization. Each organization is an independent Zoho Books Organization with it’s own organization ID, base currency, time zone, language, contacts, reports, etc.
The parameter organization_id
should be sent in with every API request to identify the organization.
The organization_id
can be obtained from the GET /organizations
API’s JSON response. Alternatively, it can be obtained from the Manage Organizations page in the admin console.
ID of the invoice to update.
ID of the customer the invoice has to be created.
async
(params, auths) => {
}
//See the API docs: https://www.zoho.com/books/api/v3/#Invoices_Update_an_invoice
if (!params.organization_id || !params.invoice_id) {
throw new Error("Must provide organization_id, and invoice_id parameters.");
}
return await require("@pipedreamhq/platform").axios(this, {
method: "put",
url: `https://books.${auths.zoho_books.base_api_uri}/api/v3/invoices/${params.invoice_id}?organization_id=${params.organization_id}`,
headers: {
Authorization: `Zoho-oauthtoken ${auths.zoho_books.oauth_access_token}`,
},
data: {
customer_id: params.customer_id,
contact_persons: params.contact_persons,
invoice_number: params.invoice_number,
place_of_supply: params.place_of_supply,
vat_treatment: params.vat_treatment,
tax_treatment: params.tax_treatment,
gst_treatment: params.gst_treatment,
gst_no: params.gst_no,
reference_number: params.reference_number,
template_id: params.template_id,
date: params.date,
payment_terms: params.payment_terms,
payment_terms_label: params.payment_terms_label,
due_date: params.due_date,
discount: params.discount,
is_discount_before_tax: params.is_discount_before_tax,
discount_type: params.discount_type,
is_inclusive_tax: params.is_inclusive_tax,
exchange_rate: params.exchange_rate,
recurring_invoice_id: params.recurring_invoice_id,
invoiced_estimate_id: params.invoiced_estimate_id,
salesperson_name: params.salesperson_name,
custom_fields: params.custom_fields,
line_items: params.line_items,
payment_options: params.payment_options,
allow_partial_payments: params.allow_partial_payments,
custom_body: params.custom_body,
custom_subject: params.custom_subject,
notes: params.notes,
terms: params.terms,
shipping_charge: params.shipping_charge,
adjustment: params.adjustment,
adjustment_description: params.adjustment_description,
reason: params.reason,
tax_authority_id: params.tax_authority_id,
tax_exemption_id: params.tax_exemption_id,
avatax_use_code: params.avatax_use_code,
avatax_exempt_no: params.avatax_exempt_no,
vat_treatment: params.vat_treatment,
tax_id: params.tax_id,
expense_id: params.expense_id,
salesorder_item_id: params.salesorder_item_id,
avatax_tax_code: params.avatax_tax_code,
line_item_id: params.line_item_id,
ignore_auto_number_generation: params.ignore_auto_number_generation
}
})