Skip to content
Select language:English

/api/v1/types/{id}/preview

POST
/api/v1/types/{id}/preview
curl --request POST \
--url https://example.com/api/v1/types/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/preview \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "icon": "example", "colour": "example", "capabilities": [ "container" ], "parentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fieldGroups": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "defaultWarrantyMonths": 1 }'
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
Media typeapplication/json
object
name
string
>= 1 characters <= 80 characters
icon
string
/^(lucide|tabler|kept):[a-z0-9-]+$/
colour
Any of:
string
/^#[0-9A-Fa-f]{6}$/
capabilities
Array<string>
<= 6 items
Allowed values: container metered warranty serialized consumable expires
parentId
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
fieldGroups
Array<string>
<= 20 items
defaultWarrantyMonths
Any of:
integer
<= 1200

Default Response

Media typeapplication/json
object
descendants
required
Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string | null
builtinKey
required
string | null
perLocation
required
Array<object>
object
locationId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string | null
things
required
number
hiddenLocations
required
integer
>= -9007199254740991 <= 9007199254740991
fieldsToArchive
required
Array<string>
Examplegenerated
{
"descendants": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"builtinKey": "example"
}
],
"perLocation": [
{
"locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"things": 1
}
],
"hiddenLocations": 1,
"fieldsToArchive": [
"example"
]
}