ICTContact provides REST-based APIs to integrate it with the third party applications and automate the process. The REST API provides the external interface to call out the important functions of the ICTContact and integrate them with the third party.

ICTContact provides three basic classes which are API_USER, API\_CONTACT and API\_CAMPAIGN.

REST APIs for User management

Here we describe the REST APIs for the user management.

ICTContact-Bussiness

  • User_Create
    This REST API adds the new user to the system. To call this REST API follow this procedure: Parameters $user: Array containing the user data Return value If the user request was successful it will return the user_id and username, otherwise returns array with false value / error

  • User_Update
    This REST API updates the existing user data. To call this REST API follow this procedure Parameters $user_id: ID of the user whom record is to be updated $user: Array containing the user data Return value If the user request was successful it will return the json encoded user data, otherwise returns array with false value / error

  • User_Get
    This REST API returns the data of the user whom id is provided as a parameter. Parameters $user_id: ID of the user $search: search $value: value Return value If the user request was successful it will return the json encoded user data, otherwise returns array with false value / error

  • User_Delete
    This REST API deletes a user whom id is provided as an argument. Parameters $user_id: ID of the user Return value Returns boolean value true if user deleted successfully otherwise returns false.
  • User_Extension_Create
    This REST API creates extension for the given user. Parameters $user_id: ID of the user $extension: array containing data for the new extension Return value Returns json encoded string containing extension data if successful. Otherwise returns array containing false value.
  • User_Role_List
    This REST API returns all available roles. Parameters It requires no parameters Return value Returns json encoded string containing user roles if successful otherwise false.
  • User_Payment_Create
    This REST API adds balance in the user account Parameters $user_id: ID of the user $value: paid amount to add $description: brief description $type: type of payment Return value Returns true if balance / credit was added successfully otherwise returns false.
  • User_Login
    This REST API logs in a user. Parameters $session_id: Session ID Return value Returns session name if successful otherwise returns false.
  • User_Logout
    This REST API destroys current user session in order to log him / her out. Parameters $session_id: Session ID Return value Returns the session name if request was successful otherwise returns false value.

ICTContact-Integration

REST APIs for Campaign management

Here we describe the REST APIs for campaign management.

  • Campaign_Status
    This REST API gives status of the campaign whose ID is provided as an argument. Parameters $campaign_id: ID of the campaign whose status is required Return value Returns json encoded string containing campaign status data if successful otherwise return false.
  • Campaign_Start
    This REST API starts a campaign whose ID is provided as an argument. Parameters $campaign_id: ID of the campaign Return value Returns json encoded string containing campaign status data if request was successful otherwise returns false.
  • Campaign_Stop
    This REST API stops a campaign whose ID is provided as an argument. Parameters $campaign_id: ID of the campaign Return value Returns json encoded string containing campaign status data if request was successful.
  • Campaign_Contact_Create
    This REST API creates a given contact that will be dialed by the campaign whose ID is provided as an argument. Parameters $contact_id: Array containing contact data that will be created.. $campaign_id: ID of the campaign Return value Returns json encoded string containing campaign data if request was successful otherwise return false.
  • Campaign_Summary
    This REST API returns the summary of the campaign. It will list status (busy, congestion, no-response, failed) of each contact in the campaign. Parameters $campaign_id: ID of the campaign whose status is required $usr_id: ID of the user owns this campaign Return value Returns json encoded string containing campaign data if request was successful otherwise return false.
  • Campaign_Result
    This REST API updates a campaign and its status. Parameters $campaign_id: ID of the campaign whose status is required $status: status of the campaign $usr_id: ID of the user owns this campaign Return value Returns json encoded string containing campaign data if request was successful.
  • Campaign_Filter
    This REST API provides a search filter for searching campaigns. Parameters $search: Array of search query for the campaign data. Return value Returns json encoded string containing campaign data if request was successful.

REST APIs for Contact management

Here we describe the REST APIs for contact management.
* Contact_Create
This REST API creates a new contact in specified group. Parameters $contact: Array containing contact data. $contact_group_id: ID of the contact group. Return value Returns json encoded string containing status of the contact if request was successful.
* Contact_Delete
This REST API removes a contact whose ID is provided as an argument. Parameters $contact_id: ID of the contact to remove. Return value Returns json encoded string containing status of the contact if request was successful.

Push Call Status

Through ICTContact we can also update the server of the 3rd party by sending them request through REST API.

A simple scenario is during campiagn management when calls are being processed it is also possible that some calls fail so we use REST API to update the 3rd party server that call was failed so we push the call status on the 3rd party server.

ICTContact-Integration