Eligible for campaign
/me/eligible_for_campaign
Target audience: Developers
Release version: 4.2.0
Eligible for campaign purchase¶
Introduction¶
This endpoint uses the Payway Campaign Rules to determine if the user is eligible to buy a specific campaign.
Note: This endpoint does not validate criteria outside configured campaign rules. For a more complete validation result, we recommend using the Pre-validate purchase endpoint instead.
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/me/eligible_for_campaign |
Production | https://backend.worldoftulo.com/external/api/v1/me/eligible_for_campaign |
Requirements¶
Identity | Scope |
---|---|
Yes | /external/me/r |
Parameters¶
Field | Required | Type | Description |
---|---|---|---|
campaign_code | Required | String | The campaign code to check eligibility for. Size range: ..50 |
Curl Example¶
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/eligible_for_campaign \
--header 'accept: application/json' \
--header 'authorization: Bearer <access_token_with_identity>' \
--header 'content-type: application/json' \
--data '{
"campaign_code": "my_campaign_code"
}'
Response¶
HTTP 200 OK
{
"item": {
"eligible": true,
}
}
Errors¶
This API uses the common error conventions of the Payway API