Zoho Books - Create Contact
@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.
zoho_books_create_contact
Create a contact with given information.
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
Contact name

Display Name of the contact. Max-length [200]

 
string ·params.contact_name
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
//See the API docs: https://www.zoho.com/books/api/v3/#Contacts_Create_a_Contact

if (!params.organization_id || !params.contact_name) {
  throw new Error("Must provide organization_id and contact_name parameters.");
}

return await require("@pipedreamhq/platform").axios(this, {
  method: "post",
  url: `https://books.${auths.zoho_books.base_api_uri}/api/v3/contacts?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,
    website: params.website,
    language_code: params.language_code,
    contact_type: params.contact_type,
    customer_sub_type: params.customer_sub_type,
    credit_limit: params.credit_limit,
    tags: params.tags,
    is_portal_enabled: params.is_portal_enabled,
    currency_id: params.currency_id,
    payment_terms: params.payment_terms,
    payment_terms_label: params.payment_terms_label,
    notes: params.notes,
    billing_address: params.billing_address,
    shipping_address: params.shipping_address,
    contact_persons: params.contact_persons,
    default_templates: params.default_templates,
    custom_fields: params.custom_fields,
    opening_balance_amount: params.opening_balance_amount,
    exchange_rate: params.exchange_rate,
    vat_reg_no: params.vat_reg_no,
    owner_id: params.owner_id,
    tax_reg_no: params.tax_reg_no,
    country_code: params.country_code,
    vat_treatment: params.vat_treatment,
    tax_treatment: params.tax_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
  }
})