Skip to content
.seventhings.com

Prefill your credentials

Fill in your non-secret values to have them appear in the examples below. Stored locally in your browser.

Update a field definition for a specific template.

PUT
/customer-api/v1/asset-tracking/{template}/field-definition/{fieldDefinitionUuid}
curl --request PUT \
--url https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "uuid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "field_key": "example", "field_type": { "name": "ATTACHMENT", "constraints": [ { "type": "allowed_values", "value": [ "example" ] } ] }, "label": "general_information", "comment": "Additional info about the field", "default_value": true, "possible_values": [ true ], "attributes": [ { "type": "form_group", "value": "General" } ], "relations": [ { "type": "actual_field", "field_uuid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'

Update a field definition for a specific template.

template
required

The template type of the asset tracking module

Allowed values: asset room person
Example
room

The template to get the field definitions for.

fieldDefinitionUuid
required
string format: uuid

The UUID of the field definition to get.

Media typeapplication/json

A field definition

object
uuid
required
string format: uuid
field_key
required

The key of the field

string
>= 1 characters <= 64 characters
field_type
required
One of:

An attachment field type

object
name
required
Allowed values: ATTACHMENT
constraints
required

Array of field value constraints

Array
Any of:

A field value constraint that allows only certain values

object
type
required
Allowed values: allowed_values
value
required

Array of allowed values

Array<string>
label
required

The label or translation key of the field

string
Example
general_information
comment

The comment of the field

string
Example
Additional info about the field
default_value
One of:
boolean
possible_values

The possible values of the field

Array
nullable
attributes
required

The attributes of the field

Array
Any of:

The form group of a field

object
type
required
Allowed values: form_group
value
required
string
Example
{
"type": "form_group",
"value": "General"
}
relations
required

The relations of the field

Array
nullable
Any of:

The actual field of the relation

object
type
required
Allowed values: actual_field
field_uuid
required

The uuid of the field

string format: uuid

Success

Request body is missing or invalid or request data is invalid.

Access token is missing or invalid.

You are not permitted to perform the requested operation.

The requested resource representation has no acceptable format.

Internal Server Error.