Parameters

Most Taffrail API endpoints accept request parameters. Send them as query parameters on a GET request or as a JSON body on a POST request.

Query parameters

On a GET request, query parameters control what the response includes. They are almost always optional.

Body parameters

Body parameters behave identically to query parameters — only the transport differs. See HTTP request methods.

User inputs and Variables

A Variable is a named parameter that powers a piece of advice. Variables can be passed in as input or produced by the Rules Engine from a formula, rule, or calculation.

Any request can include Variable name/value pairs as parameters:

/api/advice/{adviceSetId}?Tax_Year=2026

Send a Date Variable as YYYY-MM-DD, such as ?DOB=1991-10-31, with no time and no offset. See Dates.

See Variables for the full reference.

Dotted Variable names

A Variable name can contain dots, as in Profile.Age. The naming rule spells out where they may appear. Send a dotted name whole, as one key, on every transport — in a query string:

/api/advice/{adviceSetId}?Profile.Age=42

or in a JSON body:

{ "Profile.Age": 42 }

A JSON body may nest the name instead: { "Profile": { "Age": 42 } } sets the same Variable. When a request carries both spellings, the flat Profile.Age key wins. The API follows a nested name through objects only. An array is always a value and never read by index, so { "Profile": [{ "Age": 42 }] } sets nothing.

Spelling matters: sending Profile_Age never sets Profile.Age. The response's variables[] lists the Variable as Profile.Age whether you sent it flat or nested.

Variable Dictionary

GET /api/dictionary returns every Variable available to your account. Each entry includes reservedName, dataType, validOptions, isClosedSet, and displayFormat.

Use this endpoint to discover which Variables a given integration can pass. Input parameters are not arbitrary — they must match Variables defined in your account. Pass a ruleSetId query parameter to scope the result to a single rule.

See the Variable Dictionary API Reference for the full schema.

Sending answers back

The API is stateless. It keeps nothing between requests, so each request must carry every answer and input you want the rules to use. Three fields in the Advice API response show what arrived and what to send next time:

FieldWhat it holds
paramsThe inputs this request sent, with request controls removed. It keeps inputs no question asks for and never holds a value the rules calculated.
replayParamsAllThe answers to the questions this evaluation reached, including answers a rule filled with a default.
replayParamsreplayParamsAll without the defaults a rule filled in and the Variables a rule marked with omitParam. It is the smallest set of answers that reproduces this path, and the set Taffrail's own pages put in the URL.

Neither replay set carries data the rules read without asking a question, such as profile or plan values. If you hold that data, send it with every request next to the replay params. Sending replayParams back alone drops it.

A read-only Variable replays only when your request supplied its value, so a Taffrail default never comes back looking like yours. A Date in either replay set is a timestamp: send back its first ten characters (Dates). The API Reference lists what each field includes and leaves out.

Parameter reference

ParameterTypeRequiredDescription
adviceSetIdStringYesThe Advice Set identifier. Passed as a path parameter.
filterStringNoTrim the variables[] array. See Filtering Variables in the response.
fields[TYPE]StringNoTrim properties off each entry per type. See Sparse Fieldsets.
{VariableName}VariesNoAny Variable name/value pair. Look up valid names via the Variable Dictionary endpoint. Send a Date as YYYY-MM-DD (Dates).

Sparse fieldsets

The API supports Sparse Fieldsets for trimming response payloads.