Skip to main content
POST
Create data type

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
name
string
required

Name of data type. Example: OutletDetail

fields
object[]
required

List of fields to data type . Example: { 'id': 'dataId', 'title': 'Data ID', 'type': 'text', 'optionData': [], 'required': true, 'primaryKey': true }

limitUser
boolean

Setting to limit data source usage by users. Default: false

commonData
boolean

Settings to define the data source to be unique by hub or shared across all hubs. This setting is not changeable after creation. Default: false

uniqueTogether
string[][]

Combinations of field ids whose values together must not repeat, for example [["outlet", "product"]]. Each combination has two or more fields, cannot include the title field or a relation filled from another data type, and cannot be listed twice. A multi-value field matches only the same set of values in any order, and an unticked boolean counts as false. A record with an empty field in a combination is not checked. Scoped per hub when the data type has Scope Data by Hub on. Example: [["outlet", "product"]]

Minimum array length: 2
extends
object | null

Set to attach custom fields to a built-in entity instead of creating a standalone data source. At most one extension data type per entity per organization. commonData is set by the server from the entity: false (scoped by hub) for user and vehicle, true (shared by all hubs) for hub and role. Example: { "entity": "user" }

provider
enum<string>
default:internal

The data source provider type. Default: internal Available values: internal, external-api (external GET API)

Available options:
internal,
external-api
providerConfig
object

For internal provider

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data_type
object

Detail of object data type.