Common response records
Here are described structure of common response records. They have the same shape and rules across the API.
Contact
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
String |
String |
Yes |
Contact name. Limited to 50 characters |
|
String |
String |
Yes |
Contact string. Limited to 50 characters |
|
String |
String |
No |
Only |
Address
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
String |
String |
Yes |
Full address as one string |
|
String |
String |
Yes |
Apartment. Limited to 50 characters |
|
String |
String |
Yes |
Floor. Limited to 50 characters |
|
String |
String |
Yes |
Entrance. Limited to 50 characters |
|
String |
String |
Yes |
Optional string description. It usually contains some information helping locating the site. Limited to 500 characters |
|
Geolocation |
Object |
Yes |
Geolocation |
Team
Team is a group workers.
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Team identifier |
|
String |
String |
No |
Team name |
Assignee UUID
team_uuid and worker_uuid fields are mutually exclusive.
|
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Team identifier |
|
UUID |
String |
No |
Worker identifier |
Client
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Client identifier |
|
String |
String |
Yes |
Territory
Territory is an area where an assignee or a team operates.
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Territory identifier |
|
String |
String |
No |
Territory name |
Dictionary item
Dictionary is a list of elements that can be used as field values.
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Item identifier |
|
String |
String |
No |
Item name |
Resolution
Resolution is a result of a finished job.
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Resolution identifier |
|
String |
String |
No |
Resolution name |
|
Boolean |
Boolean |
No |
Whether the resolution is successful or not |
|
String |
String |
Yes |
Comment filled out by a field worker. This field is only present only as part of finished job |
Custom field
Custom fields can be added to jobs by using templates. There are two sections containing custom fields: custom_fields
and report_fields
. custom_fields
is a list of fields that are filled by the dispatcher, they are avialble for the assignee in the read-only mode. report_fields
are filled via the mobile app. Fields can be rendered as various UI element (e.g. select/dropdown list, text input, etc) and have different data types (pick list value, string, file, and so on).
JSON type of value depends on field_type and data_type .
|
Field | Type | JSON Type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Field identifier |
|
String |
String |
No |
Field name |
|
String |
String |
No |
|
|
String |
String |
No |
|
|
Boolean |
Boolean |
No |
Whether this field must be filled. |
|
Mixed |
Mixed |
Yes |
Value of the field. This key is always present for jobs. For job templates, it’s only present for custom fields that can be pre-filled (e.g. |
|
String |
No |
When the values was set. This field is only present for |
Field types
-
image
-
input
-
action
-
checkbox
-
textarea
-
barcode
-
file
-
dictionary
-
button
-
link
-
currency
-
datetime_picker
-
date_picker
-
signature
Supported combinations
Different combinations supported differently in custom_fields
and report_fields
. Below, “CF” and “RF” stand for whether the combination may appear in custom_fields
and report_fields
respectively.
field_type |
data_type |
CF | RF | Type of value |
Can be null |
Description |
---|---|---|---|---|---|---|
|
|
Yes |
Yes |
String |
Yes |
|
|
|
Yes |
Yes |
String |
Yes |
Integers are passed as strings to avoid overflow in JSON numbers |
|
|
Yes |
Yes |
String |
Yes |
Decimals are passed as strings to avoid overflow in JSON numbers |
|
|
Yes |
Yes |
String |
Yes |
Currency fields have |
|
|
No |
Yes |
String |
Yes |
|
|
|
No |
Yes |
Boolean |
Yes |
Whether the action is marked as done |
|
|
No |
Yes |
Boolean |
Yes |
Yes-or-no field |
|
|
No |
Yes |
String |
Yes |
Barcode/QR-code value |
|
|
Yes |
No |
String |
Yes |
File URL |
|
|
No |
Yes |
[String] |
No |
List of file URLs |
|
|
No |
Yes |
[String] |
No |
List of file URLs |
|
|
Yes |
Yes |
Yes |
||
|
|
Yes |
Yes |
String |
Yes |
Report fields with |
|
|
Yes |
Yes |
String |
Yes |
ISO 8601-encoded datetime value |
|
|
Yes |
Yes |
String |
Yes |
ISO 8601-encoded date value |
Permissions
User permissions object. It describes what actions a user can perform.
Field | Type | JSON Type | Required | Can be null |
Description |
---|---|---|---|---|---|
|
Record |
Object |
No |
No |
Web application permissions |
|
Record |
Object |
No |
No |
Mobile application permissions |
Example of permissions object
{
"web": {
"login": true,
"jobs": {
"view": true,
"edit": true,
"delete": true
},
"clients": {
"view": true,
"edit": true
},
"schedule": {
"view": true,
"edit": true
},
"map": {
"edit": false
},
"shifts": {
"edit": false
},
"teams": {
"view": true,
"edit": true
},
"jobs_export": false
},
"mobile": {
"login": true,
"jobs": {
"view": true,
"complete": true
}
}
}