Client API

Purpose

These APIs are used to get the list of clients, client details, add client, modify client and delete the client(s).

Get clients API

This API is used to get the list of clients.

Request URL:

https://people.zoho.com/people/api/timetracker/getclients?authtoken=<authtoken>&sIndex=<sIndex>&limit=<limit>

Request parameter:

ParameterValues AllowedDefault ValueDescription
*authtoken<authtoken><Mandatory>Specify the authentication token
sIndex<sIndex>0Specify from which record the response should be fetched
limit<limit>200Specify the number of records to be fetched. Maximum value is 200

Success Response Format :

{
    "response": {
        "result": [
            {
                "clientId": <Client Id>,
                "clientName": <Client name>,
                "currencyCode": <Currency code>
                "billingMethod": <hourly job rate | hourly user rate | hourly user rate - jobs | hourly user rate - projects>,
                "emailId": <Email Id>,
                "firstName": <First name>,
                "lastName": <Last name>,
                "phoneNo": <Phone number>,
                "mobileNo": <Mobile number>,
                "faxNo": <Fax number>,
                "streetAddr": <Street address>,
                "city": <City>,
                "state": <State>,
                "pincode": <Pin code>,
                "country": <Country>,
                "industry": <Industry name>,
                "compsize": <Company size>,
                "description": <Description>
            },....
        ],
        "message": "Data fetched successfully",
        "uri": "/api/timetracker/getclients",
        "isNextAvailable": true, (NOTE: this key will not be available if there is no more data)
        "status": 0
    }
}

Error Response Format :

{
    "response": {
        "message": Error in fetching data,
        "uri": "/api/timetracker/getclients",
        "errors": [
            {
                "code": <Error Code>,
                "message": <Error Message>
            }
        ],
        "status": 1
    }
}

Error Codes and Messages :

Error CodeError Message
9000Permission denied

Example :

Request URL :

https://people.zoho.com/people/api/timetracker/getclients?authtoken=9f8d1b973c85dbec3a335ac976319f6d234&sIndex=0&limit=1

 

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/getclients">
    <status>0</status>
    <message>Data fetched successfully</message>
    <isNextAvailable>true</isNextAvailable>
    <result>
        <client>
            <lastName>Meyrick</lastName>
            <country>UNITED STATES</country>
            <pincode>32104</pincode>
            <streetAddr>50, Oakland Avenue</streetAddr>
            <clientId>469505000000133417</clientId>
            <clientName>Adamo Meyrick</clientName>
            <city>#206 A city</city>
            <description>Food Door Delivering Company</description>
            <emailId>ameyrickd@wix.com</emailId>
            <industry>Voolia</industry>
            <mobileNo>7708753134</mobileNo>
            <phoneNo>656-630-9381</phoneNo>
            <firstName>Adamo</firstName>
            <faxNo>+1-212-9876543</faxNo>
            <compsize>230</compsize>
            <state>Florida</state>
            <currencyCode>USD</currencyCode>
        </client>
    </result>
</response>
 

JSON response:

{
    "response": {
        "result": [
            {
                "lastName": "Meyrick",
                "country": "UNITED STATES",
                "pincode": "32104",
                "streetAddr": "50, Oakland Avenue",
                "clientId": "469505000000133417",
                "clientName": "Adamo Meyrick",
                "city": "#206 A city",
                "description": "Food Door Delivering Company",
                "emailId": "ameyrickd@wix.com",
                "industry": "Voolia",
                "mobileNo": "7708753134",
                "phoneNo": "656-630-9381",
                "firstName": "Adamo",
                "faxNo": "+1-212-9876543",
                "compsize": 230,
                "state": "Florida",
                "currencyCode": "USD"
            }
        ],
        "message": "Data fetched successfully",
        "uri": "/api/timetracker/getclients",
        "isNextAvailable": true,
        "status": 0
    }
}

Get client details API

This API is used to get the client details.

Request URL:

https://people.zoho.com/people/api/timetracker/getclientdetails?authtoken=<authtoken>&clientId=<clientId>

Request parameter:

ParameterValues AllowedDefault ValueDescription
*authtoken<authtoken><Mandatory>Specify the authentication token
*clientId<Client Id><Mandatory>Specify the client Id

Success Response Format :

{
    "response": {
        "result": [
            {
                "clientId": <Client Id>,
                "clientName": <Client name>,
                "currencyCode": <Currency code>
                "billingMethod": <hourly job rate | hourly user rate | hourly user rate - jobs | hourly user rate - projects>,
                "emailId": <Email Id>,
                "firstName": <First name>,
                "lastName": <Last name>,
                "phoneNo": <Phone number>,
                "mobileNo": <Mobile number>,
                "faxNo": <Fax number>,
                "streetAddr": <Street address>,
                "city": <City>,
                "state": <State>,
                "pincode": <Pin code>,
                "country": <Country>,
                "industry": <Industry name>,
                "compsize": <Company size>,
                "description": <Description>
            }
        ],
        "message": "Data fetched successfully",
        "uri": "/api/timetracker/getclientdetails",
        "status": 0
    }
}

Error Response Format :

{
    "response": {
        "message": Error in fetching data,
        "uri": "/api/timetracker/getclientdetails",
        "errors": [
            {
                "code": <Error Code>,
                "message": <Error Message>
            }
        ],
        "status": 1
    }
}

Error Codes and Messages :

Error CodeError Message
9000Permission denied
9002No <parameter_name> parameter specified
9003Wrong value given for <parameter_name> parameter

Example :

Request URL :

https://people.zoho.com/people/api/timetracker/getclientdetails?authtoken=9f8d1b973c85dbec3a335ac976319f6d234&clientId=469505000000133417

 

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/getclientdetails">
    <status>0</status>
    <message>Data fetched successfully</message>
    <result>
        <client>
            <lastName>Meyrick</lastName>
            <country>UNITED STATES</country>
            <pincode>32104</pincode>
            <streetAddr>50, Oakland Avenue</streetAddr>
            <clientId>469505000000133417</clientId>
            <clientName>Adamo Meyrick</clientName>
            <city>#206 A city</city>
            <description>Food Door Delivering Company</description>
            <emailId>ameyrickd@wix.com</emailId>
            <industry>Voolia</industry>
            <mobileNo>7708753134</mobileNo>
            <phoneNo>656-630-9381</phoneNo>
            <firstName>Adamo</firstName>
            <faxNo>+1-212-9876543</faxNo>
            <compsize>230</compsize>
            <state>Florida</state>
            <currencyCode>USD</currencyCode>
        </client>
    </result>
</response>
 

JSON response:

{
    "response": {
        "result": [
            {
                "lastName": "Meyrick",
                "country": "UNITED STATES",
                "pincode": "32104",
                "streetAddr": "50, Oakland Avenue",
                "clientId": "469505000000133417",
                "clientName": "Adamo Meyrick",
                "city": "#206 A city",
                "description": "Food Door Delivering Company",
                "emailId": "ameyrickd@wix.com",
                "industry": "Voolia",
                "mobileNo": "7708753134",
                "phoneNo": "656-630-9381",
                "firstName": "Adamo",
                "faxNo": "+1-212-9876543",
                "compsize": 230,
                "state": "Florida",
                "currencyCode": "USD"
            }
        ],
        "message": "Data fetched successfully",
        "uri": "/api/timetracker/getclientdetails",
        "status": 0
    }
}

Add client API

This API is used to add client.

Request URL:

https://people.zoho.com/people/api/timetracker/addclient?authtoken=<authtoken>&clientName=<clientName>&currency=<currency>&billingMethod=<billingMethod>&emailId=<emailId>&firstName=<firstName>&lastName=<lastName>&phoneNo=<phoneNo>&mobileNo=<mobileNo>&faxNo=<faxNo>&streetAddr=<streetAddr>&city=<city>&state=<state>&pincode=<pincode>&country=<country>&industry=<industry>&compsize=<compsize>&description=<description>

Request parameter:

ParameterValues AllowedDefault ValueDescription
*authtoken<authtoken><Mandatory>Specify the authentication token
*clientName<Client name><Mandatory>Specify the client name
*currency<Currency code><Mandatory>Specify the currency code (Example INR for India)
billingMethodhourly job rate | hourly user rate | hourly user rate - jobs | hourly user rate - projects-Specify the billing method
emailId<Email Id>-Specify the email Id
firstName<First name>-Specify the first name
lastName<Last name>-Specify the last name
phoneNo<Phone number>-Specify the phone number
mobileNo<Mobile number>-Specify the mobile number
faxNo<Fax number>-Specify the fax number
streetAddr<Street Address>-Specify the street address
city<City name>-Specify the city name
state<State name>-Specify the state name
pincode<Pin code>-Specify the pin code
country<Country name>-Specify the country name (Example INDIA for India)
industry<Industry name>-Specify the industry name
compsize<Company size>0Specify the company size
description<Description>-Specify the description

Success Response Format :

{
    "response": {
        "result": [
            {
                "clientId": <Client Id>
            }
        ],
        "message": "Client added successfully",
        "uri": "/api/timetracker/addclient",
        "status": 0
    }
}

Error Response Format :

{
    "response": {
        "message": Error in adding/modifying Clients,
        "uri": "/api/timetracker/addclient",
        "errors": [
            {
                "code": <Error Code>,
                "message": <Error Message>
            }
        ],
        "status": 1
    }
}

Error Codes and Messages :

Error CodeError Message
7038Permission denied
8000No <parameter_name> parameter specified
8001Wrong value given for <parameter_name> parameter
8001Client Name already exists

Example :

Request URL :

https://people.zoho.com/people/api/timetracker/addclient?authtoken=9f8d1b973c85dbec3a335ac976319f6d&clientName=Adamo Meyrick&currency=USD&billingMethod=hourlyjobrate&emailId=ameyrickd@wix.com&firstName=Adamo&
lastName=Meyrick&phoneNo=656-630-9381&mobileNo=7708753134&faxNo=+1-212-9876543&streetAddr=50, Oakland Avenue&city=#206 A city&state=Florida&pincode=32104&country=UNITED STATES&industry=Voolia&compsize=230&description=Food Door Delivering Company

 

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/addclient">
    <status>0</status>
    <message>Client added successfully</message>
    <result>
        <clientId>469505000000271259</clientId>
    </result>
</response>
 

JSON response:

{
    "response": {
        "result": [
            {
                "clientId": "469505000000271259"
            }
        ],
        "message": "Client added successfully",
        "uri": "/api/timetracker/addclient",
        "status": 0
    }
}

Modify client API

This API is used to modify client.

Request URL:

https://people.zoho.com/people/api/timetracker/modifyclient?authtoken=<authtoken>&clientId=<clientId>&clientName=<clientName>&currency=<currency>&billingMethod=<billingMethod>&emailId=<emailId>&firstName=<firstName>&lastName=<lastName>&phoneNo=<phoneNo>&mobileNo=<mobileNo>&faxNo=<faxNo>&streetAddr=<streetAddr>&city=<city>&state=<state>&pincode=<pincode>&country=<country>&industry=<industry>&compsize=<compsize>&description=<description>

Request parameter:

ParameterValues AllowedDefault ValueDescription
*authtoken<authtoken><Mandatory>Specify the authentication token
*clientId<Client Id><Mandatory>Specify the client Id
clientName<Client name>-Specify the client name
currency<Currency code>-Specify the currency code (Example INR for India)
billingMethodhourly job rate | hourly user rate | hourly user rate - jobs | hourly user rate - projects-Specify the billing method
emailId<Email Id>-Specify the email Id
firstName<First name>-Specify the first name
lastName<Last name>-Specify the last name
phoneNo<Phone number>-Specify the phone number
mobileNo<Mobile number>-Specify the mobile number
faxNo<Fax number>-Specify the fax number
streetAddr<Street Address>-Specify the street address
city<City name>-Specify the city name
state<State name>-Specify the state name
pincode<Pin code>-Specify the pin code
country<Country name>-Specify the country name (Example INDIA for India)
industry<Industry name>-Specify the industry name
compsize<Company size>0Specify the company size
description<Description>-Specify the description

Success Response Format :

{
    "response": {
        "result": [
            {
                "clientId": <Client Id>
            }
        ],
        "message": "Client details modified successfully",
        "uri": "/api/timetracker/modifyclient",
        "status": 0
    }
}

Error Response Format :

{
    "response": {
        "message": Error in adding/modifying Clients,
        "uri": "/api/timetracker/modifyclient",
        "errors": [
            {
                "code": <Error Code>,
                "message": <Error Message>
            }
        ],
        "status": 1
    }
}

Error Codes and Messages :

Error CodeError Message
7038Permission denied
8000No <parameter_name> parameter specified
8001Wrong value given for <parameter_name> parameter
8001Client not found
8001Client Name already exists

Example :

Request URL :

https://people.zoho.com/people/api/timetracker/modifyclient?authtoken=9f8d1b973c85dbec3a335ac976319f6d234&clientId=469505000000271259&clientName=Adamo Meyrick&currency=USD&billingMethod=hourlyjobrate&emailId=ameyrickd@wix.com&firstName=Adamo&
lastName=Meyrick&phoneNo=656-630-9381&mobileNo=7708753134&faxNo=+1-212-9876543&streetAddr=50, Oakland Avenue&city=#206 A city&state=Florida&pincode=32104&country=UNITED STATES&industry=Voolia&compsize=230&description=Food Door Delivering Company

 

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/modifyclient">
    <status>0</status>
    <message>Client details modified successfully</message>
    <result>
        <clientId>469505000000271259</clientId>
    </result>
</response>
 

JSON response:

{
    "response": {
        "result": [
            {
                "clientId": "469505000000271259"
            }
        ],
        "message": "Client details modified successfully",
        "uri": "/api/timetracker/modifyclient",
        "status": 0
    }
}

Delete clients API

This API is used to delete the list of clients.

Request URL:

https://people.zoho.com/people/api/timetracker/deleteclient?authtoken=<authtoken>&clientId=<clientId>

Request parameter:

ParameterValues AllowedDefault ValueDescription
*authtoken<authtoken><Mandatory>Specify the authentication token
*clientId<Client Ids><Mandatory>Specify the client Ids (separated by commas). Maximum number of Ids allowed is 1000.

Success Response Format :

{
    "response": {
        "message": "Client(s) deleted successfully",
        "uri": "/api/timetracker/deleteclient",
        "status": 0
    }
}

Error Response Format :

{
    "response": {
        "message": "Error occurred",
        "uri": "/api/timetracker/deleteclient",
        "errors": {
            "code": <Error Code>,
            "message": <Error Message>
        },
        "status": 1
    }
}

Error Codes and Messages :

Error CodeError Message
7019Missing parameter(s) in the request
7038Permission denied

Example :

Request URL :

https://people.zoho.com/people/api/timetracker/deleteclient?authtoken=9f8d1b973c85dbec3a335ac976319f6d234&clientId=469505000000271259,
469505000000271261,469505000000271263

 

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/deleteclient">
    <status>0</status>
    <message>Client(s) deleted successfully</message>
</response>
 

JSON response:

{
    "response": {
        "message": "Client(s) deleted successfully",
        "uri": "/api/timetracker/deleteclient",
        "status": 0
    }
}