Trip Interface Description 1.2.2 Help

Questionnaire

This chapter describes the concept of a questionnaire, which is a set of questions that can be used to receive all kinds of different information from the user. It's often used in combination with a trip interface, for example when the user is signing off a stop or finishing a trip. It for example allows text, number, photo or sign on glass questions to be presented to the user, making it useful for obtaining every conceivable piece of information.

Question

A question is a single item in a questionnaire that can be used to collect or show information from or to the user.

A question is represented as a JSON object that contains the properties that define how the question should behave and look.

Name

Type

Description

Required

Default

id

Int

The unique ID of the question.

true

required

Bool

Whether the question is required to be answered before the user can go to the next question.

false

true

type

String

The type of the question. This determines how the question will be displayed and its behavior.

true

key

String

The key to the question. This is used to save the answer in the local database.

true

label

String

The label of the question. This is displayed to the user.

true

description

String

Description of the question. This is displayed to the user, for example, below the label.

false

answers

Array

An array of answer objects.

true

Answer

A question contains one or more answers. Each answer is represented as an object in the answers array of questions. The answer object contains the properties that define how the answer should behave and look like.

The answer object is a JSON object that contains the following properties:

Name

Type

Description

Required

id

int

The id of the question.

true

nextQuestionId

int

The id of the next question to be shown after this question.

true

label

string

The label of the answer.

false

value

string

The value of the answer.

false

Examples

This is a simple example of how a questionnaire could look like. It contains the question types Info, Text Box, Photo, Signature and License.

[ { "id": 1, "required": true, "type": "info", "key": "question_info", "label": "Before entering the loading dock, make sure to sign in at the front desk!", "description": null, "answers": [ { "id": 0, "label": null, "nextQuestionId": 2, "options": {} } ] }, { "id": 2, "required": true, "type": "text_box", "key": "name_receiver", "label": "Name of the receiver", "answers": [ { "id": 0, "nextQuestionId": 3, "options": { "maxLength": 40, "description": "Please enter the name of the person receiving the goods." } } ] }, { "id": 3, "required": true, "type": "photo", "key": "cmr_photo", "label": "Photo of CMR", "answers": [ { "id": 0, "label": null, "nextQuestionId": 4, "options": { "maxPictures": 2, "isDocument": true } } ] }, { "id": 4, "required": true, "type": "sign_on_glass", "key": "sign_on_glass", "label": "Sign on glass", "description": "Signature of the receiver.", "answers": [ { "id": 0, "label": null, "nextQuestionId": 5, "options": {}, "value": null } ] }, { "id": 5, "required": true, "type": "license", "key": "license_nl", "label": "License plate (NL)", "description": "Please enter the license plate of the vehicle.", "answers": [ { "id": 0, "label": null, "nextQuestionId": -1, "options": { "countryCode": "NL" }, "value": null } ] } ]
Last modified: 13 June 2025