SupportCenter Plus

    Account/Contact Related Operations

     

    While invoking the account/contact related operations through API, the operation defined are based on the parameter value, and the developer needs to submit a request to the url via HTTP POST or GET method.

     

    NOTE: Before proceeding with the account/contact related operations and its corresponding parameters, please note that the parameters are case sensitive and should be used as defined.

     


    The following operations can be performed on account/contact through API,  


     

    Adding Account

     

    URL Format

     

     

    The URL format for the Account operation - Add

     

    For xml output
     

    http://<server-name>:<port-number>/api/xml/addAccount

     

     

    For json output

     

    http://<server-name>:<port-number>/api/json/addAccount

     

     

     

    Parameters

     

    The parameters that needs to be passed via HTTP method for adding a new account are as follows,

     

     

    Parameter

     

    Value

     

    Description

     
    name

     

    string

     

    Name of the account.

     

    annualRevenue

     

    string

     

    Annual Revenue of the account.

     

    email

     

    string

     

    Email Address of the account.

     

    website

     

    string

     

    Website of the account.

     

    phone

     

    string

     

    Contact Information of the account.

     

    fax

     

    string

     

    Contact Information of the account.

     

    industry

     

    string

     

    The type of Industry to which the account belongs.

     

    timeZone

     

    string

     

    Time Zone pertaining to the location of the account.

     

    accountManager

     

    string

     

    Account Manager for the account.

     

    doorNo

     

    string

     

    Address of the account.

     

    street

     

    string

     

    Address of the account.

     

    landmark

     

    string

     

    Address of the account.

     

    city

     

    string

     

    Address of the account.

     

    province

     

    string

     

    Address of the account.

     

    country

     

    string

     

    Address of the account.

     

    zipCode

     

    string

     

    Address of the account.

     

    description

     

    string

     

    Description on the account.

     

    businessUnit

     

    string

     

    Business Unit

     

     

    NOTE: Please note that the Name of the account is a mandatory field. If multi tenancy is enabled through Business Units and if the application has more than one Business Unit configured, then Business Unit becomes a mandatory field.

     

     

    Output Response Format

     

    The output response format for both xml and json consists of three parameters:-

    • response uri: The response uri is the url value sent over HTTP POST method.

    • status: The status denotes the status of the operation. Here there are only two status - Success and Failure.

    • statuscode: The statuscode denotes the code displayed when the status is Success or Failure. For a successful operation, the status code is 200.

    Success

     

    When the operation is successful, the output response format is as given below,

     

    response uri=[url value]

     

    status=Success

     

    statuscode=200

     

     

    Sample Response

     

    response uri="api/xml/addAccount"

     

    status=Success

     

    statuscode=200

     

     

    Error

     

    Errors occur when the API Key is not valid or the parameter value does not exist in the application. In such cases, the output format is as shown below,

     

    response uri=[url value]

     

    status=Failure

     

    statuscode=failurecode

     

     

    Sample Response

     

    response uri="api/xml/addAccount"

     

    status=Failure

     

    statuscode=4003

     

    statusmessage= Permission Denied. [the API application is not provided with View/Read permission]

     

     

    Sample Input Form

     

    Sample form for the operation 'addAccount' is given below,

     

    <form method="POST" action="http(s)://<server-name>:<port-number>/api/xml/addAccount">

    <input type="hidden" name="apikey" value="[SupportCenter API Key]">

    <input type="hidden" name="name" value="[Name of the account]">

    <input type="hidden" name="description" value="[Brief Description about the account]">

    <input type="submit" name="submit" value="Get">

    </form>

     

     

    View/Read Account

     

    This operation displays the Account details by specifying either the Account name, Account ID or the starting alphabet of the account.

     

    URL Format

     

     

    The URL format for the Account operation - View/Read

     

    For xml output
     

    http://<server-name>:<port-number>/api/xml/getAccount

     

     

    For json output

     

    http://<server-name>:<port-number>/api/json/getAccount

     

     

    Parameters

     

    The parameters that needs to be passed via HTTP method for viewing an account are as follows,

     

     

    Parameter

     

    Value

     

    Description

     
    id

     

    string

     

    Account ID of the account to view.

     

    account

     

    string

     

    Name of the account.

     

    startsWith

     

    string

     

    The first alphabetic letter of the account.

     

    businessUnit

     

    string

     

    Business Unit

     

    count

     

     

     

    Denotes the number of requests to be displayed.

     

    countFrom

     

     

     

    Denotes the number from which the request should be displayed.

     

    NOTE: Please note that either the id, account name or starting alphabetic of the account is a mandatory field.

     

     

    Output Response Format

     

    The output response format for both xml and json consists of three parameters:-

    • response uri: The response uri is the url value sent over HTTP POST or GET method.

    • status: The status denotes the status of the operation. Here there are only two status - Success and Failure.

    • statuscode: The statuscode denotes the code displayed when the status is Success or Failure. For a successful operation, the status code is 200.

    Success

     

    When the operation is successful, the output response format is as given below,

     

    response uri=[url value]

     

    status=Success

     

    statuscode=200

     

     

    Sample Response

     

    response uri="api/xml/getAccount"

     

    status=Success

     

    statuscode=200

     

     

    Error

     

    Errors occur when the API Key is not valid or the parameter value does not exist in the application. In such cases, the output format is as shown below,

     

    response uri=[url value]

     

    status=Failure

     

    statuscode=failurecode

     

     

    Sample Response

     

    response uri="api/xml/getAccount"

     

    status=Failure

     

    statuscode=5002

     

    statusmessage= The Account [account name] does not exists.

     

     

    Sample Input Form

     

    Sample form for the operation 'getAccount' is given below,

     

    <form method="POST" action="http(s)://<server-name>:<port-number>/api/xml/getAccount">

    <input type="hidden" name="apikey" value="[SupportCenter API Key]">

    <input type="text" name="id" value="[Account ID of the account to view]">

    <input type="text" name="account" value="[Name of the account to view]">

    <input type="submit" name="submit" value="submit">

    </form>

     

     

    Adding Contact

     

    URL Format

     

     

    The URL format for the Contact operation - Add

     

    For xml output
     

    http://<server-name>:<port-number>/api/xml/addContact

     

     

    For json output

     

    http://<server-name>:<port-number>/api/json/addContact

     

     

    Parameters

     

    The parameters that needs to be passed via HTTP method for adding a new contact are as follows,

     

     

    Parameter

     

    Value

     

    Description

     
    name

     

    string

     

    Name of the contact.

     

    email

     

    string

     

    Email Address of the contact

     

    alternateEmail

     

    string

     

    Alternate Email address of the contact.

     

    phone

     

    string

     

    Contact Information of the account.

     

    mobile

     

    string

     

    Contact Information of the account.

     

    jobTitle

     

    string

     

    Job Title of the contact.

     

    twitterHandle

     

    string

     

    Twitter screen name of the contact.

     

    account

     

    string

     

    Account to which the contact belongs.

     

    loginName

     

    string

     

    Login Name of the contact

     

    password

     

    string

     

    Password of the contact.

     

    description

     

    string

     

    Description on the contact.

     

    businessUnit

     

    string

     

    Business Unit

     

    NOTE: Please note that the Name and Email address of the contact are mandatory fields. If multi tenancy is enabled through Business Units and if the application has more than one Business Unit configured, then Business Unit becomes a mandatory field.

     

    Output Response Format

     

    The output response format for both xml and json consists of three parameters:-

    • response uri: The response uri is the url value sent over HTTP POST method.

    • status: The status denotes the status of the operation. Here there are only two status - Success and Failure.

    • statuscode: The statuscode denotes the code displayed when the status is Success or Failure. For a successful operation, the status code is 200.

    Success

     

    When the operation is successful, the output response format is as given below,

     

    response uri=[url value]

     

    status=Success

     

    statuscode=200

     

     

    Sample Response

     

    response uri="api/xml/addContact"

     

    status=Success

     

    statuscode=200

     

    Error

     

    Errors occur when the API Key is not valid or the parameter value does not exist in the application. In such cases, the output format is as shown below,

     

    response uri=[url value]

     

    status=Failure

     

    statuscode=failurecode

     

     

     

    Sample Response

     

    response uri="api/xml/addContact"

     

    status=Failure

     

    statuscode=6003

     

    statusmessage=A Contact with email [email address] already exists, so contact not added.

     

     

    Sample Input Form

     

    Sample form for the operation 'addContact' is given below,

     

    <form method="POST" action="http(s)://<server-name>:<port-number>/api/xml/addContact">

    <input type="hidden" name="apikey" value="[SupportCenter API Key]">

    <input type="text" name="name" value="[Name of the contact]">

    <input type="text" name="email" value="[Email address of the contact]">

    <input type="submit" name="submit" value="submit">

    </form>

     

     

    View/Read Contact

     

    This operation displays the Contact details by specifying either the Contact name, Contact ID or the starting alphabet of the contact.

     

    URL Format

     

     

    The URL format for the Contact operation - View/Read

     

    For xml output
     

    http://<server-name>:<port-number>/api/xml/getContact

     

     

    For json output

     

    http://<server-name>:<port-number>/api/json/getContact

     

     

    Parameters

     

    The parameters that needs to be passed via HTTP method for viewing a contact details are as follows,

     

     

    Parameter

     

    Value

     

    Description

     
    id

     

    string

     

    Contact ID of the contact to view.

     

    contact

     

    string

     

    Name of the contact.

     

    startswith

     

    string

     

    The first alphabetic letter of the contact.

     

    count

     

     

     

    Denotes the number of requests to be displayed.

     

    countFrom

     

     

     

    Denotes the number from which the request should be displayed.

     

    businessUnit

     

    string

     

    Business Unit

     

     

    Output Response Format

     

    The output response format for both xml and json consists of three parameters:-

    • response uri: The response uri is the url value sent over HTTP POST or GET method.

    • status: The status denotes the status of the operation. Here there are only two status - Success and Failure.

    • statuscode: The statuscode denotes the code displayed when the status is Success or Failure. For a successful operation, the status code is 200.

    Success

     

    When the operation is successful, the output response format is as given below,

     

    response uri=[url value]

     

    status=Success

     

    statuscode=200

     

     

    Sample Response

     

    response uri="api/xml/getContact"

     

    status=Success

     

    statuscode=200

     

    Error

     

    Errors occur when the API Key is not valid or the parameter value does not exist in the application. In such cases, the output format is as shown below,

     

    response uri=[url value]

     

    status=Failure

     

    statuscode=failurecode

     

     

     

    Sample Response

     

    response uri="api/xml/getContact"

     

    status=Failure

     

    statuscode=5000

     

    statusmessage=The Request ID [ ] not found.

     

     

    Sample Input Form

     

    Sample form for the operation 'getContact' is given below,

     

    <form method="GET" action="http(s)://<server-name>:<port-number>/api/xml/getContact">

    <input type="hidden" name="apikey" value="[SupportCenter-API-Key]">

    <input type="text" name="id" value="[Contact ID of the contact to view/read]">

    <input type="text" name="account" value="[Account Name of the contact]">

    <input type="submit" name="submit" value="submit">

    </form>

     

    Say, the email ID specified is jake@acme.com and the Account name is Acme. The Contact details of Jake from the account Acme is listed.

    To conduct a search for a specific contact or to list the contacts according the alphabet, specify the starting alphabetic of the contact.

     

    View/Read Product

     

    This operation displays the Product associated to the specified account along with the product details.

     

    URL Format

     

     

    The URL format for the Account operation - View/Read Product for an account

     

    For xml output
     

    http://<server-name>:<port-number>/api/xml/getProduct

     

     

    For json output

     

    http://<server-name>:<port-number>/api/json/getProduct

     

     

    Parameters

     

    The parameter to be passed via HTTP method is given below,

     

     

    Parameter

     

    Value

     

    Description

     
    account

     

    string

     

    Account name to view the products.   

     

     

    Output Response Format

     

    The output response format for both xml and json consists of three parameters:-

    • response uri: The response uri is the url value sent over HTTP POST or GET method.

    • status: The status denotes the status of the operation. Here there are only two status - Success and Failure.

    • statuscode: The statuscode denotes the code displayed when the status is Success or Failure. For a successful operation, the status code is 200.

    Success

     

    When the operation is successful, the output response format is as given below,

     

    response uri=[url value]

     

    status=Success

     

    statuscode=200

     

     

    Sample Response

     

    response uri="api/xml/getProduct"

     

    status=Success

     

    statuscode=200

     

    Error

     

    Errors occur when the API Key is not valid or the parameter value does not exist in the application. In such cases, the output format is as shown below,

     

    response uri=[url value]

     

    status=Failure

     

    statuscode=failurecode

     

     

    Sample Response

     

    response uri="api/xml/getProduct"

     

    status=Failure

     

    statuscode=5002

     

    statusmessage=The Account [account name] does not exist.

     

     

    Sample Input Form

     

    Sample form for the operation 'getProduct' is given below,

     

    <form method="POST" action="http(s)://<server-name>:<port-number>/api/xml/getProduct">

    <input type="hidden" name="apikey" value="[SupportCenter-API-Key]">

    <input type="text" name="account" value="[Name of the account to view the products]">

    <input type="submit" name="submit" value="submit">

    </form>

     

    Copyright © 2017, ZOHO Corp. All Rights Reserved.