API referenceInventory structureRelation typesKey
Update, archive, or restore a relationship type
The API runs on your own Open Inventory instance. Session-authenticated requests require a session on that instance.
PATCH
Requires an authenticated administrator browser session. Built-in relationship types cannot be archived.
adminSessioncookie
authjs.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.
key*stringStable key of an administrator-configurable directed relationship type.
Match
^[a-z][a-z0-9_-]{0,63}$Length
1 <= length <= 64X-Organization-ID?stringOrganization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.
Format
uuidapplication/json- body
Properties
1 <= propertieslabel?stringLength
1 <= length <= 120inverseLabel?stringLength
1 <= length <= 120description?stringLength
length <= 5000allowManual?booleanposition?integerRange
0 <= value <= 100000archived?booleanArchive when true or restore when false.
Relationship type updated
application/json- response
relationType*curl -X PATCH 'https://inventory.example.com/api/v1/relation-types/string' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "relationType": { "key": "string", "label": "string", "inverseLabel": "string", "description": "string", "allowManual": true, "spatial": 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" }}