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).
Type | Format returned in API response | Format accepted for create and update |
---|---|---|
| The text in standard JSON. Example: | Any string in standard JSON format. Example: |
| The number in standard JSON format. Example: | Any integer in standard JSON format. Example: |
| The number in standard JSON format. Example: | Any decimal number in standard JSON format. Example: |
| A date in the format | Any valid date according to the ISO 8601 specification. Any time or timezone components will be stripped. The |
| A date and time in the format | Any valid date and time according to the ISO 8601 specification. The |
| The key and display label of option. Example: | The string key of the option. Example: |
| The key and display label of option. Example: | The integer key of the option. Example: |
| The key and display label of option. Example: | The boolean key of the option. Example: |
| An array of keys and display labels of the selected options. Example: | An array of keys, as explained above. Example: |
| An array of keys and display labels of the selected options. Example: | An array of keys, as explained above. Example: |
| Hash with fields latitude, longitude, altitude, horizontal_accuracy, vertical_accuracy and timestamp. Note that altitude and vertical_accuracy are typically not reported by mobile devices, and only latitude and longitude can currently be edited on the JourneyApps Backend data browser. The timestamp is automatically populated when the location is captured. See: Location API Response Example | A hash with fields latitude and longitude (both decimal numbers), and optionally altitude, horizontal_accuracy, vertical_accuracy (all decimal numbers) and timestamp (a date and time in the format |
| A hash with fields state, id and original. The attachment's object id is a separate field, where the key is the attachment's field name plus | A hash with fields base64, containing the Base64 representation of the attachment file, and filename, containing the name of the file. See: Attachment API Update Object Example |
Photos | A hash with fields state, thumbnail, fullscreen and original. The photo's object id is a separate field, where the key is the photo's field name plus | A hash with fields base64, containing the Base64 representation of the attachment file, and filename, containing the name of the file. See: Photos and signatures API Update Object Example |
Signatures | A hash with fields state, thumbnail, fullscreen, original and svg. The signature's object id is a separate field, where the key is the signature's field name plus | A hash with fields base64, containing the Base64 representation of the attachment file, and filename, containing the name of the file. See: Photos and signatures API Update Object Example |
Relationships | Relationships use the relationship name plus | The same format is used for setting relationships. Example: |
Examples
Location API Response Example
Location API Update Object Example
Attachment API Response Example
Attachment API Update Object Example
Note: base64 must not contain any newline characters.
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
Note: base64 must not contain any newline characters.
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