Zoho Books - Create Estimate
@sergio
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
nodejs
auth
to use OAuth tokens and API keys in code via theauths object
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps) => {
1
2
3
4
5
6
}
7
this.lineitems = JSON.parse(`[
        {
            "item_id": "2392161000000075001"
        }
    ]`);
steps.
zoho_books_create_estimate
Creates an estimate for your customer.
auth
(auths.zoho_books)
params
Organization id

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.

 
string ·params.organization_id
Customer id

Search estimates by customer id.

 
string ·params.customer_id
Optional
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
}
61
//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
  }
})