Relation Types
Returns all relation types available in the system.
Relation type list
Unauthorized
Internal Server Error
GET /api/relation_types HTTP/1.1
Accept: */*
{
"data": [
{
"description": "Parent/Child",
"id": 1,
"name": "default"
},
{
"description": "Depends on",
"id": 2,
"name": "depends"
}
]
}Creates a new relation type with the provided payload.
Relation type created
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/relation_types HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"relation_type": {
"description": "Parent-child relationship",
"name": "parent"
}
}{
"data": {
"description": "Parent-child relationship",
"id": 1,
"inserted_at": "2026-06-18T10:00:00Z",
"name": "parent",
"updated_at": "2026-06-18T10:00:00Z"
}
}Retrieves the relation type identified by the given ID.
Relation type ID
Relation type details
Unauthorized
Internal Server Error
GET /api/relation_types/{id} HTTP/1.1
Accept: */*
{
"data": {
"description": "Parent-child relationship",
"id": 1,
"inserted_at": "2026-06-18T10:00:00Z",
"name": "parent",
"updated_at": "2026-06-18T10:00:00Z"
}
}Updates the specified relation type using the provided payload.
Relation type ID
Relation type updated
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
PUT /api/relation_types/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"relation_type": {
"description": "Parent-child relationship",
"name": "parent"
}
}{
"data": {
"description": "Parent-child relationship",
"id": 1,
"inserted_at": "2026-06-18T10:00:00Z",
"name": "parent",
"updated_at": "2026-06-18T10:00:00Z"
}
}Deletes the specified relation type.
Relation type ID
Relation type deleted
No content
Unauthorized
Internal Server Error
DELETE /api/relation_types/{id} HTTP/1.1
Accept: */*
No content
Updates the specified relation type using the provided payload.
Relation type ID
Relation type updated
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
PATCH /api/relation_types/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"relation_type": {
"description": "Parent-child relationship",
"name": "parent"
}
}{
"data": {
"description": "Parent-child relationship",
"id": 1,
"inserted_at": "2026-06-18T10:00:00Z",
"name": "parent",
"updated_at": "2026-06-18T10:00:00Z"
}
}Last updated