REST API

REST API

To communicate to the web service you will need to request the following URL as a web service URL using your programming language.

API URL: https://avidtrak.com/webservice/api

Web Service Type: REST

Required Parameters for all actions:

  • pincode: pincode for authentication purpose
  • method: data to be pulled for
  • format: json or xml

Note: Every method has its own set of parameters as well mentioned under each method detail below

Example URL: https://avidtrak.com/webservice/api?pincode=YOUR_PIN_CODE&format=xml&method=search_number

How to Get Pincode for Agency

  • Login to AvidTrak interface at https://passport.avidtrak.com
  • Navigate to “Account Settings” page and click “Preferences”
  • You will see your Pincode under "API" heading, If Pincode is empty then click "Generate" button to generate it
generate

How to Get Pincode for Individual Client & Agency Client

For Agency Client

  • Login to AvidTrak interface at https://passport.avidtrak.com
  • Navigate to “Account Settings” page and click “Preferences”
  • You will see your Pincode under "API" heading, If Pincode is empty then click "Generate" button to generate it
login

For Client Accounts

Correct Response:

Following is the response upon successful query.

JSON XML
{
“code”:200,
“status”:”Success”,
“data”:[{
“channel”:”PORTAL”,
“campaign”:”Internet X-Sell
},
{
“channel”:”PORTAL”,
“campaign”:”Internet X-Sell
}]
}
<response>
<code>1</code>
<status>Success</status>
<data>
<row>
<channel>PORTAL</channel>
<campaign>Internet X-Sell </campaign>
</row>
<row>
<channel>PORTAL</channel>
<campaign>Internet X-Sell West</campaign>
</row>
</data>
</response>

Incorrect Response:

Following is the response if an error is produced from the server

JSON XML
{
“code”:401,
“status”:”Authentication Failed”,
“data”:null
}
<response>
<code>401</code>
<status>Authentication Failed</status>
<data><data/>
</response>

Response Codes and Status

Code Status Description
1 Success Successfully performed the action
0 Unknown Error Mostly if any method related parameters are invalid or missing or data not found
3 Authentication Required PINCODE not provided
4 Authentication Failed Invalid Pincode
6 Invalid Response Format Response format provided other then xml or json
404 Invalid Request Method Provided method name is invalid

Methods:

Create Client Account

This method is used to create new client account under agency

Method name: create_account

Parameters

Parameter Required Description
userid Yes User ID for new client
password Yes Password for new client Alphanumeric
account_type Yes
  • pro (Online/Offline tracking)
  • lite (Offline tracking)
email No Email address for client
contact_name No Name of Client
contact_number No Contact number for client
domain No Client Domain

Note: The Pincode for new account will be provided in method reply if account successfully created

Responses

You might get different responses as shared below.

>Upon finding that the UserID already exist you will get the response:-

response

Upon a successful account creation the response will be:-

account

List Numbers

This method will list the numbers under client

Method name: list_numbers

Parameters

Parameter Required Description
number_type No
  • toll
  • local

If parameter not set, it will provide all types of numbers.

assignment_type No
  • assigned
  • unassigned
  • all

If parameter not set, it will provide all numbers.

area_code No Valid Area Code. In case of Toll Number, it can be provided as 800,855,866….
If parameter not set, it will provide all numbers.

Upon a successful number listing you will get the response:-

response

Lite Campaign (Example Offline Campaigns: Print, TV & Radio)

This method will provide all offline active campaign details with the number of calls.

Method name: lite_campaign

Parameters

Parameter Required Description
startdate No Date from which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)
enddate No Date till which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)

The offline campaigns response will be:-

response10

Lite Campaign Calls

This method will provide all the offline campaign calls.

Method name: all_lite_calls

Parameters

Parameter Required Description
startdate No Date from which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)
enddate No Date till which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)

The response will be:-

response11

Call Logs

This method will provide call data

Method name: call_logs

Parameters

Parameter Required Description
startdate No Date from which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)
enddate No Date till which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)

Note: By default the data will be provided for “yesterday”

The response will be:-

response12

Caller Log

This method provides detailed call data for a specific caller.

Method name: caller_log

Parameters

Parameter Required Description
startdate No Date from which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)
enddate No Date till which you want to extract data. This can be in two formats
YYYY-MM-DD (year-month-day)
YYYY-MM-DD HH:MM:SS (year-month-day hour:minute:second)
caller_id No caller number in numeric, example: 3101234567

Client List

This method will provide the pincodes against each client username for an agency. This method will only work if the agency pincode is used

Method name: client_list

Parameters

No Parameters except required one mention in page 4.

The response will be:-

response13

Get Remaining Balance

This method will provide remaining balance against the pincode.

Method name: get_remaining_balance

Parameters

No Parameters except required one mention in page 4.

The response will be:-

response14

AVIDTRAK CALL TRACKING FAQs!

Use the Estimator tool to determine how many phone numbers you will need to perform keyword level call tracking.

If your account balance drops below $0 services to your account may be suspended. It is therefore essential that your account always maintain a positive balance. In the event that your credit card is declined AvidTrak’s billing system will issue a warning email advising you of the issues evidenced with your card. It is therefore important that you keep your billing email updated. Your billing email on file may be verified and/or updated by logging into your account and clicking My Account > My Account Setting.

Understand the customer’s digital journey on your website. Learn which pages are working for you in generatinggenerate the highest phone leads calls and sales.

NEED MORE DETAILS?

Contact us to schedule your demo today.

Learn About Intelligent Call Tracking