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 contact to update.
async
(params, auths) => {
}
// See the API docs: https://www.zoho.com/books/api/v3/#Contacts_Update_a_Contact
if (!params.organization_id || !params.contact_id) {
throw new Error("Must provide organization_id, and contact_id parameters.");
}
return await require("@pipedreamhq/platform").axios(this, {
method: "put",
url: `https://books.zoho.com/api/v3/contacts/${params.contact_id}?organization_id=${params.organization_id}`,
headers: {
Authorization: `Zoho-oauthtoken ${auths.zoho_books.oauth_access_token}`,
},
data: {
contact_name: params.contact_name,
company_name: params.company_name,
payment_terms: params.payment_terms,
payment_terms_label: params.payment_terms_label,
contact_type: params.contact_type,
customer_sub_type: params.customer_sub_type,
currency_id: params.currency_id,
opening_balance_amount: params.opening_balance_amount,
exchange_rate: params.exchange_rate,
credit_limit: params.credit_limit,
tags: params.tags,
website: params.website,
owner_id: params.owner_id,
custom_fields: params.custom_fields,
billing_address: params.billing_address,
shipping_address: params.shipping_address,
contact_persons: params.contact_persons,
default_templates: params.default_templates,
notes: params.notes,
vat_reg_no: params.vat_reg_no,
tax_reg_no: params.tax_reg_no,
country_code: params.country_code,
tax_treatment: params.tax_treatment,
vat_treatment: params.vat_treatment,
place_of_contact: params.place_of_contact,
gst_no: params.gst_no,
gst_treatment: params.gst_treatment,
tax_authority_name: params.tax_authority_name,
avatax_exempt_no: params.avatax_exempt_no,
avatax_use_code: params.avatax_use_code,
tax_exemption_id: params.tax_exemption_id,
tax_exemption_code: params.tax_exemption_code,
tax_authority_id: params.tax_authority_id,
tax_id: params.tax_id,
is_taxable: params.is_taxable,
facebook: params.facebook,
twitter: params.twitter,
track_1099: params.track_1099,
tax_id_type: params.tax_id_type,
tax_id_value: params.tax_id_value
}
})