Supplier API

Introduction:

The following are the base URLs for the Supplier API.

Base URL

Environment URL
PROD https://api.imadconnect.com/
Staging https://st-api.imadconnect.com/

Staging is a sandbox environment that can be used for testing. You will need credentials to access it. Credentials can be requested by contacting your integration contact.

In this documentation, the base URL will appear as the variable {baseUrl}.

Supplier API

Get Project List:

This API will allow supplier(s) to see the all mapped project linked to them.

Definition

GET '{baseUrl}/v1.0/Supplier/GetProjectList' \ --header 'x-api-key: < Key Provided to you >


Type

"Type" : GET,


Example Response

{
"projectId" : 50001,
"projectCode" : "IMC50001",
"projectCategory" : "Healthcare",
"cpi" : "0.50",
"countryCode" : "IN",
"country" : "India",
"surveyLink" : "https://st-redirect.imadconnect.com/Router/Index?tid=xxxx&uid=[identifier]",
"loi" : 2,
"ir" : "45.00",
"startDate" : "2020-12-30",
"endDate" : "2021-02-28",
"sampleSize" : 100,
"deviceType" : {
          "mobile" : true,
          "tablet" : true,
          "desktop" : true
        },
}

{
"projectId" : 50002,
"projectCode" : "IMC50002",
"projectCategory" : "B2B",
"cpi" : "9.00",
"countryCode" : "GB",
"country" : "United Kingdom of Gr",
"surveyLink" : "https://st-redirect.imadconnect.com/Router/Index?tid=xxxx&uid=[identifier]",
"loi" : 12,
"ir" : "65.00",
"startDate" : "2021-01-03",
"endDate" : "2021-01-31",
"sampleSize" : 50,
"deviceType" : {
          "mobile" : true,
          "tablet" : true,
          "desktop" : true
        },
}

{
"projectId" : 50005,
"projectCode" : "IMC50005",
"projectCategory" : "B2B",
"cpi" : "2.50",
"countryCode" : "IN",
"country" : "India",
"surveyLink" : "https://st-redirect.imadconnect.com/Router/Index?tid=xxxx&uid=[identifier]",
"loi" : 12,
"ir" : "65.00",
"startDate" : "2020-12-30",
"endDate" : "2021-02-28",
"sampleSize" : 50,
"deviceType" : {
          "mobile" : true,
          "tablet" : true,
          "desktop" : true
        },
}

{
"projectId" : IMC50006,
"projectCode" : "IMC50006",
"projectCategory" : "Healthcare",
"cpi" : "12.50",
"countryCode" : "US",
"country" : "United States",
"surveyLink" : "https://st-redirect.imadconnect.com/Router/Index?tid=xxxx&uid=[identifier]",
"loi" : 25,
"ir" : "45.00",
"startDate" : "2021-01-14",
"endDate" : "2021-01-31",
"sampleSize" : 100,
"deviceType" : {
          "mobile" : true,
          "tablet" : true,
          "desktop" : true
        },
}

Supplier API

Get Project Details:

This API will allow supplier(s) to get the project details for the particular mapped project.

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

GET '{baseUrl}/v1.0/Supplier/GetProjectDetails?ProjectId=50001' \ --header 'x-api-key: Key Provided to you'


Type

"Type" : GET,


Example Response

{
"projectId" : 50001,
"projectCode" : "IMC50001",
"projectCategory" : "Healthcare",
"cpi" : "0.50",
"countryCode" : "IN",
"country" : "India",
"surveyLink" : "https://st-redirect.imadconnect.com/Router/Index?tid=xxxx&uid=[identifier]",
"loi" : 2,
"ir" : "45",
"startDate" : "2020-12-30",
"endDate" : "2021-02-28",
"sampleSize" : 100,
"deviceType" : {
          "mobile" : true,
          "tablet" : true,
          "desktop" : true
        },
}

Supplier API

Get Targeting:

This API will allow a supplier(s) to get targeting associated with each project.

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

GET '{baseUrl}/v1.0/Supplier/GetProjectTargetting?ProjectId=50001' \ --header 'x-api-key: Key Provided to you'


Type

"Type" : GET,


Example Response

[
{
"languageCode": : EN,
"questionId": : 10001,
"questionDesc" : "What is your age?",
"questionTitle" : "AGE",
"optionId" : 1890,
"questionOptionDesc" : "18-25",
},
{
"languageCode": : EN,
"questionId": : 10002,
"questionDesc" : "What is your gender?",
"questionTitle" : "GENDER",
"optionId" : 50001,
"questionOptionDesc" : "Male",
},
{
"languageCode": : EN,
"questionId": : 10002,
"questionDesc" : "What is your gender?",
"questionTitle" : "GENDER",
"optionId" : 50002,
"questionOptionDesc" : "Female",
},
{
"languageCode": : EN,
"questionId": : 10071,
"questionDesc" : "What is your current employment status?",
"questionTitle" : "EMPLOYMENT",
"optionId" : 51178,
"questionOptionDesc" : "Employed full-time",
},
{
"languageCode": : EN,
"questionId": : 10071,
"questionDesc" : "What is your current employment status?",
"questionTitle" : "EMPLOYMENT",
"optionId" : 51179,
"questionOptionDesc" : "Employed part-time",
},
{
"languageCode": : EN,
"questionId": : 10071,
"questionDesc" : "What is your current employment status?",
"questionTitle" : "EMPLOYMENT",
"optionId" : 51180,
"questionOptionDesc" : "Self-employed full-time",
},
]

Supplier API

Get Project Quota:

This API will allow supplier(s) to get quotas associated with project. Supplier will be provided quota size.

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

GET '{baseUrl}/v1.0/Supplier/GetProjectQuota?ProjectId=50001' \ --header 'x-api-key: Supplier Key Provided'


Type

"Type" : GET,


Example Response

{
"quota" : 100,
"message" : "Quota is available"
},

Supplier API

Get Country List:

This API will allow supplier(s) to get country list of the project. This will returns with country code.

Location Request

GET '{baseUrl}/v1.0/Supplier/GetCountry' \ --header 'x-api-key: Supplier Secret Key'


Example Response

[{
"countryId": : 1,
"countryName" : "Afghanistan",
"countryCode" : "AF"
},
{
"countryId": : 2,
"countryName" : "Albania",
"countryCode" : "AL"
},
{
"countryId": : 3,
"countryName" : "Algeria",
"countryCode" : "DZ"
},
{
"countryId": : 4,
"countryName" : "American Samoa",
"countryCode" : "AS"
},
{
"countryId": : 5,
"countryName" : "Andorra",
"countryCode" : "AD"
},
{
"countryId": : 251,
"countryName" : "Åland Islands",
"countryCode" : "AX"
}],

Supplier API

Get Project Status:

This API will allow supplier(s) to get project status.

The possible project status will be;

  • Active
  • Inactive
  • Closed

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

GET '{baseUrl}/v1.0/Supplier/GetProjectStatus?ProjectId=50001 ' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : GET,


Example Response

{
"projectId" : 50001,
"flagId" : 1,
"flagStatus" : "Active"
},

Supplier API

Get Project Statistics:

This API will allow supplier to get all stats for specific project.

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

GET '{baseUrl}/v1.0/Supplier/GetProjectStatistics?ProjectId=50001 ' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : GET,


Example Response

{
"projectCode" : "IMC50001",
"country" : "India",
"countryCode" : "IN",
"projectCategory" : "Healthcare",
"cpi" : "0.50",
"fieldLOI" : 0,
"fieldIR" : "100.00 %",
"conversion" : "100.00 %",
"dropRate" : "0.00 %",
"remaining" : 99,
"lastComplete" : "2021-01-04T10:04:12.24",
"complete" : "1",
"terminate" : 0,
"fraudSurveyQualityTerm" : 0,
"overQuota" : 0,
"dropout" : 0,
"dupliCateUser" : 0,
"geoIPMismatch" : 0,
"uniqueIP" : "0",
"preScreenTerminate" : 0,
"deviceType" : 0,
"rejected" : 0,
"testLink" : 0,
},

Supplier API

Set Redirect Links:

This API will allow supplier to set their Redirect Links for specific project.

Query Parameters

Property Type Required Description
ProjectId Integer Yes Project Id of particular Project (like: 50001)

Location Request

POST '{baseUrl}/v1.0/Supplier/SetRedirectLinks?ProjectId=50001' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : POST,


Body

{
"Complete" : "https://st-redirect.imadconnect.com/Thanks/Index?sid=fMbeBVAn&status=c&uid=[identifier]",
"Terminate" : "https://st-redirect.imadconnect.com/Thanks/Index?sid=fMbeBVAn&status=t&uid=[identifier]",
"OverQuota" : "https://st-redirect.imadconnect.com/Thanks/Index?sid=fMbeBVAn&status=q&uid=[identifier]",
"Close" : "https://st-redirect.imadconnect.com/Thanks/Index?sid=fMbeBVAn&status=sc&uid=[identifier]",
"QualityTerm" : "https://st-redirect.imadconnect.com/Thanks/Index?sid=fMbeBVAn&status=f&uid=[identifier]",
},


Example Response

Link updated successfully.

Supplier API

Get Question Library:

This API will allow supplier to get all Questions for specific country language.

Question List can be retrived for any specific language code and country code combination.

Query Parameters

Property Type Required Description
CountryCode string Yes Question list based on country selected
LangCode string Yes Question list based on language selected

Please download the reference CountryCode master file. Download

Please download the reference LanguageCode master file. Download

Location Request

GET '{baseUrl}/v1.0/Supplier/GetQuestionLibrary?CountryCode=US&LangCode=EN' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : GET,


Example Response

[
{
"questionId" : 269,
"questionTitle" : "ACCOMMODATION_TYPE",
"questionDesc" : "In which type of accommodation have you stayed in the past year?",
"languageCode" : "EN",
"countryCode" : "US",
},
{
"questionId" : 270,
"questionTitle" : "AGE",
"questionDesc" : "What is your age?",
"languageCode" : "EN",
"countryCode" : "US",
},
{
"questionId" : 271,
"questionTitle" : "ALCOHOL_FREQUENCY",
"questionDesc" : "On average, how many alcoholic drinks do you consume in a week?",
"languageCode" : "EN",
"countryCode" : "US",
},
{
"questionId" : 272,
"questionTitle" : "AUTO_BRANDS",
"questionDesc" : "If you own/lease a car(s), which brand(s) are they?",
"languageCode" : "EN",
"countryCode" : "US",
},
]

Supplier API

Get Question Options:

This API will allow supplier to get all Question Options for specific question.

Location Request

GET '{baseUrl}/v1.0/Supplier/GetQuestionOptions?Id=10002' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : GET,


Example Response

[
{
"optionId" : 50001,
"questionId" : 10002,
"optionText" : "Male",
"order" : 1,
"languageCode" : "en",
},
{
"optionId" : 50002,
"questionId" : 10002,
"optionText" : "Female",
"order" : 2,
"languageCode" : "en",
},
{
"optionId" : 50003,
"questionId" : 10002,
"optionText" : "Transgender",
"order" : 3,
"languageCode" : "en",
},
]

Supplier API

Get Question Option Library:

This API will allow Supplier to get all Questions for specific country language.

Question List can be retrived for any specific language code and country code combination.

Query Parameters

Property Type Required Description
CountryCode string Yes Question list based on country selected
LangCode string Yes Question list based on language selected

Please download the reference CountryCode master file. Download

Please download the reference LanguageCode master file. Download

Location Request

GET '{baseUrl}/v1.0/Supplier/GetQuestionOptionLibrary?langCode=EN&countryCode=US' \ --header 'x-api-key: Supplier Secret Key'


Type

"Type" : GET,


Example Response

[
{
"questionId" : 3443,
"questionTitle" : "Gender",
"controlType" : "Radio",
"questionDesc" : "What is your gender?",
"languageCode" : "EN",
"countryCode" : "US",
"options" : [
                   {
                     "optionId" : 5245,
                     "questionId" : 3443,
                     "optionText" : "Male",
                     "order" : 1,
                     "languageCode" : "EN",
                    },
                   {
                     "optionId" : 5246,
                     "questionId" : 3443,
                     "optionText" : "Female",
                     "order" : 2,
                     "languageCode" : "EN",
                    },
                 ],
},
]

Supplier API

Hashing Mechanism : Redirect URL for complete

imadconnect uses Hashing Mechanism for the encryption using SHA1 Encryption.

Steps to generate hash -
  1. Secret key, is required to generate hash, and will be provided by imadconnect Manager. For eg. 9S9z4T9K6hyqEMlkoATOpZFZpLT5Urgc
  2. imadconnect will use complete URL without hash variable in it. For eg.

    https://st-redirect.imadconnect.com/thanks/verify?status=c&uid=4E53F51A-632D-4CC4-889E-EEED30A0673E

Sample C# code to generate hash :

public static string HashString(string StringToHash, string HachKey)
{
System.Text.UTF8Encoding myEncoder = new System.Text.UTF8Encoding();
byte[ ] Key = myEncoder.GetBytes(HachKey);
byte[ ] Text = myEncoder.GetBytes(StringToHash);
System.Security.Cryptography.HMACSHA1 myHMACSHA1 = new
System.Security.Cryptography.HMACSHA1(Key);
byte[ ] HashCode = myHMACSHA1.ComputeHash(Text);
string hash = BitConverter.ToString(HashCode).Replace("-", "");
return hash.ToLower();
}

Generated Hash = “6c8e890b31f489780a3796e02f64c4551ec85eb1”. Add this hash value in the URL mentioned in step 2.

Final URL which will be redirected as below:

https://st-redirect.imadconnect.com/thanks/verify?status=c&uid=4E53F51A-632D-4CC4-889E-EEED30A0673E&hash=6c8e890b31f489780a3796e02f64c4551ec85eb1