Suggested updates to documentation for Data types

While creating a table with fields that used the “smart” data type, I couldn’t find any documentation around the required format for saving these fields via the API. I was able to uncover their schema’s after some time using API explorer. However, it would have been more convenient to have these clearly documented.

Below is a suggested page for the documentation.


Smart Field Datatypes

8base offers 2 “Smart Field” data types, allowing developers to quickly ensure pre-commit data validation for addresses and phone numbers. To use smart fields, select “Smart” from the data type dropdown when creating or updating a table in your workspace.

Address

The Address data type validates a given object using the following JSON schema:

{
      country: !String
      street1: !String
      street2: String
      state: String
      city: !String
      zip: !String
}

All values are required, with the exception of street2 and state.

Phone

The Phone data type validates a given object using the following JSON schema:

{
      code: !String
      number: !String
}

All values are required.