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. Send a Date Variable as YYYY-MM-DD, such as DOB=1991-10-31, with no time or offset. A raw + reads as a space. See Dates.

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

Adds transformed.text from non-blank advice headlines and, for +html content types, transformed.html from HTML headlines. The advice array is unchanged. When fields[advice] is set, it must include headline; omitting fields entirely is fine.

Allowed:
Headers
integer
enum
required
Defaults to 2
Allowed:
string

Opaque session identifier for the end user, for analytics. Reuse the same value across a visitor's requests so they correlate into one session. Also accepted as taffrail-sid; when both arrive, cmfy-taffrail-sid wins.

string

The end user's IPv4 or IPv6 address, for analytics. Forward this when calling server-to-server on a user's behalf so usage is attributed to the person rather than your server; values that don't parse as a real IP address are ignored. Also accepted as taffrail-client-ip; when both arrive, cmfy-taffrail-client-ip wins.

string

URL of the page that originated the request, for analytics. Takes precedence over the standard Referer header. Also accepted as taffrail-api-referrer; when both arrive, cmfy-taffrail-api-referrer wins.

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