The Decision API enables you to make ad requests without using ad code. By posting to a RESTful endpoint, Kevel's ad engine will return decision data and creative contents that can be used to serve ads in your application.You'll want to set the Content-Type in the header as application/json. The API will also accept text/plain to support applications that cannot change the content type
If the request does not contain a user key, one is automatically generated in the response. UserKeys are important for Frequency Capping and UserDB.
Note
API Key authentication is not required when making a Decision API request. For added security, Kevel has the option to require API Key authentication. Please reach out to your CSM or [email protected] to enable.
For more on authenticating requests, see this page.
Error Handling
Message | Reason(s) |
---|---|
Out of n% placements on the request, none were valid | The siteId has been deleted The siteId is not active - No siteId on the request |
Keywords must be an array or string | Keywords are not a string or an array of strings |
invalid JSON | JSON is not valid |
Request received with no placements defined | The placements object or the request body is missing |
No sites found | Invalid SiteId provided in the request |
Count must be an integer in the interval [1, 20] | placements.count in the request is not between 1 and 20 |
Event multiplier must be an integer in the interval [1, 100000000] | placements.eventMultiplier in the request is not between 1 and 100000000 |