Skip to main content

Field data types

The system data types a layer field can declare, and the JSON value each one expects. layer-detail reports a field's type as a numeric dataType; every value you send on create or update must match it.


System data types​

Data typedataTypeSend asRules
Yes/No (Boolean)1Boolean
Number2Integer
String3String
Real4NumberDecimals allowed
Date5StringISO 8601, e.g. 2026-09-07T09:30:00Z
Big String6StringLonger free text, including multi-line
Map7StringGeoJSON geometry serialized to a string
Document8StringMulti-line text containing HTML tags
List10StringAn allowed list value - see below

List fields​

A field of type List (dataType 10) accepts only the values its definition allows, and you send the stored value, not the display label. There are two kinds:

  • Enum - the values are defined on the field itself. On the demo SAMPLE_DATA layer, sample_data_option accepts 1 (Option A) or 2 (Option B).
  • Layer-backed - the values come from another layer. sample_data_state, sample_data_district and sample_data_sub_district read from ADMINISTRATIVE and take an AdministrativeID.

Dependent lists must form a valid chain: district must belong to the state you sent, and sub-district to that district. Sending an unrelated ID is rejected.


Used by​