The input is two parts: The first part is a JSON document
containing the context information. The second part is a JSON stream
that is either concatenated or newline-delimited.

application/stream+json

The input is a JSON stream that is either concatenated or
newline-delimited. This type of input is evaluated using an empty
context.

The context document contains the fields defined by the SmartConsent.

The JSON stream contains a stream of JSON documents each
representing a data subject. The unique identifier of the data subject
is embedded in each document, and the location of the identifier is
given with the idptr query parameter. If omitted, the
subject identifier is assumed to be accessible via the JSON
pointer /id. For example, the following subject document
has a userId field under metadata, and the
API must be called with idptr=/metadata/userId:

{
"metadata": {
"userId": "123aefgf354",
"name": "userName"
},
...

If idtype is specified, then all subjects are assumed
to be of the given idtype. If idtypeptr is
specified, then the subject types are read from each document,
assuming idtypeptr is a JSON pointer to a string
field. If neither idtype nor idtypeptr is
specified, then all subjects are assumed to be users.

The output format depends on the format query
parameter. If format=filter, then a subject document read
from the input will be copied to the output only if the subject has
consent. Otherwise the subject will be ommitted. If
the format is ommitted or any other value, then the
output will contain a stream of documents containing subject ID and
the result: