<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sidefish.be/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dieter</id>
	<title>Sidefish Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sidefish.be/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dieter"/>
	<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php/Special:Contributions/Dieter"/>
	<updated>2026-05-03T04:24:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=64</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=64"/>
		<updated>2022-11-12T16:15:42Z</updated>

		<summary type="html">&lt;p&gt;Dieter: /* Models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v6 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
The scheme below shows a simplified data model.&lt;br /&gt;
&lt;br /&gt;
[[File:Sidefish-data-sheme.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To summarize: a user is part of an organisation. A user has one or more portfolios with customers inside. A user also has question lists that are shared across his organisation. An organisation has a customer template defining dynamic fields for customer data. An organisation also hass communication templates for personalized dynamic automatic communications to users and customers. A user can invite a customer to answer a question list by creating a session request, linked to a question list. A question list has a report specification, which is a template to generate a report document after the customer completed his session request. This report spec contains dynamic customer data fields, signature positions, or any other dynamic data that we provide.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the API key in the request header as:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
== USERS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get your own user info.&lt;br /&gt;
|/users/myuser&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
User: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class User {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public firstname?: string;&lt;br /&gt;
  public lastname?: string;&lt;br /&gt;
  public email!: string;&lt;br /&gt;
  public password?: string;&lt;br /&gt;
  public language?: UserLanguage;&lt;br /&gt;
  public groups?: UserGroup[];&lt;br /&gt;
  public organisation?: Organisation;&lt;br /&gt;
  public useOrganisationEmail?: boolean;&lt;br /&gt;
  public resetPasswordToken?: string;&lt;br /&gt;
  public resetPasswordExpiration?: Date;&lt;br /&gt;
  public apiKey?: string;&lt;br /&gt;
  public activeToken?: string;&lt;br /&gt;
  public activeTokenExpiration?: Date;&lt;br /&gt;
  public otp?: string;&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
  public isEnabled?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PORTFOLIOS &amp;amp; CUSTOMERS ==&lt;br /&gt;
Your customers are always part of a portfolio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get my portoflios&lt;br /&gt;
|/portfolios&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    Portfolio: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get portfolio by _id.&lt;br /&gt;
|/portfolios/:_id&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Portfolio: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get customers in portfolio by _id.&lt;br /&gt;
|/portfolios/:_id/customers&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    Customer: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get a single customer by _id.&lt;br /&gt;
|/customers/:_id&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Update a single customer by _id.&lt;br /&gt;
|/customers/:_id&lt;br /&gt;
|PUT&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Create a single customer inside a portfolio.&lt;br /&gt;
|/portfolios/:_id/customers&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class Portfolio {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public name?: string;&lt;br /&gt;
  public organisation?: Organisation;&lt;br /&gt;
  public owner?: User;&lt;br /&gt;
  public users?: User[];&lt;br /&gt;
  public customers?: Customer[];&lt;br /&gt;
  public customerTemplate?: CustomerTemplate;&lt;br /&gt;
  public isBdayMailingEnabled?: boolean;&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class Customer {&lt;br /&gt;
  _id: string;&lt;br /&gt;
  portfolio: Portfolio;&lt;br /&gt;
  customerTemplate: CustomerTemplate;&lt;br /&gt;
  data: [{ [field: CustomerField]: string}]; &lt;br /&gt;
  // CustomerField is any field that was configured &lt;br /&gt;
  // in the customerTemplate in your organisation.&lt;br /&gt;
  documents: Document[];&lt;br /&gt;
  sessions: [string];&lt;br /&gt;
  noBdayMail: boolean;&lt;br /&gt;
  notes: string;&lt;br /&gt;
  createdAt: Date;&lt;br /&gt;
  updatedAt: Date;&lt;br /&gt;
  isActive: boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== QUESTIONLISTS ==&lt;br /&gt;
There are question lists that can be used in sessionrequests.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get all your questionlists.&lt;br /&gt;
|/questionlists&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    QuestionList: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class QuestionList {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public name?: string;&lt;br /&gt;
  public slug?: string;&lt;br /&gt;
  public description?: string;&lt;br /&gt;
  public category?: QuestionListCategory;&lt;br /&gt;
  public presentationType?: QuestionListPresentationType;&lt;br /&gt;
  public reportSpec?: ReportSpec | string;&lt;br /&gt;
  public owningOrganisation?: Organisation;&lt;br /&gt;
  public questions?: Question[];&lt;br /&gt;
  public customerTemplate?: CustomerTemplate;&lt;br /&gt;
  public hoursSaved?: Number;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Question {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public slug?: string;&lt;br /&gt;
  public description?: string;&lt;br /&gt;
  public questionListId?: QuestionList;&lt;br /&gt;
  public customerTemplateFieldName?: string;&lt;br /&gt;
  public conditions?: Condition[];&lt;br /&gt;
  public images?: Image[];&lt;br /&gt;
  public content?: string;&lt;br /&gt;
  public contentType?: string;&lt;br /&gt;
  public responses?: QuestionResponse[];&lt;br /&gt;
  public responseType?: ResponseType;&lt;br /&gt;
  public uploadButtonText?: string;&lt;br /&gt;
  public isMultipleFileUpload?: Boolean;&lt;br /&gt;
  public actions?: ResponseAction[];&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
  public isLastQuestion?: Boolean;&lt;br /&gt;
  public showImages?: Boolean;&lt;br /&gt;
  public showConditions?: Boolean;&lt;br /&gt;
  public showScores?: Boolean;&lt;br /&gt;
  public showReportValues?: Boolean;&lt;br /&gt;
  public showLinkedCustomerValue?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
+&lt;br /&gt;
class QuestionResponse {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  index?: number;&lt;br /&gt;
  slug?: string;&lt;br /&gt;
  content?: string;&lt;br /&gt;
  responseType?: string;&lt;br /&gt;
  reportValue?: string;&lt;br /&gt;
  scoreModifier?: number;&lt;br /&gt;
  actions?: ResponseAction[];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseAction {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  // this performs an api call to this action url when this response is given&lt;br /&gt;
  index?: number;&lt;br /&gt;
  action?: Action;&lt;br /&gt;
  arguments?: ResponseActionArgument[];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Operator {&lt;br /&gt;
  and = &amp;quot;and&amp;quot;,&lt;br /&gt;
  or = &amp;quot;or&amp;quot;,&lt;br /&gt;
  not = &amp;quot;not&amp;quot;,&lt;br /&gt;
  &amp;quot;&amp;quot; = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enum OrginType {&lt;br /&gt;
  customerTemplateField = &amp;quot;customerTemplateField&amp;quot;,&lt;br /&gt;
  response = &amp;quot;response&amp;quot;,&lt;br /&gt;
  score = &amp;quot;score&amp;quot;,&lt;br /&gt;
  extraField = &amp;quot;extraField&amp;quot;,&lt;br /&gt;
  signatureEnabled = &amp;quot;signatureEnabled&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enum QuestionListPresentationType {&lt;br /&gt;
  chat = &amp;quot;chat&amp;quot;,&lt;br /&gt;
  survey = &amp;quot;survey&amp;quot;,&lt;br /&gt;
  form = &amp;quot;form&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Condition {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  operator?: Operator;&lt;br /&gt;
  originType?: OrginType;&lt;br /&gt;
  origin?: string;&lt;br /&gt;
  target?: string; // ... for this response slug/any/none ..&lt;br /&gt;
  value?: string; // ... has this value (if applicable, like on input, but not like on a button choice)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Image {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  fileName: string = &amp;quot;&amp;quot;;&lt;br /&gt;
  isDefault?: Boolean; // is this the default image if no other conditions are met?&lt;br /&gt;
  conditions?: Condition[];&lt;br /&gt;
  url?: string; // FRONEND ONLY&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseType {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  type?: string;&lt;br /&gt;
  userFriendly?: string;&lt;br /&gt;
  icon?: string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseActionArgument {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  argumentType?: string; // ex string, number, questionList, reportSpec&lt;br /&gt;
  argumentValue?: string; //the value of the string, number or an string&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SESSIONREQUESTS ==&lt;br /&gt;
A sessionrequest is a request for a customer to complete a questionlist using the Sidefish chat frontend.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Create sessionrequests.&lt;br /&gt;
|/sessionrequests&lt;br /&gt;
|POST&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    SessionRequestCreateObject: {&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    success: true,&lt;br /&gt;
    ids: string[],&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class SessionRequestCreateObject {&lt;br /&gt;
    &amp;quot;code&amp;quot;: string, // request via /api/v1/sessionrequests/generate-codes/&amp;lt;amount&amp;gt;&lt;br /&gt;
    &amp;quot;url&amp;quot;: string, // example &amp;lt;mijn-kantoor&amp;gt;.sidefish.be/nl/#/&amp;lt;vragenlijst-identifier&amp;gt;/&amp;lt;session-code&amp;gt;&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id of the customer&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id of the questionlist&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{ // extra data to provide to generate the report as defined in the ReportSpec&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string, // the e-mail address of the user or the organisation sending the notification&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string, // html email content&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string, // the e-mail address of the user or the organisation sending the notification&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string, // html email content&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean, // use scheduling on moment defined in organisation or send immediately (defaults to false)&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;?: undefined | string, // extra email address to receive signed documents&lt;br /&gt;
    &amp;quot;webhookUrl&amp;quot;?: string, // we send a POST request to: &amp;lt;webhookurl&amp;gt; with JSON { session = &amp;lt;session._id&amp;gt; } in the body. This call is tried 3 times.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=61</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=61"/>
		<updated>2022-10-27T14:16:21Z</updated>

		<summary type="html">&lt;p&gt;Dieter: /* C. API KEY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v5 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
The scheme below shows a simplified data model.&lt;br /&gt;
&lt;br /&gt;
[[File:Sidefish-data-sheme.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To summarize: a user is part of an organisation. A user has one or more portfolios with customers inside. A user also has question lists that are shared across his organisation. An organisation has a customer template defining dynamic fields for customer data. An organisation also hass communication templates for personalized dynamic automatic communications to users and customers. A user can invite a customer to answer a question list by creating a session request, linked to a question list. A question list has a report specification, which is a template to generate a report document after the customer completed his session request. This report spec contains dynamic customer data fields, signature positions, or any other dynamic data that we provide.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the API key in the request header as:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
== USERS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get your own user info.&lt;br /&gt;
|/users/myuser&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
User: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class User {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public firstname?: string;&lt;br /&gt;
  public lastname?: string;&lt;br /&gt;
  public email!: string;&lt;br /&gt;
  public password?: string;&lt;br /&gt;
  public language?: UserLanguage;&lt;br /&gt;
  public groups?: UserGroup[];&lt;br /&gt;
  public organisation?: Organisation;&lt;br /&gt;
  public useOrganisationEmail?: boolean;&lt;br /&gt;
  public resetPasswordToken?: string;&lt;br /&gt;
  public resetPasswordExpiration?: Date;&lt;br /&gt;
  public apiKey?: string;&lt;br /&gt;
  public activeToken?: string;&lt;br /&gt;
  public activeTokenExpiration?: Date;&lt;br /&gt;
  public otp?: string;&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
  public isEnabled?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PORTFOLIOS &amp;amp; CUSTOMERS ==&lt;br /&gt;
Your customers are always part of a portfolio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get my portoflios&lt;br /&gt;
|/portfolios&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    Portfolio: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get portfolio by _id.&lt;br /&gt;
|/portfolios/:_id&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Portfolio: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get customers in portfolio by _id.&lt;br /&gt;
|/portfolios/:_id/customers&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    Customer: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Get a single customer by _id.&lt;br /&gt;
|/customers/:_id&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Update a single customer by _id.&lt;br /&gt;
|/customers/:_id&lt;br /&gt;
|PUT&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Create a single customer inside a portfolio.&lt;br /&gt;
|/portfolios/:_id/customers&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
Customer: {&lt;br /&gt;
    _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class Portfolio {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public name?: string;&lt;br /&gt;
  public organisation?: Organisation;&lt;br /&gt;
  public owner?: User;&lt;br /&gt;
  public users?: User[];&lt;br /&gt;
  public customers?: Customer[];&lt;br /&gt;
  public customerTemplate?: CustomerTemplate;&lt;br /&gt;
  public isBdayMailingEnabled?: boolean;&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class Customer {&lt;br /&gt;
  _id: string;&lt;br /&gt;
  portfolio: Portfolio;&lt;br /&gt;
  customerTemplate: CustomerTemplate;&lt;br /&gt;
  data: [{ [field: CustomerField]: string}]; &lt;br /&gt;
  // CustomerField is any field that was configured &lt;br /&gt;
  // in the customerTemplate in your organisation.&lt;br /&gt;
  documents: Document[];&lt;br /&gt;
  sessions: [string];&lt;br /&gt;
  noBdayMail: boolean;&lt;br /&gt;
  notes: string;&lt;br /&gt;
  createdAt: Date;&lt;br /&gt;
  updatedAt: Date;&lt;br /&gt;
  isActive: boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== QUESTIONLISTS ==&lt;br /&gt;
There are question lists that can be used in sessionrequests.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Get all your questionlists.&lt;br /&gt;
|/questionlists&lt;br /&gt;
|GET&lt;br /&gt;
|&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    QuestionList: {&lt;br /&gt;
        _id: &amp;quot;12345789&amp;quot;,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class QuestionList {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public name?: string;&lt;br /&gt;
  public slug?: string;&lt;br /&gt;
  public description?: string;&lt;br /&gt;
  public category?: QuestionListCategory;&lt;br /&gt;
  public presentationType?: QuestionListPresentationType;&lt;br /&gt;
  public reportSpec?: ReportSpec | string;&lt;br /&gt;
  public owningOrganisation?: Organisation;&lt;br /&gt;
  public questions?: Question[];&lt;br /&gt;
  public customerTemplate?: CustomerTemplate;&lt;br /&gt;
  public hoursSaved?: Number;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Question {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  public slug?: string;&lt;br /&gt;
  public description?: string;&lt;br /&gt;
  public questionListId?: QuestionList;&lt;br /&gt;
  public customerTemplateFieldName?: string;&lt;br /&gt;
  public conditions?: Condition[];&lt;br /&gt;
  public images?: Image[];&lt;br /&gt;
  public content?: string;&lt;br /&gt;
  public contentType?: string;&lt;br /&gt;
  public responses?: QuestionResponse[];&lt;br /&gt;
  public responseType?: ResponseType;&lt;br /&gt;
  public uploadButtonText?: string;&lt;br /&gt;
  public isMultipleFileUpload?: Boolean;&lt;br /&gt;
  public actions?: ResponseAction[];&lt;br /&gt;
  public isDefault?: Boolean;&lt;br /&gt;
  public createdAt?: Date;&lt;br /&gt;
  public updatedAt?: Date;&lt;br /&gt;
  public isActive?: Boolean;&lt;br /&gt;
  public isLastQuestion?: Boolean;&lt;br /&gt;
  public showImages?: Boolean;&lt;br /&gt;
  public showConditions?: Boolean;&lt;br /&gt;
  public showScores?: Boolean;&lt;br /&gt;
  public showReportValues?: Boolean;&lt;br /&gt;
  public showLinkedCustomerValue?: Boolean;&lt;br /&gt;
}&lt;br /&gt;
+&lt;br /&gt;
class QuestionResponse {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  index?: number;&lt;br /&gt;
  slug?: string;&lt;br /&gt;
  content?: string;&lt;br /&gt;
  responseType?: string;&lt;br /&gt;
  reportValue?: string;&lt;br /&gt;
  scoreModifier?: number;&lt;br /&gt;
  actions?: ResponseAction[];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseAction {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  // this performs an api call to this action url when this response is given&lt;br /&gt;
  index?: number;&lt;br /&gt;
  action?: Action;&lt;br /&gt;
  arguments?: ResponseActionArgument[];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
enum Operator {&lt;br /&gt;
  and = &amp;quot;and&amp;quot;,&lt;br /&gt;
  or = &amp;quot;or&amp;quot;,&lt;br /&gt;
  not = &amp;quot;not&amp;quot;,&lt;br /&gt;
  &amp;quot;&amp;quot; = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enum OrginType {&lt;br /&gt;
  customerTemplateField = &amp;quot;customerTemplateField&amp;quot;,&lt;br /&gt;
  response = &amp;quot;response&amp;quot;,&lt;br /&gt;
  score = &amp;quot;score&amp;quot;,&lt;br /&gt;
  extraField = &amp;quot;extraField&amp;quot;,&lt;br /&gt;
  signatureEnabled = &amp;quot;signatureEnabled&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enum QuestionListPresentationType {&lt;br /&gt;
  chat = &amp;quot;chat&amp;quot;,&lt;br /&gt;
  survey = &amp;quot;survey&amp;quot;,&lt;br /&gt;
  form = &amp;quot;form&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Condition {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  operator?: Operator;&lt;br /&gt;
  originType?: OrginType;&lt;br /&gt;
  origin?: string;&lt;br /&gt;
  target?: string; // ... for this response slug/any/none ..&lt;br /&gt;
  value?: string; // ... has this value (if applicable, like on input, but not like on a button choice)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Image {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  fileName: string = &amp;quot;&amp;quot;;&lt;br /&gt;
  isDefault?: Boolean; // is this the default image if no other conditions are met?&lt;br /&gt;
  conditions?: Condition[];&lt;br /&gt;
  url?: string; // FRONEND ONLY&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseType {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  type?: string;&lt;br /&gt;
  userFriendly?: string;&lt;br /&gt;
  icon?: string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class ResponseActionArgument {&lt;br /&gt;
  public _id?: string;&lt;br /&gt;
  argumentType?: string; // ex string, number, questionList, reportSpec&lt;br /&gt;
  argumentValue?: string; //the value of the string, number or an string&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SESSIONREQUESTS ==&lt;br /&gt;
A sessionrequest is a request for a customer to complete a questionlist using the Sidefish chat frontend.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|Create sessionrequests.&lt;br /&gt;
|/sessionrequests&lt;br /&gt;
|POST&lt;br /&gt;
|An object containting your user info.&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
[&lt;br /&gt;
    SessionRequestCreateObject: {&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    success: true,&lt;br /&gt;
    ids: string[],&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== Models ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;typescript&amp;quot;&amp;gt;&lt;br /&gt;
class SessionRequestCreateObject {&lt;br /&gt;
    &amp;quot;code&amp;quot;: string,&lt;br /&gt;
    &amp;quot;url&amp;quot;: string,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;portfolio&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean,&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;: undefined | string,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=48</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=48"/>
		<updated>2022-10-27T11:23:19Z</updated>

		<summary type="html">&lt;p&gt;Dieter: /* Session Requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v5 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Portfolios ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Questionlists ==&lt;br /&gt;
&lt;br /&gt;
== Report Specs ==&lt;br /&gt;
&lt;br /&gt;
== Session Requests ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/sessionrequests&lt;br /&gt;
|POST&lt;br /&gt;
|SessionRequestCreateObject&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    success: true,&lt;br /&gt;
    ids: string[],&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== SessionRequestCreateObject ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;code&amp;quot;: string,&lt;br /&gt;
    &amp;quot;url&amp;quot;: string,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;portfolio&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean,&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;: undefined | string,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=47</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=47"/>
		<updated>2022-10-27T11:19:05Z</updated>

		<summary type="html">&lt;p&gt;Dieter: /* A. Bearer token */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v5 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Portfolios ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Questionlists ==&lt;br /&gt;
&lt;br /&gt;
== Report Specs ==&lt;br /&gt;
&lt;br /&gt;
== Session Requests ==&lt;br /&gt;
&lt;br /&gt;
=== Verzoek ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /sessionrequests&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;code&amp;quot;: string,&lt;br /&gt;
    &amp;quot;url&amp;quot;: string,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;portfolio&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean,&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;: undefined | string,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=46</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=46"/>
		<updated>2022-10-27T11:18:18Z</updated>

		<summary type="html">&lt;p&gt;Dieter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v5 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Portfolios ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Questionlists ==&lt;br /&gt;
&lt;br /&gt;
== Report Specs ==&lt;br /&gt;
&lt;br /&gt;
== Session Requests ==&lt;br /&gt;
&lt;br /&gt;
=== Verzoek ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /sessionrequests&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;code&amp;quot;: string,&lt;br /&gt;
    &amp;quot;url&amp;quot;: string,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;portfolio&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean,&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;: undefined | string,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=45</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=45"/>
		<updated>2022-10-27T11:16:52Z</updated>

		<summary type="html">&lt;p&gt;Dieter: /* Sessie verzoeken */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sidefish v5 API Documentation =&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
The Sidefish API is a RESTFUL JSON HTTP API that serves all server functions for creating, reading, updating and deleting Sidefish Platform data.&lt;br /&gt;
&lt;br /&gt;
Successful calls always return a HTTP status 200.&lt;br /&gt;
&lt;br /&gt;
Errors are returned with corresponding HTTP statuses, like 400, 403, 404 , etc. The response body contains an error description.&lt;br /&gt;
&lt;br /&gt;
== Endpoint ==&lt;br /&gt;
The Sidefish API is reachable at:&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://sidefish.app/api/v1/] (PRODUCTION)&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;[https://sidefish.app/api/v1/users https://staging.sidefish.app/api/v1/users] (STAGING)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
=== A. Bearer token ===&lt;br /&gt;
&lt;br /&gt;
The Sidefish API supports a bearer token in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Endpoint&lt;br /&gt;
!Method&lt;br /&gt;
!Request Body&lt;br /&gt;
!Response Body&lt;br /&gt;
|-&lt;br /&gt;
|/login&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    email: string,&lt;br /&gt;
    password: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    token: string&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|/logout&lt;br /&gt;
|POST&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token an auth header with a bearer token: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== B. Cookie ===&lt;br /&gt;
The Sidefish API also supports a cookie in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Request a JWT token via the login call (same as method A).&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
cookie: access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C. API KEY ===&lt;br /&gt;
The Sidefish API also supports an API Key in your HTTP request header.&lt;br /&gt;
&lt;br /&gt;
1. Get the API key for your user via the Sidefish Platform under &amp;quot;my account&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Use the resulting token a cookie called access_token:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
x-api-key: 123456789&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D. OAuth 2.0 ===&lt;br /&gt;
The Sidefish API also provides its own OAuth 2.0 server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about authentication using OAuth, please contact us at info@sidefish.be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Portfolios ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Questionlists ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sessie verzoeken ==&lt;br /&gt;
&lt;br /&gt;
=== Verzoek ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /sessionrequests&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;code&amp;quot;: string,&lt;br /&gt;
    &amp;quot;url&amp;quot;: string,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;qlist&amp;quot;,&lt;br /&gt;
    &amp;quot;customer&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;portfolio&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;questionList&amp;quot;: string, // _id&lt;br /&gt;
    &amp;quot;extraFieldsData&amp;quot;?: [{&lt;br /&gt;
        &amp;quot;extraField&amp;quot;: string, // ReportSpec.extraFields[]._id&lt;br /&gt;
        &amp;quot;value&amp;quot;: any,&lt;br /&gt;
    }],&lt;br /&gt;
    &amp;quot;notificationSms&amp;quot;?: {&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationEmail&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;notificationReminder&amp;quot;?: {&lt;br /&gt;
        &amp;quot;from&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;bcc&amp;quot;?: string,&lt;br /&gt;
        &amp;quot;subject&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;message&amp;quot;!: string,&lt;br /&gt;
        &amp;quot;language&amp;quot;?: string,&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;isNotificationScheduled&amp;quot;?: boolean,&lt;br /&gt;
    &amp;quot;ccSignedDocuments&amp;quot;: undefined | string,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=42</id>
		<title>Technische documentatie voor integrators</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Technische_documentatie_voor_integrators&amp;diff=42"/>
		<updated>2022-10-27T10:53:40Z</updated>

		<summary type="html">&lt;p&gt;Dieter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= API Documentatie =&lt;br /&gt;
&lt;br /&gt;
== Authenticatie ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Portefeuilles ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Klanten ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vragenlijsten ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sessie verzoeken ==&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sidefish.be/index.php?title=Main_Page&amp;diff=4</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.sidefish.be/index.php?title=Main_Page&amp;diff=4"/>
		<updated>2022-10-20T16:04:01Z</updated>

		<summary type="html">&lt;p&gt;Dieter: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Sidefish Wiki! YAY!&lt;br /&gt;
&lt;br /&gt;
Hoezey &amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Hoezey&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dieter</name></author>
	</entry>
</feed>