API and SDK / Data types

Data types

When working with API, sends a request to a third-party service and receives a response containing the requested data. The API operates with the following data types:

String

JSON string data type

начало примера

Example:

 

 {
    «key»: «example»
}

конец примера

Number

 

JSON number data type

 

начало примера

Example:

 

{
    «key»: 10
}

конец примера

Yes/No switch

JSON boolean data type

начало примера

Example:

 

{
    «key»: true
}

конец примера

Date/Time

JSON string data type

RFC3339 format

начало примера

Example:

 

{
   «key»: «2006-01-02T15:04:05Z07:00»
}

конец примера

Category

JSON objects array data type

Object fields:

code. Category code (string)

name. Category name (string)

начало примера

Example:

 

{
    «key»: [ { «code»: «example», «name»: «Example»} ]
}

конец примера

Money

JSON object data type

Object fields:

cents. A value in a minimum coin (kopeck, cent, euro cent) (number)

currency. The currency (string)

начало примера

Example:

 

{
    «cents»: 1000,
    "currency»: «RUB»
}

конец примера

Phone number

JSON objects array data type

Object fields:

type. Phone number type (string)

tel. Phone number (only ten-digit numbers) (string)

начало примера

Example:

 

{
    «key»: [ { «type»:«home», «tel»:«+790000000000» } ]
}

конец примера

Email address

JSON objects array data type

Object fields:

type. Email type (string)

email. Email address (only significant symbols) (string)

начало примера

Example:

 

{
    «key»: [ { «type»:«home», «email»:«example@email.com» } ]
}

конец примера

Image

JSON strings array data type

Values are image files IDs in the system

начало примера

Example:

 

{
    «key»: [ «c44b66f6-216a-457e-a37e-ea8e373a4b77» ]
}

конец примера

Files

JSON strings array data type

Values are files IDs in the system

начало примера

Example:

 

{
    «key»: [ «c44b66f6-216a-457e-a37e-ea8e373a4b77» ]
}

конец примера

Full Name

JSON object data type

Object fields:

lastname. Last name

firstname. Name

middlename. Middle name

начало примера

Пример:

 

{
     «key»: {
          «lastname»: «Smith»,
          «firstname»: «Sara»,
          «middlename»: «Ellen»
   }
}

конец примера

Link

JSON string data type

начало примера

Example:

 

 {
    «key»: «http://site.org»
}

конец примера

Users

JSON strings array data type

Values are users IDs

начало примера

Example:

 

{
     «key»: [ «c44b66f6-216a-457e-a37e-ea8e373a4b77» ]
}

конец примера

App

JSON strings array data type

Values are app items IDs

начало примера

Пример:

 

{
    «key»: [ «c44b66f6-216a-457e-a37e-ea8e373a4b77» ]
}

конец примера

Table

JSON object data type

Object fields:

rows. Strings array. Each string is an object whose fields are determined when configuring the table. Keys are the field codes whose values depend on their type. If the column value is specified by a formula, it is calculated automatically.

result. This is the result object whose fields are defined when configuring the table. Only columns for which the result (value in the footer) is calculated by a formula will be included into this object. This object is calculated automatically based on the column settings.

view. This is the string representation of the table formed by a template. The view is generated automatically.

начало примера

 

Example:

{
   «key» : {
        «rows»: [
            {  «good_name» : «product 1», «count» : 10},
            {  «good_name» : «product 2», «count» : 20},
        ],
       «result»: { «count»: 30 },
       «view»: «Итого: 30 позиций»
    }  
}

конец примера