ZOHO CRM Integration
API handling for modules specific to Zoho Books - Zoho CRM integration.
Attribute
Maximum length [200]
Maximum length [200]
de,en,es,fr,it,ja,nl,pt,sv,zh
business_gst
, business_none
, overseas
, consumer
.Maximum length [100]
Maximum length [100]
Maximum length [100]
Maximum length [100]
{
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"contact_type": "customer",
"language_code": "en",
"status": "active",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"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",
"facebook": "zoho",
"twitter": "zoho",
"place_of_contact": "TN",
"created_time": "2013-10-07T12:06:10+0530",
"last_modified_time": "2013-11-08T18:24:51+0530"
}
Get a contact by CRM contact id / CRM account ID
Use the argument below to get the details of a Zoho CRM contact using its CRM contact ID / CRM account ID. oauthscope : ZohoBooks.contacts.READ
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/contacts?organization_id=10234695"
type: GET
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/contacts?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/contacts?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/contacts?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"contact": {
"contact_id": 460000000026049,
"contact_name": "Bowman and Co",
"company_name": "Bowman and Co",
"contact_type": "customer",
"language_code": "en",
"status": "active",
"payment_terms": 15,
"payment_terms_label": "Net 15",
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5",
"is_linked_with_zohocrm": false,
"website": "www.bowmanfurniture.com",
"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",
"facebook": "zoho",
"twitter": "zoho",
"place_of_contact": "TN",
"created_time": "2013-10-07T12:06:10+0530",
"last_modified_time": "2013-11-08T18:24:51+0530"
}
}
Import a customer using the CRM account ID
Zoho Books must be integrated with Zoho CRM using Accounts and Contacts sync or using Accounts only sync to import a customer from CRM with its CRM account ID. oauthscope : ZohoBooks.contacts.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/crm/account/987000000654321/import?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/crm/account/987000000654321/import?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/crm/account/987000000654321/import?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/crm/account/987000000654321/import?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/crm/account/987000000654321/import?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();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/crm/account/987000000654321/import?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"data": {
"contact_id": 460000000026049
}
}
Import a customer using CRM contact ID
Zoho Books must be integrated with Zoho CRM using Contacts only sync to import a customer from CRM with its CRM contact ID. oauthscope : ZohoBooks.contacts.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/crm/contact/987000000654321/import?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/crm/contact/987000000654321/import?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/crm/contact/987000000654321/import?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/crm/contact/987000000654321/import?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/crm/contact/987000000654321/import?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();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/crm/contact/987000000654321/import?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"data": {
"contact_id": 460000000026049
}
}
Import a vendor using the CRM vendor ID
Zoho Books must be integrated with Zoho CRM using Vendor only sync to import a vendor from CRM with its CRM vendor ID. oauthscope : ZohoBooks.contacts.CREATE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/crm/vendor/987000000654321/import?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/crm/vendor/987000000654321/import?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/crm/vendor/987000000654321/import?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/books/v3/crm/vendor/987000000654321/import?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/crm/vendor/987000000654321/import?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();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/crm/vendor/987000000654321/import?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"data": {
"contact_id": 460000000026049
}
}
Get the list of Invoices using CRM potential ID
Use the CRM potential ID to get the list of Invoices. oauthscope : ZohoBooks.contacts.READ
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/invoices?organization_id=10234695"
type: GET
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/invoices?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/invoices?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/invoices?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/invoices?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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/invoices?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"invoices": [
{
"invoice_id": 982000000567114,
"ach_payment_initiated": false,
"customer_name": "Bowman & Co",
"customer_id": 982000000567001,
"status": "active",
"invoice_number": "INV-00003",
"reference_number": " ",
"date": "2013-11-17",
"due_date": "2013-12-03",
"due_days": "Due in 14 day(s)",
"currency_id": 460000000000097,
"schedule_time": "",
"currency_code": "USD",
"is_viewed_by_client": false,
"has_attachment": false,
"client_viewed_time": "",
"total": 40.6,
"balance": 40.6,
"created_time": "2013-10-07T12:06:10+0530",
"last_modified_time": "2013-11-08T18:24:51+0530",
"is_emailed": false,
"reminders_sent": 1,
"last_reminder_sent_date": " ",
"payment_expected_date": " ",
"last_payment_date": " ",
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
],
"documents": "",
"salesperson_id": " ",
"salesperson_name": " ",
"shipping_charge": 0,
"adjustment": 0,
"write_off_amount": 0,
"exchange_rate": 1
},
{...},
{...}
],
"page_context": [
{
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
]
}
Get the list of Estimates using CRM potential ID
Use the CRM potential ID to get the list of Estimates. oauthscope : ZohoBooks.estimates.READ
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/estimates?organization_id=10234695"
type: GET
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/estimates?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/estimates?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/estimates?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/estimates?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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/estimates?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"estimates": [
{
"estimate_id": 982000000567011,
"customer_name": "Bowman & Co",
"customer_id": 982000000567001,
"status": "active",
"estimate_number": "EST-00002",
"reference_number": " ",
"date": "2013-11-17",
"currency_id": 460000000000097,
"currency_code": "USD",
"total": 40.6,
"created_time": "2013-10-07T12:06:10+0530",
"last_modified_time": "2013-11-08T18:24:51+0530",
"accepted_date": " ",
"declined_date": " ",
"expiry_date": "2013-11-30",
"has_attachment": false,
"is_viewed_by_client": false,
"client_viewed_time": ""
},
{...},
{...}
],
"page_context": [
{
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
]
}
Get the list of SalesOrder using CRM potential ID
Use the CRM potential ID to get the list of SalesOrders . oauthscope : ZohoBooks.salesorders.READ
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695"
type: GET
headers: headers_data
content-type: application/octet-stream
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/salesorders?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("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/salesorders?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/salesorders?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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/salesorders?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"salesorders": [
{
"salesorder_id": "460000000039129",
"zcrm_potential_id": 460000000026049,
"zcrm_potential_name": "string",
"customer_name": "Bowman & Co",
"customer_id": 982000000567001,
"status": "active",
"salesorder_number": "SO-001",
"reference_number": " ",
"date": "2013-11-17",
"shipment_date": "string",
"shipment_days": 2,
"currency_id": 460000000000097,
"currency_code": "USD",
"total": 40.6,
"sub_total": 11800,
"bcy_total": 400,
"created_time": "2013-10-07T12:06:10+0530",
"last_modified_time": "2013-11-08T18:24:51+0530",
"is_emailed": false,
"has_attachment": false,
"custom_fields": [
{
"value": "GBGD078",
"index": 1,
"label": "VAT ID"
}
]
},
{...},
{...}
]
}