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.

Create a new field definition for a specific template.

POST
/customer-api/v1/asset-tracking/{template}/field-definition
curl --request POST \
--url https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "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" } ] }'

Create a new 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.

Media typeapplication/json

Create a new field definition

object
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
required
One of:
boolean
possible_values
required

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

Location
string

The URL of the newly created field definition.

Location-UUID
uuid

The UUID of the newly created object.

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.