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,
URL Format
Parameters
The parameters that needs to be passed via HTTP method for adding a new account are as follows,
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:-
Success
When the operation is successful, the output response format is as given below,
response uri=[url value]
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 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>
This operation displays the Account details by specifying either the Account name, Account ID or the starting alphabet of the account.
URL Format
Parameters
The parameters that needs to be passed via HTTP method for viewing an account are as follows,
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:-
Success
When the operation is successful, the output response format is as given below,
response uri=[url value]
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 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>
URL Format
Parameters
The parameters that needs to be passed via HTTP method for adding a new contact are as follows,
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:-
Success
When the operation is successful, the output response format is as given below,
response uri=[url value]
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 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>
This operation displays the Contact details by specifying either the Contact name, Contact ID or the starting alphabet of the contact.
URL Format
Parameters
The parameters that needs to be passed via HTTP method for viewing a contact details are as follows,
Output Response Format
The output response format for both xml and json consists of three parameters:-
Success
When the operation is successful, the output response format is as given below,
response uri=[url value]
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 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.
This operation displays the Product associated to the specified account along with the product details.
URL Format
Parameters
The parameter to be passed via HTTP method is given below,
Output Response Format
The output response format for both xml and json consists of three parameters:-
Success
When the operation is successful, the output response format is as given below,
response uri=[url value]
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 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> |