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.
async
(params, auths) => {
}
//See the API docs: https://www.zoho.com/books/api/v3/#Invoices_List_invoices
if (!params.organization_id) {
throw new Error("Must provide organization_id parameter.");
}
return await require("@pipedreamhq/platform").axios(this, {
method: "get",
url: `https://books.${auths.zoho_books.base_api_uri}/api/v3/invoices?organization_id=${params.organization_id}`,
headers: {
Authorization: `Zoho-oauthtoken ${auths.zoho_books.oauth_access_token}`,
},
params: {
invoice_number: params.invoice_number,
item_name: params.item_name,
item_id: params.item_id,
item_description: params.item_description,
reference_number: params.reference_number,
customer_name: params.customer_name,
recurring_invoice_id: params.recurring_invoice_id,
email: params.email,
total: params.total,
balance: params.balance,
custom_field: params.custom_field,
date: params.date,
due_date: params.due_date,
last_modified_time: params.last_modified_time,
status: params.status,
customer_id: params.customer_id,
filter_by: params.filter_by,
search_text: params.search_text,
sort_column: params.sort_column,
page : params.page,
per_page :params.per_page
}
})