Contact Persons

A contact person is an individual who acts as a representative of an organisation for communication purpose. For example, a Manager can be a contact person for an organisation.

Attribute

  • contact_idstring

    ID of the contact person

  • contact_person_idstring

    The ID of the contact person

  • salutationstring

    Salutation for the contact. Maximum length allowed [25]

  • first_namestring

    First Name of the contact. Maximum length allowed [100]

  • last_namestring

    Last Name of the contact. Maximum length allowed [100]

  • emailstring

    Email ID of the contact person. Maximum length allowed [100]

  • phonestring

    Phone number of the contact person. Maximum length [50]

  • mobilestring

    Mobile/Cell number of the contact person. Maximum length [50]

  • is_primary_contactboolean

    To mark contact person as primary for communication.

  • skypestring

    skype address of the contact person. Maximum length [50]

  • designationstring

    designation of the contact person in the organisation. Maximum length [50]

  • departmentstring

    department to which the contact person belongs. Maximum length [50]

  • is_added_in_portalboolean

    tells whether the contact person has portal access or not

ExampleCopy
[
    {
        "contact_id": 460000000026049,
        "contact_person_id": 460000000026051,
        "salutation": "Mr",
        "first_name": "Will",
        "last_name": "Smith",
        "email": "willsmith@bowmanfurniture.com",
        "phone": "+1-925-921-9201",
        "mobile": "+1-4054439562",
        "is_primary_contact": true,
        "skype": "zoho",
        "designation": "Sales Engineer",
        "department": "Sales",
        "is_added_in_portal": true
    }
]

Create a contact person

Create a contact person for contact.

OAuth Scope : ZakyaAPI.contacts.CREATE

Arguments

  • contact_idstring

    ID of the contact person

  • salutationstring

    Salutation for the contact. Maximum length allowed [25]

  • first_namestring(Required)

    First Name of the contact. Maximum length allowed [100]

  • last_namestring

    Last Name of the contact. Maximum length allowed [100]

  • emailstring

    Email ID of the contact person. Maximum length allowed [100]

  • phonestring

    Phone number of the contact person. Maximum length [50]

  • mobilestring

    Mobile/Cell number of the contact person. Maximum length [50]

  • skypestring

    skype address of the contact person. Maximum length [50]

  • designationstring

    designation of the contact person in the organisation. Maximum length [50]

  • departmentstring

    department to which the contact person belongs. Maximum length [50]

  • enable_portalboolean

    option to enable or disable portal access the contact person. allowed values true, false

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/contacts/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "contact_id": 460000000026049,
    "salutation": "Mr",
    "first_name": "Will",
    "last_name": "Smith",
    "email": "willsmith@bowmanfurniture.com",
    "phone": "+1-925-921-9201",
    "mobile": "+1-4054439562",
    "skype": "zoho",
    "designation": "Sales Engineer",
    "department": "Sales",
    "enable_portal": true
}
Response ExampleCopy
{
    "code": 0,
    "message": "The contact person has been Created",
    "contact_person": [
        {
            "contact_id": 460000000026049,
            "contact_person_id": 460000000026051,
            "salutation": "Mr",
            "first_name": "Will",
            "last_name": "Smith",
            "email": "willsmith@bowmanfurniture.com",
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": true,
            "skype": "zoho",
            "designation": "Sales Engineer",
            "department": "Sales",
            "is_added_in_portal": true
        },
        {...},
        {...}
    ]
}

Update a contact person

Update details of an existing contact person.

OAuth Scope : ZakyaAPI.contacts.UPDATE

Arguments

  • contact_idstring(Required)

    ID of the contact person

  • salutationstring

    Salutation for the contact. Maximum length allowed [25]

  • first_namestring(Required)

    First Name of the contact. Maximum length allowed [100]

  • last_namestring

    Last Name of the contact. Maximum length allowed [100]

  • emailstring

    Email ID of the contact person. Maximum length allowed [100]

  • phonestring

    Phone number of the contact person. Maximum length [50]

  • mobilestring

    Mobile/Cell number of the contact person. Maximum length [50]

  • skypestring

    skype address of the contact person. Maximum length [50]

  • designationstring

    designation of the contact person in the organisation. Maximum length [50]

  • departmentstring

    department to which the contact person belongs. Maximum length [50]

  • enable_portalboolean

    option to enable or disable portal access the contact person. allowed values true, false

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/contacts/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "contact_id": 460000000026049,
    "salutation": "Mr",
    "first_name": "Will",
    "last_name": "Smith",
    "email": "willsmith@bowmanfurniture.com",
    "phone": "+1-925-921-9201",
    "mobile": "+1-4054439562",
    "skype": "zoho",
    "designation": "Sales Engineer",
    "department": "Sales",
    "enable_portal": true
}
Response ExampleCopy
{
    "code": 0,
    "message": "The contactperson details has been updated.",
    "contact_person": [
        {
            "contact_id": 460000000026049,
            "contact_person_id": 460000000026051,
            "salutation": "Mr",
            "first_name": "Will",
            "last_name": "Smith",
            "email": "willsmith@bowmanfurniture.com",
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": true,
            "skype": "zoho",
            "designation": "Sales Engineer",
            "department": "Sales",
            "is_added_in_portal": true
        },
        {...},
        {...}
    ]
}

Delete a contact person

Delete an existing contact person.

OAuth Scope : ZakyaAPI.contacts.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/contacts/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The contact person has been deleted."
}

List contact persons

List all contacts with pagination.

OAuth Scope : ZakyaAPI.contacts.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?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/contactpersons?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "contact_persons": [
        {
            "contact_id": 460000000026049,
            "contact_person_id": 460000000026051,
            "salutation": "Mr",
            "first_name": "Will",
            "last_name": "Smith",
            "email": "willsmith@bowmanfurniture.com",
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": true,
            "skype": "zoho",
            "designation": "Sales Engineer",
            "department": "Sales",
            "is_added_in_portal": true
        },
        {...},
        {...}
    ]
}

Get a contact person

Get the details of a contact person.

OAuth Scope : ZakyaAPI.contacts.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/contacts/460000000026049/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?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/contactpersons/460000000026051?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "contact_person": {
        "contact_id": 460000000026049,
        "contact_person_id": 460000000026051,
        "salutation": "Mr",
        "first_name": "Will",
        "last_name": "Smith",
        "email": "willsmith@bowmanfurniture.com",
        "phone": "+1-925-921-9201",
        "mobile": "+1-4054439562",
        "is_primary_contact": true,
        "skype": "zoho",
        "designation": "Sales Engineer",
        "department": "Sales",
        "is_added_in_portal": true
    }
}

Mark as primary contact person

Mark a contact person as primary for contact.

OAuth Scope : ZakyaAPI.contacts.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/contacts/contactpersons/460000000026051/primary?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/contactpersons/460000000026051/primary?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/contactpersons/460000000026051/primary?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/contactpersons/460000000026051/primary?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/contactpersons/460000000026051/primary?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/contactpersons/460000000026051/primary?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "This contact person has been marked as your primary contact person."
}