Skip to main content
PUT
Update data type

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Path Parameters

_id
string
required

Unique identifier for the data that generated by system. Example: 640a45dd089dc95a0a09ef14

Query Parameters

columnsOnly
boolean

Marks a save that only changes columnOrder, metaColumns or a field's show, so it never upgrades a v3-compatible type. Ignored when anything else changed.

Body

application/json

Data type definition. The v4 field model adds field types, validations, relations, unique together, column settings and Master Data extensions.

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 }

deleteFields
array

This parameter is list of fields to data type id for delete the field on collection of data source. Example: [ 'outletPhoneNumber', 'outletCloseOrder' ]

limitUser
boolean

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

provider
enum<string>

The data source provider type. Cannot be changed after creation.

Available options:
internal,
external-api
providerConfig
object

For internal provider

extends
object

Makes this data type the Extended data of a MileApp entity: its records hold the custom fields read back as extendedData with include=extendedData. One extension per entity per organization. An extension keeps its own name; any other type may not take a Master Data name (user, hub, vehicle, role, tasktype and their translations), refused with failedCode dtype-037.

uniqueTogether
string[][]

Combinations of two or more field ids whose values together must not repeat within a hub. primaryKey, hasOne and hasMany fields cannot join one. The same combination twice is refused. Example: [["outlet","product"]]

columnOrder
string[]

Order of the Data Source table columns: _select, _no, field ids, then createdBy, createdTime, updatedTime, hub, limitUser. Unknown ids are dropped on read.

metaColumns
object[]

Visibility of the non-field columns. Example: [{"id":"createdBy","show":true}]

commonData
boolean

false scopes records by hub (each record belongs to one hub). Changeable only while the type has no records.

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data_type
object

Detail of object data type.