Skip to main content
Version: 3.x

Eligibility check

Use this endpoint to check whether a user currently has a survey offer available before you show them a call-to-action. It returns a simple has_offer true/false plus the links you need to send the user into (or away from) the offer.

POST https://www.tapresearch.com/supply_api/v4/surveys/offer

All requests must be made over HTTPS.


Request

Send the parameters as form-encoded body fields.

ParameterTypeRequiredDescription
user_identifierStringYour persistent, unique identifier for this user.
api_tokenStringThe API token for your app, found in the Publisher Dashboard. Must belong to an app created with the Eligibility API type.
client_ipStringThe end user's IP address.

Example Request

curl -X POST https://www.tapresearch.com/supply_api/v4/surveys/offer \
-d "user_identifier=user-12345" \
-d "api_token=your-api-token" \
-d "client_ip=203.0.113.42"

Response

The response is a JSON object. has_offer is the field to branch on; the URLs and message_hash are only meaningful when has_offer is true.

FieldTypeDescription
has_offerBooleantrue if the user has an offer available, false otherwise.
offer_reasonIntegerA code explaining the result. Always present. See Reason codes.
reason_commentStringHuman-readable explanation of offer_reason. Always present.
offer_urlStringThe URL to send the user to in order to start the offer. Present when has_offer is true.
abandon_urlStringThe URL to send the user to if they decline or abandon the offer. Present when has_offer is true.
message_hashObjectDetails about the reward for completing the offer. See message_hash below.

message_hash

A preview of the reward range currently available to this user, given current survey inventory.

FieldTypeDescription
minStringMinimum reward amount currently available.
maxStringMaximum reward amount currently available.
currencyStringThe name of the currency the user earns.

Example Response — offer available

{
"has_offer": true,
"offer_url": "https://www.tapresearch.com/supply_api/v3/surveys/start?token=...",
"abandon_url": "https://www.tapresearch.com/supply_api/v3/surveys/abandon?token=...",
"message_hash": {
"min": "50",
"max": "200",
"currency": "gold"
}
}

Example Response — no offer

{
"has_offer": false,
"offer_reason": 19,
"reason_comment": "No content available"
}

Using the response

  • has_offer: true — Show your call-to-action and link the user to offer_url. Use message_hash to display the reward range (for example, "Earn 50–200 gold"). If the user backs out, send them to abandon_url.
  • has_offer: false — Do not show the call-to-action. There is nothing for the user to do right now.

When the user completes the offer, TapResearch reports the reward to your server through a callback.


Reason codes

Every response includes offer_reason (an integer) and a matching reason_comment. Branch on the code, not the comment text. Common values:

CodeMeaning
0Qualified — an offer is available (has_offer: true)
1Not qualified — no surveys available for this user right now
2App is in test mode — only registered test devices are eligible
4Not a supported country
5User is under the supported age
6Missing user identifier
8User is banned
19No active offers available
20User identifier is an anonymous device advertising ID, not a real user ID
22User is blacklisted

This is the common subset; other codes may appear.

Errors

Errors return { "error": "<message>" } with an HTTP status:

StatusWhen
401 UnauthorizedMissing or invalid api_token — body {"error":"Unauthorized."}
422 Unprocessable Entityuser_identifier missing ({"error":"user_identifier must be specified"}), or the token isn't an Eligibility API app ({"error":"This endpoint requires a v4 Eligibility API app."})

TapResearch may also return 503 during maintenance.