auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
this.lineitems = JSON.parse(`[
{
"item_id": "2392161000000075001"
}
]`);
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.
Search estimates by customer id.
async
(params, auths) => {
}
//See the API docs: https://www.zoho.com/books/api/v3/#Estimates_Create_an_Estimate
if (!params.organization_id || !params.customer_id || !params.item_id || !params.line_items) {
throw new Error("Must provide organization_id, customer_id, item_id, and line_items parameters.");
}
return await require("@pipedreamhq/platform").axios(this, {
method: "post",
url: `https://books.${auths.zoho_books.base_api_uri}/api/v3/estimates?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,
template_id: params.template_id,
place_of_supply: params.place_of_supply,
gst_treatment: params.gst_treatment,
gst_no: params.gst_no,
estimate_number: params.estimate_number,
reference_number: params.reference_number,
date: params.date,
expiry_date: params.expiry_date,
exchange_rate: params.exchange_rate,
discount: params.discount,
is_discount_before_tax: params.is_discount_before_tax,
discount_type: params.discount_type,
is_inclusive_tax: params.is_inclusive_tax,
custom_body: params.custom_body,
custom_subject: params.custom_subject,
salesperson_name: params.salesperson_name,
custom_fields: params.custom_fields,
line_items: params.line_items,
notes: params.notes,
terms: params.terms,
shipping_charge: params.shipping_charge,
adjustment: params.adjustment,
adjustment_description: params.adjustment_description,
tax_id: params.tax_id,
tax_exemption_id: params.tax_exemption_id,
tax_authority_id: params.tax_authority_id,
avatax_use_code: params.avatax_use_code,
avatax_exempt_no: params.avatax_exempt_no,
vat_treatment: params.vat_treatment,
tax_treatment: params.tax_treatment,
item_id: params.item_id,
line_item_id: params.line_item_id,
name: params.name,
description: params.description,
rate: params.rate,
unit: params.unit,
quantity: params.quantity,
project_id: params.project_id
},
params: {
send: params.send,
ignore_auto_number_generation: params.ignore_auto_number_generation
}
})