Open Inventory / Docs
EndpointsInventory structureInventory typesKey

Update or restore an inventory type

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

PATCH
/inventory-types/{key}

Requires an authenticated administrator browser session. The stable type key is immutable.

Authorization

adminSession
cookieauthjs.session-token<token>

Authenticated Auth.js browser session cookie; each operation declares its required permission. Not restricted to administrators. HTTPS deployments use the secure-prefixed cookie variant.

Path Parameters

key*string

Stable key of an administrator-configurable inventory type.

Match^[a-z][a-z0-9_-]{0,63}$
Length1 <= length <= 64

Header Parameters

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Request Body

application/json
  1. body
Properties1 <= properties
label?string
Length1 <= length <= 120
description?string
Lengthlength <= 5000
color?string
Length1 <= length <= 32
icon?string
Length1 <= length <= 80
canContain?boolean
spatialContainment?boolean
position?integer
Range0 <= value <= 100000
archived?boolean

Archive when true or restore when false.

Response Body

Inventory type updated

application/json
  1. response
type*
Example Request
curl -X PATCH 'https://inventory.example.com/api/v1/inventory-types/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "type": {    "key": "string",    "label": "string",    "description": "string",    "color": "string",    "icon": "string",    "canContain": true,    "spatialContainment": true,    "position": 0,    "isSystem": true,    "createdBy": "string",    "updatedBy": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "archivedAt": "2019-08-24T14:15:22Z"  }}