Get Actions Deprecated
Get Actions is the main endpoint that returns the next actions a user can perform. This can be a list of surveys the user can open or qualifications (i.e. questions) the user still has to answer before we can return more surveys.
If surveys are returned, they are ordered by what we think is the best value for the user. To join a survey,
use the link
property of this reponse and open it in a browser. The user will be redirected from there.
When a survey is completed or a screenout happend, the user is redirected to the sites you specified on
your app's dashboard.
If a qualification is returned the user can answer it to potentially get more surveys. This endpoint returns
all information to display the question to the user. To answer it, look at POST /client/networks/{networkId}/questions/{questionId}
.
After answering a question, call the Actions endpoint again to get updated results.
Query parameters
-
platform string Deprecated
Platform/Device type of the user
Values are
MOBILE
,TABLET
, orWEB
. -
os string Deprecated
Operating System of the user
Values are
ANDROID
,IOS
, orDESKTOP
. -
sdk string
SDK the user is using
Values are
CUSTOM
,IFRAME
,TAB
,NATIVE
,UNITY
,REACT
, orFLUTTER
. -
sc_fingerprint string
optional fingerprint for survey filtering
-
client_country string(ISO 3166-1 alpha-2)
Allows overriding the country that is used for this request. This feature must be enabled by your account manager!
-
client_ip string
Allows overriding the ip that is used for this request. This feature must be enabled by your account manager!
-
client_useragent string
Allows overriding the useragent that is used for this request. This feature must be enabled by your account manager!
-
username string
Allows specifying a display name for the requesting user which is used for features such as the leaderboard. Nothing happens if it is not set. Only alpha-numeric characters are allowed.
-
ufm boolean
For internal usage only. Triggers user friendly api mode.
curl \
-X GET https://api.bitlabs.ai/v1/client/actions \
-H "X-Api-Token: $API_KEY" \
-H "X-User-Id: $API_KEY"
{
"data": {
"is_new_user": true,
"start_bonus": {
"reward": "string"
},
"restriction_reason": {
"not_verified": true,
"using_vpn": true,
"banned_until": "2020-05-04 17:01:30 UTC",
"reason": "string",
"unsupported_country": "string"
},
"surveys": [
{
"network_id": 42,
"id": 42,
"country": "string",
"language": "string",
"cpi": "string",
"value": "string",
"loi": 42.0,
"remaining": 42,
"details": {
"category": {
"name": "string",
"icon_url": "string",
"name_internal": "string"
},
"network": {
"name": "string",
"icon_url": "string"
},
"difficulty": "EASY"
},
"rating": 42,
"tags": [
"recontact"
],
"test_group_id": 42,
"link": "string",
"score": 42.0,
"sequence": 42,
"missing_questions": 42,
"next_missing_question": {
"network_id": 42,
"id": "string",
"country": "US",
"language": "en",
"type": "TEXT",
"localized_text": "string",
"answers": [
{
"code": "string",
"localized_text": "string"
}
],
"can_skip": true,
"is_duplicate": true
}
}
],
"qualification": {
"network_id": 42,
"question_id": "string",
"country": "US",
"language": "en",
"question": {
"network_id": 42,
"id": "string",
"country": "US",
"language": "en",
"type": "TEXT",
"localized_text": "string",
"answers": [
{
"code": "string",
"localized_text": "string"
}
],
"can_skip": true,
"is_duplicate": true
},
"is_standard_profile": true,
"is_start_bonus": true,
"score": 42.0,
"sequence": 42
}
}
}