Advice

Taffrail has a suite of APIs yet only one endpoint is necessary for most implementations. This single endpoint is known simply as the "Advice API".

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

ID of the Advice Set

Query Params
params
object

Variable name/value pairs, one query parameter per Variable: Marital_Status=married sets the Variable Marital_Status to married. A Variable name starts with a letter or digit and holds only letters, digits, underscores (_), question marks (?), and dots (.). A dot only separates segments, as in Profile.Age: never first, never last, never two in a row, and the segment after it starts with a letter, digit, or underscore. A name never contains __ or ?., and never begins with fields. or include., which belong to those request parameters. As a regular expression: ^(?!.*__)(?!.*\?\.)(?!(?:fields|include)\.)[a-zA-Z0-9][a-zA-Z0-9_?]*(?:\.[a-zA-Z0-9_][a-zA-Z0-9_?]*)*$. The dot is part of the name, so Profile.Age, ProfileAge, and Profile_Age are three different Variables. Send a dotted name whole, as Profile.Age=42.

string
enum

Optional API context, use only when instructed.

Allowed:
fields
object

JSONAPI-style sparse fieldsets. Use ?[field]=prop1,prop2 to limit returned fields or ?[field]= to return no data for that property. Omitting the fields querystring parameter entirely defaults to all properties being returned.

filter
array of strings

Trims the variables[] array. Omit it and the default applies: Variables with a null value, System Variables, and Constant Variables are all dropped — equivalent to the example below. Send all for every Variable, untrimmed. Each keyword also works on its own, and a modifier implies the base filter it modifies, so variables:!system drops null-valued Variables as well as System Variables. A value that is not a string or an array of strings returns HTTP 400.

filter
Allowed:
include
array of strings

Include additional data for debugging. stack adds the nodes the evaluation produced, before formatting. Do not use in Production.

include
string
enum

Add transformed advice headlines to the response. When fields[advice] is set, it must include headline; omitting fields entirely is fine.

Allowed:
Headers
integer
enum
required
Defaults to 2
Allowed:
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/vnd.taffrail.json+text
application/vnd.taffrail.json+html
application/vnd.taffrail.json+htmlnolinks
application/vnd.taffrail.json+attrstring
application/vnd.taffrail.json+raw
application/json