Skip to main content
Version: v1

API Endpoint

Definition

This API endpoint allows you to fetch the top RapidoReach surveys for a given user in real time.

Request

POST https://www.rapidoreach.com/getallsurveys-api

Headers

HeaderDescriptionRequired
X-RapidoReach-Api-KeyAuthentication API Key (App key can be found from app credentials page)true

Parameters

Send a JSON payload in the request body. The service will create or update the respondent profile when it receives new data.

Root parameters

ParameterDescriptionRequired
UserIdUnique user identifier within your system. This value is used to create the RapidoReach respondent if one does not exist.true
AppIdPlacement ID from the publisher dashboard.true
IpAddressCurrent public IP address for the respondent.true
CityRespondent city.true
CountryLanguageCodeRespondent locale in the form LANG-CC (for example ENG-US, ENG-IN).true
DateOfBirthDate of birth in YYYY-MM-DD format.false (recommended for profiling)
GenderRespondent gender. Use M for male and F for female.false
ZipCodeRespondent postal / ZIP code.false
gps_idStable device fingerprint you capture for the user. Supplying this improves fraud prevention and de-duplication.false (recommended)
PublisherProfilingArray of partner-specific profiling responses collected on your side. See below for the payload shape.false

You can also submit the payload using the camelCase publisherProfiling key. For backwards compatibility, the legacy ProfilingResponses / profilingResponses keys are mapped to the same behaviour.

Publisher profiling payload

When you have already collected partner profiling answers from the user, send them in the following structure. The backend will validate the values against the partner catalog and upsert them on the respondent profile.

{
"PublisherProfiling": [
{
"partnerCode": "YOURSURVEYS",
"countryLanguageCode": "ENG-US",
"responses": [
{
"questionId": "AGE",
"answerIds": ["25-34"]
},
{
"questionId": "HOUSEHOLD_INCOME",
"answerIds": ["50K-75K", "75K-100K"]
}
]
}
]
}

Each entry targets a specific survey partner (partnerCode) and locale (countryLanguageCode). Answers are upserted, so repeated calls with the same question overwrite the stored values.

Examples

cURL

curl --location --request POST 'https://www.rapidoreach.com/getallsurveys-api' \
--header 'X-RapidoReach-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"UserId": "someUserIdofYourApp",
"AppId": "X2Qz4ddj1",
"IpAddress": "106.213.81.42",
"City": "New York",
"CountryLanguageCode": "ENG-US",
"DateOfBirth": "1993-01-21",
"Gender": "M",
"ZipCode": "10001",
"gps_id": "example-device-fingerprint"
}'

Success model

Successful response is a JSON array of survey objects with the properties given below.

PropertyTypeDescriptionRequired
SurveyNumberstringRapidoreach survey identifier.true
SurveyUrlstringSurvey entry link you should redirect the user to. The link already contains the correct tracking parameters.true
RewardnumberReward for your user in your virtual currency.true
LOInumberLength of interview in minutes.true
MatchingPercentageintegerEstimated conversion rate (%).true
vc_namestringName of the virtual currency configured for the placement.true
LinkstringCanonical RapidoReach link slug (/surveylink/create/...). Provided for reference; use SurveyUrl for traffic.true
ProvidedBystringAlways RAPIDOREACH for this API.true
CPInumberReward in USD before your virtual currency conversion.true
SurveyobjectMetadata from the upstream supplier (e.g. BidLengthOfInterview, SurveyName).true

Error model

Error response is a JSON object with the properties given below.

PropertyTypeDescriptionRequired
ErrorsarrayAPI errors in array it includes a list of all possible error messagesfalse
Infoarrayany other info descriptionfalse
Dataarray of objectsError messages providing further error detailsfalse
ErrorCodestringError codetrue

Examples

Success (200) Bad Request (400) Internal Server Error (500)

[
{
"ProvidedBy": "RAPIDOREACH",
"Reward": 59,
"SurveyNumber": "37146073",
"vc_name": "CB1234",
"CPI": 1.18,
"LOI": 10,
"Link": "/surveylink/create/YOURSURVEYS/37146073?i=63f1f51e59c927d429b1730b&enc=9d1ea09722600c0395d70ba621a9c3cbb3d9b18b",
"Survey": {
"BidLengthOfInterview": 10,
"SurveyName": "Other study"
},
"MatchingPercentage": 100,
"SurveyUrl": "https://www.rapidoreach.com/ofw/api-surveys/?api_respondent_id=testapi001-X2Qz5dxNX-763fab1b7c822cd9d69bc870a0bc831b&cpi=1.18&loi=10&surveynumber=37146073&providedby=YOURSURVEYS&i=63f1f51e59c927d429b1730b&enc=9d1ea09722600c0395d70ba621a9c3cbb3d9b18b"
},
{
"ProvidedBy": "RAPIDOREACH",
"Reward": 94,
"SurveyNumber": "37146770",
"vc_name": "CB1234",
"CPI": 1.88,
"LOI": 20,
"Link": "/surveylink/create/YOURSURVEYS/37146770?i=63f1f51e59c927d429b1730b&enc=fefb47ac5b6e4ff07411888282cd318e4e2d0596",
"Survey": {
"BidLengthOfInterview": 20,
"SurveyName": "Let us know what you think"
},
"MatchingPercentage": 100,
"SurveyUrl": "https://www.rapidoreach.com/ofw/api-surveys/?api_respondent_id=testapi001-X2Qz5dxNX-763fab1b7c822cd9d69bc870a0bc831b&cpi=1.88&loi=20&surveynumber=37146770&providedby=YOURSURVEYS&i=63f1f51e59c927d429b1730b&enc=fefb47ac5b6e4ff07411888282cd318e4e2d0596"
}
]

Pass User Profile Data

Profiler data parameters represent user answers for given questions used as survey qualifications. You do not have to pass these, as we will collect this data as needed. If you would like to initially pass data for a user, please see the full list of profiler data parameters to get all supported parameters and their value options per language.

INFO

All profiler data parameters other than the ones listed as required above are optional and can be omitted in the request.