- Introduction
- OAuth
- HTTP Methods
- Response
- Errors
- Pagination
- Organizations
- Contacts
- Contact Persons
- Item Groups
- Items
- Composite Items
- Item Adjustments
- Transfer Orders
- Sales Orders
- Packages
- Shipment Orders
- Invoices
- Overview
- Create an invoice
- List invoices
- Update an invoice
- Get an invoice
- Delete an invoice
- Mark an invoice as sent
- Void an invoice
- Mark as draft
- Email an invoice
- Get invoice email content
- Email invoices
- Get payment reminder mail content
- Bulk export Invoices
- Bulk print invoices
- Disable payment reminder
- Enable payment reminder
- Write off invoice
- Cancel write off
- Update billing address
- Update shipping address
- List invoice templates
- Update invoice template
- List invoice payments
- List credits applied
- Apply credits
- Delete a payment
- Delete applied credit
- Add attachment to an invoice
- Update attachment preference
- Get an invoice attachment
- Delete an attachment
- Add comment
- List invoice comments & history
- Update comment
- Delete a comment
- Retainer Invoices
- Overview
- Create a retainer invoice
- List a retainer invoices
- update a retainer invoice
- Get a retainer invoice
- Delete a retainer invoice
- Mark a retainer invoice as sent
- Update retainer invoice template
- Void a retainer invoice
- Mark as draft
- Submit a retainer invoice for approval
- Approve a retainer invoice.
- Email a retainer invoice
- Get retainer invoice email content
- Update billing address
- List retainer invoice templates
- Add attachment to a retainer invoice
- Get a retainer invoice attachment
- Delete an attachment
- Add comment
- List retainer invoice comments & history
- Update comment
- Delete a comment
- Customer Payments
- Sales Returns
- Credit Notes
- Overview
- Create a credit note
- List all Credit Notes
- Update a credit note
- Get a credit note
- Delete a credit note
- Email a credit note
- Get email content
- Void a Credit Note
- Convert Credit Note to Draft
- Convert credit note to Open
- Submit a credit note for approval
- Approve a credit note
- Email history
- Update billing address
- Update Shipping address
- List the credit note templates
- Update a credit note template
- Apply credits to invoices
- List invoices credited
- Delete credits applied to an invoice
- Add a comment
- List credit note comments & history
- Delete a Comment
- List credit note refunds
- Refund credit note
- List refunds of a credit note
- Update credit note refund
- Get credit note refund
- Delete credit note refund
- Purchase Orders
- Purchase Receives
- Bills
- Vendor Credits
- Overview
- Create a vendor credit
- List vendor credits
- Update vendor credit
- Get vendor credit
- Delete vendor credit
- Convert to open
- Void vendor credit
- Submit a Vendor credit for approval
- Approve a Vendor credit
- Apply credits to a bill
- List bills credited
- Delete bills credited
- Refund a vendor credit
- List refunds of a vendor credit
- Update vendor credit refund
- Get vendor credit refund
- Delete vendor credit refund
- List vendor credit refunds
- Add a comment
- List vendor credit comments & history
- Delete a comment
- Warehouse Settings
- Price Lists
- Taxes
Contacts
A contact is either a customer or vendor. A contact can be an individual or a business in general.
Attribute
- contact_idstring
Contact ID of the contact
- contact_namestring
Name of the contact. This can be the name of an organisation or the name of an individual. Maximum length [200]
- company_namestring
Name of the conact's company. Maximum length [200]
- has_transactionboolean
Boolean to check if the customer has a history of transaction
- contact_typestring
Type of the contact. Allowed values are
and - is_linked_with_zohocrmboolean
To check if the customer account is linked to the crm
- websitestring
Website of the contact.
- primary_contact_idstring
Primary contact ID for a contact. This can be a contact person's ID as well.
- payment_termsinteger
Net payment term for the customer.
- payment_terms_labelstring
Label for the paymet due details.
- currency_idstring
Currency ID of the customer's currency.
- currency_codestring
Currency code of the currency in which the customer wants to pay. If currency_code is not specified here, the currency chosen in your Zoho Subscriptions organization will be used for billing. currency_id and currency_symbol are set automatically in accordance to the currency_code.
- currency_symbolstring
Symbol of the currency of the contact_type
- language_codestring
language of a contact. allowed values
- outstanding_receivable_amountinteger
Outsatnding amount with the contact, which is due for receipt
- outstanding_receivable_amount_bcyinteger
outstanding receivable in base currency
- unused_credits_receivable_amountinteger
Our Unused credits with the vendor which is receivable
- unused_credits_receivable_amount_bcyinteger
receivable unused credits in base currency
- statusstring
The status of the contact.
- payment_reminder_enabledboolean
To check if a payment reminder service is enabled for the contact
- custom_fieldsarray
Custom fields or Additional of the contact which we can create to add more information.
Show Sub-Attributes
- valuestring
Value of the custom field.
- indexinteger
Index of the custom field. It can hold any value from 1 to 10.
- labelstring
Label of the custom field.
- billing_addressobject
Billing address of the contact.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- shipping_addressobject
Customer's shipping address to which the goods must be delivered.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- facebookstring
Facebook profile account of the contact. Maximum length [100]
- twitterstring
Twitter account of the contact. MAximum length [100]
- contact_personsarray
Person/Individual who represents a company
Show Sub-Attributes
- salutationstring
Salutation for the contact
- first_namestring
First name of the contact. Maximum length [100]
- last_namestring
Last name of the contact. Maximum length [100]
- emailstring
Search contacts by email id of the contact person. Variants: address_startswith and address_contains
- phonestring
Search contacts by phone number of the contact person. Variants: phone_startswith and phone_contains
- mobilestring
Search contacts by mobile number of the contact person.
- is_primary_contactboolean
To mark contact person as primary for contact. Allowed value is true only.
- default_templatesobject
Show Sub-Attributes
- invoice_template_idstring
ID of the Invoice template used
- invoice_template_namestring
Name of the invoice template used
- estimate_template_idstring
ID of the estimate template used
- estimate_template_namestring
Name of the estimate template used
- creditnote_template_idstring
ID of teh credit note template used
- creditnote_template_namestring
Name of the credit note template used
- invoice_email_template_idstring
ID of the invoice email tempalte used
- invoice_email_template_namestring
Name of the Invoice email template used
- estimate_email_template_idstring
ID of the estimate email template used
- estimate_email_template_namestring
Name of the estimate email template used
- creditnote_email_template_idstring
ID of the credit note email template
- creditnote_email_template_namestring
Name of the credit note email template
- notesstring
Commennts about the payment made by the contact.
- created_timestring
Time at which the contact was created.
- last_modified_timestring
Time at which the contact was last modified
- is_taxableboolean
Boolean to track the taxability of the customer.
- tax_idboolean
ID of the tax or tax group that can be collected from the contact. Tax can be given only if
is . - tax_namestring
Name of the tax
- tax_percentagedouble
Percentage of the tax
- tax_exemption_idstring
ID of the tax exemption.
- tax_exemption_codestring
Enter tax exemption code
- place_of_contactstring
Location of the contact. (This node identifies the place of supply and source of supply when invoices/bills are raised for the customer/vendor respectively. This is not applicable for Overseas contacts)
- gst_nostring
15 digit GST identification number of the customer/vendor.
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are
, , , .
- POST /inventory/v1/contacts
- GET /inventory/v1/contacts
- PUT /inventory/v1/contacts/{contact_id}
- GET /inventory/v1/contacts/{contact_id}
- DELETE /inventory/v1/contacts/{contact_id}
- POST /inventory/v1/contact/{contact_id}/active
- POST /inventory/v1/contacts/{contact_id}/inactive
- POST /inventory/v1/contacts/{contact_id}/statements/email
- GET /inventory/v1/contacts/{contact_id}/statements/email
- POST /inventory/v1/contacts/{contact_id}/email
- GET /inventory/v1/contacts/{contact_id}/comments
{
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"has_transaction": true,
"contact_type": "customer",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"primary_contact_id": 460000000026051,
"payment_terms": 15,
"payment_terms_label": "Net 15",
"currency_id": 460000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"language_code": "en",
"outstanding_receivable_amount": 250,
"outstanding_receivable_amount_bcy": 250,
"unused_credits_receivable_amount": 1369.66,
"unused_credits_receivable_amount_bcy": 1369.66,
"status": "active",
"payment_reminder_enabled": true,
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"facebook": "zoho",
"twitter": "zoho",
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"notes": "Payment option : Through check",
"created_time": "2013-08-05",
"last_modified_time": "2013-10-07",
"is_taxable": true,
"tax_id": 11149000000061058,
"tax_name": "CGST",
"tax_percentage": 12,
"tax_exemption_id": 11149000000061054,
"tax_exemption_code": "string",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst"
}
Create a Contact
Create a contact with given information.
OAuth Scope : ZakyaAPI.contacts.CREATE
Arguments
- contact_namestring(Required)
Name of the contact. This can be the name of an organisation or the name of an individual. Maximum length [200]
- company_namestring
Name of the conact's company. Maximum length [200]
- payment_termsinteger
Net payment term for the customer.
- currency_idstring
Currency ID of the customer's currency.
- websitestring
Website of the contact.
- contact_typestring
Type of the contact. Allowed values are
and - custom_fieldsarray
Custom fields or Additional of the contact which we can create to add more information.
Show Sub-Attributes
- valuestring
Value of the custom field.
- indexinteger
Index of the custom field. It can hold any value from 1 to 10.
- billing_addressobject
Billing address of the contact.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- shipping_addressobject
Customer's shipping address to which the goods must be delivered.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- contact_personsarray
Person/Individual who represents a company
Show Sub-Attributes
- salutationstring
Salutation for the contact
- first_namestring
First name of the contact. Maximum length [100]
- last_namestring
Last name of the contact. Maximum length [100]
- emailstring
Search contacts by email id of the contact person. Variants: address_startswith and address_contains
- phonestring
Search contacts by phone number of the contact person. Variants: phone_startswith and phone_contains
- mobilestring
Search contacts by mobile number of the contact person.
- is_primary_contactboolean
To mark contact person as primary for contact. Allowed value is true only.
- default_templatesobject
Show Sub-Attributes
- invoice_template_idstring
ID of the Invoice template used
- invoice_template_namestring
Name of the invoice template used
- estimate_template_idstring
ID of the estimate template used
- estimate_template_namestring
Name of the estimate template used
- creditnote_template_idstring
ID of teh credit note template used
- creditnote_template_namestring
Name of the credit note template used
- invoice_email_template_idstring
ID of the invoice email tempalte used
- invoice_email_template_namestring
Name of the Invoice email template used
- estimate_email_template_idstring
ID of the estimate email template used
- estimate_email_template_namestring
Name of the estimate email template used
- creditnote_email_template_idstring
ID of the credit note email template
- creditnote_email_template_namestring
Name of the credit note email template
- language_codestring
language of a contact. allowed values
- notesstring
Commennts about the payment made by the contact.
- tax_exemption_idstring
ID of the tax exemption.
- tax_idboolean
ID of the tax or tax group that can be collected from the contact. Tax can be given only if
is . - is_taxableboolean
Boolean to track the taxability of the customer.
- facebookstring
Facebook profile account of the contact. Maximum length [100]
- twitterstring
Twitter account of the contact. MAximum length [100]
- place_of_contactstring
Location of the contact. (This node identifies the place of supply and source of supply when invoices/bills are raised for the customer/vendor respectively. This is not applicable for Overseas contacts)
- gst_nostring
15 digit GST identification number of the customer/vendor.
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are
, , , . - tax_exemption_codestring
Enter tax exemption code
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/contacts?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/contacts?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/contacts?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"payment_terms": 15,
"currency_id": 460000000000097,
"website": "www.bowmanfurniture.com",
"contact_type": "customer",
"custom_fields": [
{
"value": "GBGD078",
"index": 1
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"language_code": "en",
"notes": "Payment option : Through check",
"tax_exemption_id": 11149000000061054,
"tax_id": 11149000000061058,
"is_taxable": true,
"facebook": "zoho",
"twitter": "zoho",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_exemption_code": "string"
}
{
"code": 0,
"message": "The contact has been created",
"contact": {
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"has_transaction": true,
"contact_type": "customer",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"primary_contact_id": 460000000026051,
"payment_terms": 15,
"payment_terms_label": "Net 15",
"currency_id": 460000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"language_code": "en",
"outstanding_receivable_amount": 250,
"outstanding_receivable_amount_bcy": 250,
"unused_credits_receivable_amount": 1369.66,
"unused_credits_receivable_amount_bcy": 1369.66,
"status": "active",
"payment_reminder_enabled": true,
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"facebook": "zoho",
"twitter": "zoho",
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"notes": "Payment option : Through check",
"created_time": "2013-08-05",
"last_modified_time": "2013-10-07",
"is_taxable": true,
"tax_id": 11149000000061058,
"tax_name": "CGST",
"tax_percentage": 12,
"tax_exemption_id": 11149000000061054,
"tax_exemption_code": "string",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst"
}
}
List contacts
List all contacts with pagination.
OAuth Scope : ZakyaAPI.contacts.READ
Query Parameters
- contact_name
Search contacts by contact name. Maximum length [100] Variants:
and . Maximum length [100] - company_name
Search contacts by company name. Maximum length [100] Variants:
and - first_name
Search contacts by first name of the contact person. Maximum length [100] Variants:
and - last_name
Search contacts by last name of the contact person. Maximum length [100] Variants:
and - address
Search contacts by any of the address fields. Maximum length [100] Variants:
and - email
Search contacts by email of the contact person. Maximum length [100] Variants:
and - phone
Search contacts by phone number of the contact person. Maximum length [100] Variants:
and - filter_by
Filter contacts by status. Allowed Values:
, , , and - search_text
Search contacts by contact name or notes. Maximum length [100]
- sort_column
Sort contacts. Allowed Values:
, , , , , and
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/contacts?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/contacts?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"contacts": [
{
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"contact_type": "customer",
"status": "active",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"currency_id": 460000000000097,
"currency_code": "USD",
"outstanding_receivable_amount": 250,
"unused_credits_receivable_amount": 1369.66,
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"created_time": "2013-08-05",
"last_modified_time": "2013-10-07"
},
{...},
{...}
]
}
Update a contact
Update an existing contact. To delete a contact person remove it from the contact_persons list.
OAuth Scope : ZakyaAPI.contacts.UPDATE
Arguments
- contact_namestring(Required)
Name of the contact. This can be the name of an organisation or the name of an individual. Maximum length [200]
- company_namestring
Name of the conact's company. Maximum length [200]
- payment_termsinteger
Net payment term for the customer.
- currency_idstring
Currency ID of the customer's currency.
- contact_typestring
Type of the contact. Allowed values are
and - websitestring
Website of the contact.
- custom_fieldsarray
Custom fields or Additional of the contact which we can create to add more information.
Show Sub-Attributes
- valuestring
Value of the custom field.
- indexinteger
Index of the custom field. It can hold any value from 1 to 10.
- labelstring
Label of the custom field.
- billing_addressobject
Billing address of the contact.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- shipping_addressobject
Customer's shipping address to which the goods must be delivered.
Show Sub-Attributes
- attentionstring
Intended recipient at given address
- addressstring
Street address of the contact. Maximum length allowed [500]
- street2string
Additional Street address of the contact. Maximum length allowed [255]
- citystring
City of the customer’s billing address.
- statestring
State of the customer’s billing address.
- zipstring
Zip code of the customer’s billing address.
- contact_personsarray
Person/Individual who represents a company
Show Sub-Attributes
- salutationstring
Salutation for the contact
- first_namestring
First name of the contact. Maximum length [100]
- last_namestring
Last name of the contact. Maximum length [100]
- emailstring
Search contacts by email id of the contact person. Variants: address_startswith and address_contains
- phonestring
Search contacts by phone number of the contact person. Variants: phone_startswith and phone_contains
- mobilestring
Search contacts by mobile number of the contact person.
- is_primary_contactboolean
To mark contact person as primary for contact. Allowed value is true only.
- default_templatesobject
Show Sub-Attributes
- invoice_template_idstring
ID of the Invoice template used
- invoice_template_namestring
Name of the invoice template used
- estimate_template_idstring
ID of the estimate template used
- estimate_template_namestring
Name of the estimate template used
- creditnote_template_idstring
ID of teh credit note template used
- creditnote_template_namestring
Name of the credit note template used
- invoice_email_template_idstring
ID of the invoice email tempalte used
- invoice_email_template_namestring
Name of the Invoice email template used
- estimate_email_template_idstring
ID of the estimate email template used
- estimate_email_template_namestring
Name of the estimate email template used
- creditnote_email_template_idstring
ID of the credit note email template
- creditnote_email_template_namestring
Name of the credit note email template
- language_codestring
language of a contact. allowed values
- notesstring
Commennts about the payment made by the contact.
- tax_exemption_idstring
ID of the tax exemption.
- tax_idboolean
ID of the tax or tax group that can be collected from the contact. Tax can be given only if
is . - is_taxableboolean
Boolean to track the taxability of the customer.
- facebookstring
Facebook profile account of the contact. Maximum length [100]
- twitterstring
Twitter account of the contact. MAximum length [100]
- place_of_contactstring
Location of the contact. (This node identifies the place of supply and source of supply when invoices/bills are raised for the customer/vendor respectively. This is not applicable for Overseas contacts)
- gst_nostring
15 digit GST identification number of the customer/vendor.
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are
, , , . - tax_exemption_codestring
Enter tax exemption code
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/contacts/460000000026049?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"payment_terms": 15,
"currency_id": 460000000000097,
"contact_type": "customer",
"website": "www.bowmanfurniture.com",
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"language_code": "en",
"notes": "Payment option : Through check",
"tax_exemption_id": 11149000000061054,
"tax_id": 11149000000061058,
"is_taxable": true,
"facebook": "zoho",
"twitter": "zoho",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"tax_exemption_code": "string"
}
{
"code": 0,
"message": "Contact has been updated successfully",
"contact": {
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"has_transaction": true,
"contact_type": "customer",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"primary_contact_id": 460000000026051,
"payment_terms": 15,
"payment_terms_label": "Net 15",
"currency_id": 460000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"language_code": "en",
"outstanding_receivable_amount": 250,
"outstanding_receivable_amount_bcy": 250,
"unused_credits_receivable_amount": 1369.66,
"unused_credits_receivable_amount_bcy": 1369.66,
"status": "active",
"payment_reminder_enabled": true,
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"facebook": "zoho",
"twitter": "zoho",
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"notes": "Payment option : Through check",
"created_time": "2013-08-05",
"last_modified_time": "2013-10-07",
"is_taxable": true,
"tax_id": 11149000000061058,
"tax_name": "CGST",
"tax_percentage": 12,
"tax_exemption_id": 11149000000061054,
"tax_exemption_code": "string",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst"
}
}
Get contact
Get details of a contact.
OAuth Scope : ZakyaAPI.contacts.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/contacts/460000000026049?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"contact": {
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"has_transaction": true,
"contact_type": "customer",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"primary_contact_id": 460000000026051,
"payment_terms": 15,
"payment_terms_label": "Net 15",
"currency_id": 460000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"outstanding_receivable_amount": 250,
"outstanding_receivable_amount_bcy": 250,
"unused_credits_receivable_amount": 1369.66,
"unused_credits_receivable_amount_bcy": 1369.66,
"status": "active",
"facebook": "zoho",
"twitter": "zoho",
"payment_reminder_enabled": true,
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"billing_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"shipping_address": {
"attention": "Mr.John",
"address": "4900 Hopyard Rd",
"street2": "Suit 310",
"city": "Pleasanton",
"state": "CA",
"zip": 94588
},
"contact_persons": [
{
"salutation": "Mr",
"first_name": "Will",
"last_name": "Smith",
"email": "willsmith@bowmanfurniture.com",
"phone": "+1-925-921-9201",
"mobile": "+1-4054439562",
"is_primary_contact": true
}
],
"default_templates": {
"invoice_template_id": 460000000052069,
"invoice_template_name": "Custom Classic",
"estimate_template_id": 460000000000179,
"estimate_template_name": "Service - Professional",
"creditnote_template_id": 460000000000211,
"creditnote_template_name": "Fixed Cost - Professional",
"invoice_email_template_id": 460000000052071,
"invoice_email_template_name": "Custom Invoice Notification",
"estimate_email_template_id": 460000000052073,
"estimate_email_template_name": "Custom Estimate Notification",
"creditnote_email_template_id": 460000000052075,
"creditnote_email_template_name": "Custom Credit Note Notification"
},
"notes": "Payment option : Through check",
"created_time": "2013-08-05",
"last_modified_time": "2013-10-07",
"is_taxable": true,
"tax_id": 11149000000061058,
"tax_name": "CGST",
"tax_percentage": 12,
"tax_exemption_id": 11149000000061054,
"tax_exemption_code": "string",
"place_of_contact": "TN",
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst"
}
}
Delete a contact
Delete an existing contact.
OAuth Scope : ZakyaAPI.contacts.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695"
type: DELETE
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/contacts/460000000026049?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The contact has been deleted."
}
Mark as active
Mark a contact as active.
OAuth Scope : ZakyaAPI.contacts.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/contact/460000000026049/active?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contact/460000000026049/active?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contact/460000000026049/active?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contact/460000000026049/active?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contact/460000000026049/active?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/contact/460000000026049/active?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The contact has been marked as active."
}
Mark as Inactive
Mark a contact as inactive.
OAuth Scope : ZakyaAPI.contacts.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/contacts/460000000026049/inactive?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The contact has been marked as inactive."
}
Email statement
Email statement to the contact. If JSONString is not inputted, mail will be sent with the default mail content.
OAuth Scope : ZakyaAPI.contacts.CREATE
Arguments
- send_from_org_email_idboolean
Boolean to trigger the email from the organization's email address
- to_mail_idsarray(Required)
Array of email addresses of the recipients.
- cc_mail_idsarray
Array of email addresses of the recipients to be CC'd.
- subjectstring(Required)
Subject of an email that has to be sent. Maximum length to be allowed [1000]
- bodystring(Required)
Body/content of the email to be sent. Maximum length [5000]
Query Parameters
- start_date
If start_date and end_date are not given, current month's statement will be sent to contact. Date format [yyyy-mm-dd]
- end_date
End date for the statement. Date format [yyyy-mm-dd]
- multipart_or_formdata
Files to be attached along with the statement.
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"send_from_org_email_id": true,
"to_mail_ids": [
"willsmith@bowmanfurniture.com"
],
"cc_mail_ids": [
"peterparker@bowmanfurniture.com"
],
"subject": "Statement of transactions with Zillium Inc",
"body": "Dear Customer, We have attached with this email a list of all your transactions with us for the period 01 Sep 2013 to 30 Sep 2013. You can write to us or call us if you need any assistance or clarifications. Thanks for your business.RegardsZillium Inc"
}
{
"code": 0,
"message": "Statement has been sent to the customer."
}
Get Statement mail content
Get the mail content of a contacts billing statement.
OAuth Scope : ZakyaAPI.contacts.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/contacts/460000000026049/statements/email?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"body": "Dear Customer, We have attached with this email a list of all your transactions with us for the period 01 Sep 2013 to 30 Sep 2013. You can write to us or call us if you need any assistance or clarifications. Thanks for your business.RegardsZillium Inc",
"subject": "Statement of transactions with Zillium Inc",
"to_contacts": [
{
"first_name": "Will",
"selected": true,
"phone": "+1-925-921-9201",
"email": "willsmith@bowmanfurniture.com",
"contact_person_id": 460000000026051,
"last_name": "Smith",
"salutation": "Mr",
"mobile": "+1-4054439562"
}
],
"file_name": "statement_BowmanandCo.pdf",
"from_emails": [
{
"user_name": "John Smith",
"selected": true,
"email": "willsmith@bowmanfurniture.com"
}
],
"contact_id": 460000000026049
}
Email contact
Send email to contact.
OAuth Scope : ZakyaAPI.contacts.CREATE
Arguments
- to_mail_idsarray(Required)
Array of email addresses of the recipients.
- subjectstring(Required)
Subject of an email has to be sent. Maximum length [1000]
- bodystring(Required)
Body/content of the email to be sent. Maximum length [5000]
- attachmentsbinary
Files to be attached to the email. It has to be sent in multipart/formdata
Query Parameters
- send_customer_statement
Send customer statement pdf with email.
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049/email?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049/email?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049/email?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049/email?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/contacts/460000000026049/email?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"to_mail_ids": [
"willsmith@bowmanfurniture.com"
],
"subject": "Welcome to Zillium Inc .",
"body": "Dear Customer, We have attached with this email a list of all your transactions with us for the period 01 Sep 2013 to 30 Sep 2013. You can write to us or call us if you need any assistance or clarifications. Thanks for your business.RegardsZillium Inc",
"attachments": "string"
}
{
"code": 0,
"message": "Email has been sent."
}
List Comments
List recent activities of a contact.
OAuth Scope : ZakyaAPI.contacts.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/comments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/contacts/460000000026049/comments?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/contacts/460000000026049/comments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/contacts/460000000026049/comments?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/contacts/460000000026049/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/contacts/460000000026049/comments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"contact_comments": [
{
"comment_id": 460000000053131,
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"description": "",
"commented_by_id": 460000000024003,
"commented_by": "David Sujin",
"date": "2013-11-19",
"date_description": "4 days ago",
"time": "6:03 PM",
"transaction_id": 460000000053123,
"transaction_type": "customer_payment",
"is_entity_deleted": false,
"operation_type": "added"
},
{...},
{...}
]
}