Field Representation
The following guidelines apply for the values of object fields in the API (see Field Types for the full list of field types supported by JourneyApps).
text
The text in standard JSON. Example: "Nokia"
Any string in standard JSON format. Example: "Nokia"
integer
The number in standard JSON format. Example: 42
.
Any integer in standard JSON format. Example: 42
.
number
The number in standard JSON format. Example: 3.1428
.
Any decimal number in standard JSON format. Example: 3.1428
.
date
datetime
single-choice
The key and display label of option. Example: {"key": "soccer", "display": "Soccer"}
The string key of the option. Example: "soccer"
single-choice-integer
The key and display label of option. Example: {"key": 3, "display": "Soccer"}
The integer key of the option. Example: 3
boolean
The key and display label of option. Example: {"key": true, "display": "Yes"}
The boolean key of the option. Example: true
multiple-choice
An array of keys and display labels of the selected options. Example: [{"key": "soccer", "display": "Soccer"}, {"key": "tennis", "display": "Tennis"}]
An array of keys, as explained above. Example: ["soccer", "tennis"]
.
multiple-choice-integer
An array of keys and display labels of the selected options. Example: [{"key": 3, "display": "Soccer"}, {"key": 4, "display": "Tennis"}]
An array of keys, as explained above. Example: [3, 4]
.
location
attachment
Photos
Signatures
Relationships
Relationships use the relationship name plus _id
as the key, with the related object id as the value. Only belongs to relationships are included in the object itself, has many relationships should be queried and/or set from the other side of the relationship. Example: building_id: "9913706a-179b-11e2-aaff-0026189d9dc0"
.
The same format is used for setting relationships. Example: building_id: "9913706a-179b-11e2-aaff-0026189d9dc0"
.
Examples
Location API Response Example
Location API Update Object Example
Attachment API Response Example
Attachment API Update Object Example
Photos API Response Example
Note: The state field can be uploaded
,pending
, missing
, or untrusted
. The thumbnail, fullscreen and original fields are only present if state is uploaded
.
Signatures API Response Example
Note: The state field can be uploaded
or pending
. The thumbnail, fullscreen, original and svg fields are only present if state is uploaded
.
Photos and signatures API Update Object Example
Values Not Present
When retrieving objects, a field not present should be interpreted the same as a null
value for that field. This applies to all field types, as well as relationships.
When updating an object with Update a Single Object, setting the field to null
will clear that field. On the other hand, omitting the field will leave its value unchanged. This applies to all field types, as well as relationships.
Last updated