{
    "openapi": "3.1.0",
    "info": {
        "title": "Memida API",
        "description": "# Introduction\nThe Memida API is built on HTTP.  Our API is RESTful. It has predictable\nresource URLs.  It returns HTTP response codes to indicate errors.  It also\naccepts and returns JSON in the HTTP body. You can use your favorite\nHTTP/REST library for your programming language.\n\nTo ensure you receive JSON data, please include the `Accept: application/json` header in your HTTP request.\n\n## Authentication\nGenerate your API key under More options → API. You can also delete keys later (useful for rotating credentials).\nTo authenticate with the Memida API, include your secret key in the request headers.\n\n:::info\nDuring the test period, please contact us to request API access.\n:::\n\nMemida offers one form of authentication:  private key.\n- private key: authenticates by the HTTP header: Auth (read more on this below).\n\nNever share your secret keys. Keep them guarded and secure.\nThe client-side authentication scheme uses one HTTP header named Auth.\n\n\n```json\n{\n    Auth: 'live XXXXXXXXXXXXXXXXXXXXXXX'\n}\n```\n\n## API Error Responses\n\nIn our REST API, we follow standard HTTP status codes to indicate the result of each request. When an error occurs,\nthe API will return a JSON object with a dynamic error message to help you diagnose and resolve the issue.\n\n### Dynamic Validator Response\n\n```json\n{\n    error: {\n        type: {\n            is_type: 'type is not valid'\n        }\n    }\n}\n```\n\n### HTTP Dynamic Response\n\n```json\n{\n    message: 'Not Found',\n    url: '/api/v1/files/info/50ece4de-1468-4a07-83f1-f66d5c1d397e4',\n    code: 404\n}\n```\n",
        "contact": {
            "name": "Memida API Team",
            "email": "api@memida.de"
        },
        "version": "1.0.0",
        "x-logo": {
            "url": "https://api.staging.memida.de/img/logo_api.png",
            "altText": "Memida API"
        }
    },
    "servers": [
        {
            "url": "https://api.memida.de",
            "description": "API server"
        }
    ],
    "paths": {
        "/api/v1/info": {
            "get": {
                "tags": [
                    "ApiToken"
                ],
                "summary": "Get API Token Info",
                "description": "Returns metadata for the currently authenticated API token and\n        confirms that authentication is working.",
                "operationId": "ApiTokenInfo",
                "responses": {
                    "200": {
                        "description": "API token information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/apiToken"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/schemas/unauthorized",
                        "description": "Unauthorized"
                    }
                }
            }
        },
        "/api/v1/apparatus_basedata_types": {
            "get": {
                "tags": [
                    "ApparatusBasedataTypes"
                ],
                "summary": "List apparatus basedata types",
                "description": "Get list of apparatus basedata types. Returns both default\n        types (system-wide) and custom types (organization-specific).",
                "operationId": "apparatusBasedataTypesIndex",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by type name",
                        "schema": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "\\w+"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 100,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "name"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "default": "asc",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    },
                    {
                        "name": "default",
                        "in": "query",
                        "description": "Filter by default apparatus basedata types.\n                <br /> If `true` only default types will be returned",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Apparatus basedata types list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/apparatusBasedataTypesIndex"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "ApparatusBasedataTypes"
                ],
                "summary": "Add apparatus basedata type",
                "description": "Create a new apparatus basedata type used to classify apparatus master data.\n        :::tip\n        We recommend to use a unique name for each apparatus basedata type.\n        :::",
                "operationId": "apparatusBasedataTypeAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusBasedataTypesAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Apparatus basedata type added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    }
                },
                "x-position": 3
            }
        },
        "/api/v1/apparatus_basedata_types/{id}": {
            "get": {
                "tags": [
                    "ApparatusBasedataTypes"
                ],
                "summary": "View apparatus basedata type",
                "description": "Return full details of one apparatus basedata type by UUID.",
                "operationId": "apparatusBasedataTypesView",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus basedata type UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Apparatus basedata type details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/apparatusBasedataTypesIndex"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Apparatus basedata type not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            },
            "put": {
                "tags": [
                    "ApparatusBasedataTypes"
                ],
                "summary": "Edit apparatus basedata type",
                "description": "Update an apparatus basedata type by UUID, including default system types where permitted.\n        :::tip\n        Keep names stable because they are used in filters and reporting.\n        :::",
                "operationId": "apparatusBasedataTypeEdit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus basedata type UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusBasedataTypesAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Apparatus basedata type updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Apparatus basedata type not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 4
            },
            "delete": {
                "tags": [
                    "ApparatusBasedataTypes"
                ],
                "summary": "Delete apparatus basedata type",
                "description": "Delete an apparatus basedata type so it is no longer available for new records.\n        :::info\n        Deleted apparatus basedata types still exist in the system\n        for record-keeping purposes but are marked as deleted and cannot be used in new records.\n        They still show up in existing records where they were used before deletion.\n        :::",
                "operationId": "apparatusBasedataTypeDelete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus basedata type UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Apparatus basedata type deleted successfully"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 5
            }
        },
        "/api/v1/apparatus_basedatas": {
            "get": {
                "tags": [
                    "ApparatusBasedatas"
                ],
                "summary": "List apparatus basedatas",
                "description": "Return a paginated list of apparatus basedata master records for selection and management.\n        :::tip\n        Combine `manufacturer_id`, `search`, and sorting for clean catalog views.\n        :::",
                "operationId": "apparatusBasedatasIndex",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Number of items per page",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Field to sort by",
                        "schema": {
                            "type": "string",
                            "default": "created",
                            "enum": [
                                "model",
                                "created",
                                "modified"
                            ]
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "description": "Sort direction",
                        "schema": {
                            "type": "string",
                            "default": "asc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "manufactor_id",
                        "in": "query",
                        "description": "Filter by manufacturer UUID",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search in `name`, `model` and `description` fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "default",
                        "in": "query",
                        "description": "Filter by default apparatus basedatas.\n                <br /> If `true` only default apparatus basedatas will be returned",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Apparatus basedatas list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/apparatusesBasedatasIndex"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "ApparatusBasedatas"
                ],
                "summary": "Add apparatus basedata",
                "description": "Create a new apparatus basedata (master data)\n        template that can be reused when creating apparatus records.\n        :::tip\n        We recommend to use a unique combination of `model` (name/number),\n        `manufacturer`, and `type` for each apparatus basedata.\n        :::",
                "operationId": "ApparatusBasedataAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "model"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusBasedataAddSchema"
                                    },
                                    {
                                        "$ref": "#/components/schemas/ApparatusBasedataFilesAddSchema"
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "required": [
                                    "model"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusBasedataAddSchema"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Apparatus basedata added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/apparatus_basedatas/{id}": {
            "put": {
                "tags": [
                    "ApparatusBasedatas"
                ],
                "summary": "Edit apparatus basedata",
                "description": "Update an existing apparatus basedata (master data) record by UUID.",
                "operationId": "ApparatusBasedataEdit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus Basedata UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/ApparatusBasedataEditSchema"
                                    },
                                    {
                                        "$ref": "#/components/schemas/ApparatusBasedataFilesAddSchema"
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/ApparatusBasedataEditSchema"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Apparatus basedata updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "ApparatusBasedatas"
                ],
                "summary": "Delete apparatus basedata",
                "description": "Delete an apparatus basedata record so it cannot be assigned to new apparatuses.\n        :::info\n        Deleted basedatas still exist in the system for record-keeping purposes but are marked as\n        deleted and cannot be used in new records.\n        They still show up in existing records where they were used before deletion.\n        :::",
                "operationId": "ApparatusBasedataDelete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus Basedata UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Apparatus basedata deleted successfully"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/apparatus_basedatas/{apparatus_basedata_id}": {
            "get": {
                "tags": [
                    "ApparatusBasedatas"
                ],
                "summary": "View apparatus basedata",
                "description": "Return full details of one apparatus basedata master record by UUID.",
                "operationId": "apparatusBasedatasView",
                "parameters": [
                    {
                        "name": "apparatus_basedata_id",
                        "in": "path",
                        "description": "Apparatus basedata UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Apparatus basedata details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/apparatusesBasedatasView"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Apparatus basedata not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            }
        },
        "/api/v1/apparatuses": {
            "get": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "List apparatuses",
                "description": "List apparatus records with pagination, searching, and sorting for overview screens.",
                "operationId": "apparatusesIndex",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "description": "Search multiple fields",
                            "type": "string",
                            "minLength": 3,
                            "pattern": "\\w+"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "apparatuses list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "apparatuses",
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/apparatuses"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "Create apparatus",
                "description": "Create a new apparatus instance linked to master data, manufacturer, cost center,\n        and optional files.",
                "operationId": "ApparatusAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "identno",
                                    "costcenter_id",
                                    "apparatus_basedata_id"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusesAdd"
                                    },
                                    {
                                        "$ref": "#/components/schemas/apparatusesFilesAdd"
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "required": [
                                    "identno",
                                    "costcenter_id",
                                    "apparatus_basedata_id"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusesAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "apparatus added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/apparatuses/comments/{id}": {
            "delete": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "Delete comment",
                "description": "Delete one apparatus comment by UUID.",
                "operationId": "ApparatusCommentDelete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus Comment UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "comment deleted successfully"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/apparatuses/{apparatus_id}/comments": {
            "get": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "List comments",
                "description": "List comments for one apparatus with pagination and sorting for timeline views.",
                "operationId": "ApparatusCommentsIndex",
                "parameters": [
                    {
                        "name": "apparatus_id",
                        "in": "path",
                        "description": "Apparatus `id` <UUID>",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response with comments list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/apparatusesComments"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Apparatus not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                },
                "x-position": 4
            }
        },
        "/api/v1/apparatuses/{id}": {
            "put": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "Update apparatus",
                "description": "Update an existing apparatus by UUID, including metadata and related fields.",
                "operationId": "ApparatusEdit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Apparatus UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusesEdit"
                                    },
                                    {
                                        "$ref": "#/components/schemas/apparatusesFilesAdd"
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/apparatusesEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "apparatus updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/apparatuses/identno/{identno_id}": {
            "get": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "Get apparatus by identno",
                "description": "Get one apparatus by its business identifier `identno` instead of UUID.",
                "operationId": "apparatusesIndentnoView",
                "parameters": [
                    {
                        "name": "identno_id",
                        "in": "path",
                        "description": "Apparatuses identification number.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "TZ0089"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "apparatus view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/apparatusesView"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 3
            }
        },
        "/api/v1/apparatuses/{apparatus_id}": {
            "get": {
                "tags": [
                    "Apparatuses"
                ],
                "summary": "Get apparatus by id",
                "description": "Get a detailed view of one apparatus by UUID, including key related entities.",
                "operationId": "apparatusesView",
                "parameters": [
                    {
                        "name": "apparatus_id",
                        "in": "path",
                        "description": "Apparatuses Index uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid",
                            "example": "6491cfb2-e316-548b-b69b-4a4ed5845ed3"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "apparatus view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/apparatusesView"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            }
        },
        "/api/v1/custom_fields": {
            "get": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "List custom fields",
                "description": "List all custom field definitions sorted by `field_id` and `type` for configuration overview.",
                "operationId": "customFieldsIndex",
                "responses": {
                    "200": {
                        "description": "Success custom fields list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "custom field",
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/customFieldsMeta"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Create custom field",
                "description": "Create a custom field definition for apparatuses, inspections, or test plans.\n        :::tip\n        Define validation and labels carefully because they affect all consumers.\n        :::",
                "operationId": "customFieldsAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "type",
                                    "title",
                                    "form_type"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/customFieldsMetaAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        },
                                        "field_id": {
                                            "type": "integer",
                                            "format": "int64",
                                            "example": 1
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    }
                }
            }
        },
        "/api/v1/custom_fields/{custom_field_id}": {
            "get": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Get custom field",
                "description": "Get one custom field definition by UUID with full configuration details.",
                "operationId": "customFieldsView",
                "parameters": [
                    {
                        "name": "custom_field_id",
                        "in": "path",
                        "description": "An identifier for a custom field.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid",
                            "example": "41e61587-1aed-5bac-887d-c7a705cdcdcb"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success custom fields list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/customFieldsMeta"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            },
            "put": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Update custom field",
                "description": "Update a custom field definition by UUID, including title, form config, and validation.\n        :::tip\n        Prefer additive changes for fields already in production use.\n        :::",
                "operationId": "customFieldsEdit",
                "parameters": [
                    {
                        "name": "custom_field_id",
                        "in": "path",
                        "description": "An identifier for a custom field.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid",
                            "example": "bdc9353c-5215-5502-aa01-510fe9f4ba8d"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/customFieldsMetaEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/default_edit_response",
                        "description": "Success custom fields list"
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Delete custom field",
                "description": "Delete a custom field definition by UUID.",
                "operationId": "customFieldsDelete",
                "parameters": [
                    {
                        "name": "custom_field_id",
                        "in": "path",
                        "description": "An identifier for a custom field.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Custom field deleted successfully"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/custom_fields/{type}/{field_id}": {
            "get": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Get custom field by type and field_id",
                "description": "Get one custom field definition by `type` and `field_id`.",
                "operationId": "customFieldsViewById",
                "parameters": [
                    {
                        "name": "type",
                        "in": "path",
                        "description": "An identifier for a custom field.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "Apparatuses",
                                "Inspections",
                                "Testplans"
                            ]
                        }
                    },
                    {
                        "name": "field_id",
                        "in": "path",
                        "description": "field key",
                        "required": true,
                        "schema": {
                            "description": "`field_id` is unique in combination with the `type`",
                            "type": "int64",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success custom fields list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/customFieldsMeta"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 3
            },
            "put": {
                "tags": [
                    "Custom Fields"
                ],
                "summary": "Update custom field by field_id",
                "description": "Update a custom field definition by `type` and `field_id` when UUID is not available.",
                "operationId": "customFieldsEditById",
                "parameters": [
                    {
                        "name": "type",
                        "in": "path",
                        "description": "An identifier for a custom field.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "Apparatuses",
                                "Inspections",
                                "Testplans"
                            ]
                        }
                    },
                    {
                        "name": "field_id",
                        "in": "path",
                        "description": "field key",
                        "required": true,
                        "schema": {
                            "description": "`field_id` is unique in combination with the `type`",
                            "type": "int64",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/customFieldsMetaEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/default_edit_response",
                        "description": "Success custom fields update"
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/files/{file_id}": {
            "get": {
                "tags": [
                    "Files"
                ],
                "summary": "Get a File",
                "description": "Download a file by UUID as binary data with the correct content type and filename headers.\n        :::tip\n        Stream large files instead of buffering them fully in memory.\n        :::",
                "operationId": "FilesView",
                "parameters": [
                    {
                        "name": "file_id",
                        "in": "path",
                        "description": "File by id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "File download successful",
                        "headers": {
                            "Content-Disposition": {
                                "description": "Attachment with original filename",
                                "schema": {
                                    "type": "string",
                                    "example": "attachment; filename=\"document.pdf\""
                                }
                            },
                            "Content-Type": {
                                "description": "MIME type of the file",
                                "schema": {
                                    "type": "string",
                                    "example": "application/pdf"
                                }
                            }
                        },
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "description": "Binary file data",
                                    "type": "string",
                                    "format": "binary"
                                }
                            },
                            "image/*": {
                                "schema": {
                                    "description": "Image file data",
                                    "type": "string",
                                    "format": "binary"
                                }
                            },
                            "application/pdf": {
                                "schema": {
                                    "description": "PDF file data",
                                    "type": "string",
                                    "format": "binary"
                                }
                            },
                            "text/plain": {
                                "schema": {
                                    "description": "Text file data",
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Files"
                ],
                "summary": "Delete a File",
                "description": "The DELETE File Endpoint is a critical API resource that allows\n        users to irreversibly delete a specified file. When you make a DELETE request to\n        this endpoint, the file will be permanently removed and cannot be recovered.",
                "operationId": "FilesDelete",
                "parameters": [
                    {
                        "name": "file_id",
                        "in": "path",
                        "description": "File by id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "File deleted successfully"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/files/info/{file_id}": {
            "get": {
                "tags": [
                    "Files"
                ],
                "summary": "Get file informations",
                "description": "Return metadata for one file by UUID, including name, type, and ownership context.",
                "operationId": "FilesInfo",
                "parameters": [
                    {
                        "name": "file_id",
                        "in": "path",
                        "description": "File by id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "files view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "file",
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/files"
                                                },
                                                {
                                                    "$ref": "#/components/schemas/filesInfo"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/files": {
            "post": {
                "tags": [
                    "Files"
                ],
                "summary": "Public file access",
                "description": "Create a temporary public access URL for a file by UUID.\n        :::tip\n        Use only when external access is required and rotate links regularly.\n        :::",
                "operationId": "FilesPublic",
                "parameters": [
                    {
                        "name": "file_id",
                        "in": "path",
                        "description": "File by id",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "public"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/filesPublic"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Files view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "file",
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/files"
                                                },
                                                {
                                                    "$ref": "#/components/schemas/filesInfo"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/inspections/types": {
            "get": {
                "tags": [
                    "Inspections"
                ],
                "summary": "List inspection types",
                "description": "List available inspection types, including organization-specific custom types.",
                "operationId": "inspectionTypes",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "created"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "default": "asc",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    },
                    {
                        "name": "parent_type",
                        "in": "query",
                        "description": "Filter by parent type",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "other",
                                "calibration",
                                "repair",
                                "inspection",
                                "decision"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Inspection types list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/inspectionTypeIndex"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            }
        },
        "/api/v1/inspections": {
            "get": {
                "tags": [
                    "Inspections"
                ],
                "summary": "List inspections",
                "description": "List inspection records with pagination and sorting for audit and history views.",
                "operationId": "inspectionsIndex",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    },
                    {
                        "name": "apparatus_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "inspections list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "custom field",
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/inspectionsView"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "Inspections"
                ],
                "summary": "Create inspection",
                "description": "Create a new inspection record for an apparatus, including result and optional attachments.",
                "operationId": "InspectionsAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "inspection_result",
                                    "apparatus_id",
                                    "checked_at"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/inspectionsAdd"
                                    },
                                    {
                                        "properties": {
                                            "files": {
                                                "type": "array",
                                                "items": {
                                                    "allOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "binary"
                                                        }
                                                    ]
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "property": null
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "required": [
                                    "inspection_result",
                                    "apparatus_id",
                                    "checked_at"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/inspectionsAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "inspection added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/inspections/{inspection_id}": {
            "get": {
                "tags": [
                    "Inspections"
                ],
                "summary": "Get inspection by id",
                "description": "Get full details of one inspection by UUID, including result and type context.",
                "operationId": "InspectionsView",
                "parameters": [
                    {
                        "name": "inspection_id",
                        "in": "path",
                        "description": "Inspection uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid",
                            "example": "37fd21e4-c53c-5801-93a8-ca0dd655629bInspection Index uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "inspection view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "inspections",
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/inspectionsView"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 3
            },
            "put": {
                "tags": [
                    "Inspections"
                ],
                "summary": "Update inspection",
                "description": "Update an inspection by UUID, including outcome and related metadata.",
                "operationId": "InspectionsEdit",
                "parameters": [
                    {
                        "name": "inspection_id",
                        "in": "path",
                        "description": "Inspection uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/inspectionsEdit"
                                    },
                                    {
                                        "properties": {
                                            "files": {
                                                "type": "array",
                                                "items": {
                                                    "allOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "binary"
                                                        }
                                                    ]
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "property": null
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/inspectionsEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/default_edit_response",
                        "description": "inspection possible error"
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Inspections"
                ],
                "summary": "Add inspection file",
                "description": "Add one or more files to an existing inspection record.",
                "operationId": "InspectionsFileAdd",
                "parameters": [
                    {
                        "name": "inspection_id",
                        "in": "path",
                        "description": "Inspection Index uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "type",
                                    "inspection_result_id",
                                    "apparatus_id"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "properties": {
                                            "files": {
                                                "type": "array",
                                                "items": {
                                                    "allOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "binary"
                                                        }
                                                    ]
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "property": null
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "success inspection",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "description": "list of file id's",
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {
                                                "type": "uuid"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "deprecated": true
            }
        },
        "/api/v1/manufacturers": {
            "get": {
                "tags": [
                    "Manufacturers"
                ],
                "summary": "List manufacturers",
                "description": "List manufacturers from both default and organization-specific sources for\n        selectors and search screens.",
                "operationId": "manufacturersIndex",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by manufacturer name",
                        "schema": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "\\w+"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 100,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "name"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "default": "asc",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    },
                    {
                        "name": "default",
                        "in": "query",
                        "description": "Filter by default manufacturers.\n                <br /> If `true` only default manufacturers will be returned",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Manufacturers list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/manufacturersIndex"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 1
            },
            "post": {
                "tags": [
                    "Manufacturers"
                ],
                "summary": "Add manufacturer",
                "description": "Create a new manufacturer master record for use in apparatus master data and apparatus entries.\n        :::tip\n        We recommend to use a unique name for each manufacturer.\n        :::",
                "operationId": "ManufacturerAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/manufacturersAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Manufacturer added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    }
                }
            }
        },
        "/api/v1/manufacturers/{id}": {
            "get": {
                "tags": [
                    "Manufacturers"
                ],
                "summary": "View manufacturer",
                "description": "Return full details of one manufacturer by UUID.",
                "operationId": "manufacturersView",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Manufacturer UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Manufacturer details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "inspections",
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/manufacturersIndex"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Manufacturer not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            },
            "put": {
                "tags": [
                    "Manufacturers"
                ],
                "summary": "Edit manufacturer",
                "description": "Update a manufacturer by UUID, including default system manufacturers where permitted.",
                "operationId": "ManufacturerEdit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Manufacturer UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/manufacturersAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Manufacturer updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden - Cannot edit default manufacturer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Manufacturer not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Manufacturers"
                ],
                "summary": "Delete manufacturer",
                "description": "Delete a manufacturer so it can no longer be selected for new records.\n        :::info\n        Deleted manufacturers still exist in the system for record-keeping purposes but\n        are marked as deleted and cannot be used in new records.\n        They still show up in existing records where they were used before deletion.\n        :::",
                "operationId": "ManufacturerDelete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Manufacturer UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Manufacturer deleted successfully"
                    },
                    "403": {
                        "description": "Forbidden - Cannot delete default manufacturer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/testplans": {
            "get": {
                "tags": [
                    "Testplans"
                ],
                "summary": "List testplans",
                "description": "List test plans with pagination and sorting for apparatus planning workflows.",
                "operationId": "testplansIndex",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 20,
                            "maximum": 100,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "default": 1,
                            "minimum": 1
                        }
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "description": "Sort direction",
                            "type": "string",
                            "enum": [
                                "desc",
                                "asc"
                            ]
                        }
                    },
                    {
                        "name": "apparatus_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "testplans list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "testplans",
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/testplansView"
                                            }
                                        },
                                        "paginator": {
                                            "$ref": "#/components/schemas/Paginator"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "x-position": 2
            },
            "post": {
                "tags": [
                    "Testplans"
                ],
                "summary": "Create testplan",
                "description": "Create a new test plan for an apparatus, including inspection plan and\n        calibration procedure content.",
                "operationId": "TestplansAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "apparatus_id"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/testplansAdd"
                                    },
                                    {
                                        "properties": {
                                            "files": {
                                                "type": "array",
                                                "items": {
                                                    "allOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "binary"
                                                        }
                                                    ]
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "property": null
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "required": [
                                    "apparatus_id"
                                ],
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/testplansAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "testplan added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "format": "uuid"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Forbidden"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/testplans/{testplan_id}": {
            "get": {
                "tags": [
                    "Testplans"
                ],
                "summary": "Get testplan by id",
                "description": "Get full details of one test plan by UUID.",
                "operationId": "TestplansView",
                "parameters": [
                    {
                        "name": "testplan_id",
                        "in": "path",
                        "description": "Testplan uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid",
                            "example": "64cec246-3e13-4485-a689-ff97f4f13f4d"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "testplan view",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "title": "testplans",
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/testplansView"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                },
                "x-position": 3
            },
            "put": {
                "tags": [
                    "Testplans"
                ],
                "summary": "Update testplan",
                "description": "Update an existing test plan by UUID, including procedures and linked files.",
                "operationId": "TestplansEdit",
                "parameters": [
                    {
                        "name": "testplan_id",
                        "in": "path",
                        "description": "Testplan uuid.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/testplansEdit"
                                    },
                                    {
                                        "properties": {
                                            "files": {
                                                "type": "array",
                                                "items": {
                                                    "allOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "binary"
                                                        }
                                                    ]
                                                }
                                            }
                                        },
                                        "type": "object",
                                        "property": null
                                    }
                                ]
                            }
                        },
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/testplansEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/default_edit_response",
                        "description": "testplan possible error"
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/webhooks/subscriptions": {
            "get": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhook subscriptions",
                "description": "Lists active and inactive webhook subscriptions of the authenticated organization/tenant.",
                "operationId": "webhookSubscriptionsIndex",
                "responses": {
                    "200": {
                        "description": "Webhook subscriptions list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/webhookSubscription"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Create webhook subscription",
                "description": "Creates a webhook subscription for one event type. The signing secret is returned only once.",
                "operationId": "webhookSubscriptionsAdd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/webhookSubscriptionAdd"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Webhook subscription created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/webhookSubscriptionCreated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    }
                }
            }
        },
        "/api/v1/webhooks/subscriptions/{id}": {
            "put": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Update webhook subscription",
                "description": "Updates a webhook subscription metadata. `target_url` and `event_type` are immutable and require a new subscription. Use `rotate_secret=true` to generate a new signing secret.",
                "operationId": "webhookSubscriptionsEdit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "subscription UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/webhookSubscriptionEdit"
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Webhook subscription updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/webhookSubscriptionUpdated"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/default_validation_error_response",
                        "description": "Validation Error"
                    },
                    "404": {
                        "description": "Webhook subscription not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Delete webhook subscription",
                "description": "Soft deletes a webhook subscription by deactivating it.",
                "operationId": "webhookSubscriptionsDelete",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "subscription UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Webhook subscription deleted"
                    },
                    "404": {
                        "description": "Webhook subscription not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/webhooks/subscriptions/{id}/test": {
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Queue test webhook delivery",
                "description": "Queues a test delivery for one webhook subscription using the same signing format as regular deliveries.",
                "operationId": "webhookSubscriptionsTest",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "subscription UUID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Test delivery queued",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/webhookSubscriptionTestQueued"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Webhook subscription not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFound"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Queue backend is unavailable"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "apiToken": {
                "properties": {
                    "name": {
                        "type": "string",
                        "example": "My API Token"
                    },
                    "server": {
                        "type": "string",
                        "example": "https://server.de"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-01T12:00:00+00:00"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "5a05387f-96b7-42c0-a2fb-cae7bf2ad835"
                    },
                    "company_id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "77277053-7167-444e-83ea-57a2f8742e96"
                    }
                },
                "type": "object"
            },
            "apparatusBasedataAddSchema": {
                "description": "Apparatus basedata add schema",
                "properties": {
                    "model": {
                        "description": "Model name/number",
                        "type": "string",
                        "maxLength": 255,
                        "example": "Model-XYZ-2000"
                    },
                    "description": {
                        "description": "Detailed description of the apparatus",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "High-precision diagnostic equipment with advanced features"
                    },
                    "manufactor_id": {
                        "description": "Manufacturer UUID",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid",
                        "example": "550e8400-e29b-41d4-a716-446655440000"
                    },
                    "apparatus_basedata_type_ids": {
                        "description": "Array of apparatus basedata type UUIDs",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "example": [
                            "550e8400-e29b-41d4-a716-446655440001",
                            "550e8400-e29b-41d4-a716-446655440002"
                        ]
                    }
                },
                "type": "object"
            },
            "ApparatusBasedataEditSchema": {
                "description": "Apparatus basedata edit schema",
                "properties": {
                    "model": {
                        "description": "Model name/number",
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "example": "Model-XYZ-2000"
                    },
                    "description": {
                        "description": "Detailed description of the apparatus",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "High-precision diagnostic equipment with advanced features"
                    },
                    "manufactor_id": {
                        "description": "Manufacturer UUID<br/>Only default `false` can change manufacturer",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid",
                        "example": "550e8400-e29b-41d4-a716-446655440000"
                    },
                    "apparatus_basedata_type_ids": {
                        "description": "Array of apparatus basedata type UUIDs<br/>Only default `false` can change types",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "example": [
                            "550e8400-e29b-41d4-a716-446655440001",
                            "550e8400-e29b-41d4-a716-446655440002"
                        ]
                    }
                },
                "type": "object"
            },
            "apparatusesBasedatasIndex": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "model": {
                        "description": "Model of the apparatus",
                        "type": "string",
                        "example": "Polyskop SWOB 56"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "manufactor_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the apparatus basedata",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "apparatus_basedata_types": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/apparatusesBasedatasTypes"
                        }
                    },
                    "manufactor": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/manufactorsView"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "name": {
                        "description": "Full name of the apparatus basedata",
                        "type": "string",
                        "example": "Rohde & Schwarz Polyskop SWOB 56 HF-Wobbelmessplatz"
                    },
                    "is_default": {
                        "description": "Whether this is apparatus basedata from system default set",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "apparatusesBasedatasView": {
                "type": "object",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/apparatusesBasedatasIndex"
                    },
                    {
                        "properties": {
                            "files": {
                                "type": "object",
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/files"
                                    },
                                    {
                                        "$ref": "#/components/schemas/apparatusBasedataUploadType"
                                    }
                                ]
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "manufactorsView": {
                "title": "Manufactor",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "description": "Name of the manufactor",
                        "type": "string",
                        "example": "Rohde & Schwarz"
                    }
                },
                "type": "object"
            },
            "apparatusBasedataTypesAdd": {
                "title": "Apparatus Basedata Types Add Schema",
                "properties": {
                    "name": {
                        "description": "Name of the apparatus basedata type",
                        "type": "string",
                        "maxLength": 128,
                        "example": "HF-Wobbelmessplatz"
                    }
                },
                "type": "object"
            },
            "apparatusBasedataTypesIndex": {
                "title": "Apparatus Basedata Types Index Schema",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "description": "Name of the apparatus basedata type",
                        "type": "string",
                        "example": "HF-Wobbelmessplatz"
                    },
                    "is_default": {
                        "description": "Whether this is apparatus basedata type from system default set",
                        "type": "boolean"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    }
                },
                "type": "object"
            },
            "apparatusesAdd": {
                "properties": {
                    "identno": {
                        "description": "Unique identifier of the apparatus in your organization",
                        "type": "string",
                        "maxLength": 256,
                        "minLength": 1,
                        "uniqueItems": true
                    },
                    "serial_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "costcenter_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "checkup": {
                        "description": "if **true** `interval_unit` and `check_interval`\n        need to be set, otherwise the defaults will be used",
                        "type": "boolean",
                        "default": false
                    },
                    "apparatus_basedata_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "import_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 256
                    },
                    "delivered_at": {
                        "description": "delivery datetime of the apparatus <br>\n        DateTime are in ISO-8601 format <br> DateTime will be stored in UTC",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2025-03-26T14:00:00.123+02:00"
                    },
                    "interval_unit": {
                        "description": "Interval unit of the checkup, default will be used if `checkup` is true",
                        "type": "string",
                        "default": "months",
                        "enum": [
                            "days",
                            "weeks",
                            "months",
                            "years"
                        ]
                    },
                    "check_interval": {
                        "description": "Interval of the checkup, default will be used if `checkup` is true",
                        "type": "integer",
                        "format": "int64",
                        "default": 12,
                        "minimum": 1
                    },
                    "apparatuses_comments": {
                        "description": "List of comments to add during apparatus creation",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/apparatusesCommentsAdd"
                        }
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "apparatusesCommentsAdd": {
                "properties": {
                    "comment": {
                        "type": "string",
                        "maxLength": 4096
                    },
                    "creator_name": {
                        "description": "Author name",
                        "type": [
                            "string",
                            "null"
                        ],
                        "default": "API key name"
                    },
                    "pinned": {
                        "description": "Pinned status of the comment<br />only one comment can be pinned at a time",
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "default": false
                    },
                    "created": {
                        "description": "DateTime are in ISO-8601 format <br> DateTime will be stored in UTC",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2025-03-26T14:00:00.123+02:00"
                    }
                },
                "type": "object"
            },
            "apparatusesCommentsEdit": {
                "properties": {
                    "id": {
                        "description": "Apparatus Comment id only for editing existing comments",
                        "type": [
                            "uuid",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "apparatusesEdit": {
                "properties": {
                    "serial_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "costcenter_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "checkup": {
                        "description": "if **true** `interval_unit`\n        and `check_interval` need to be set, otherwise the defaults will be used",
                        "type": "boolean",
                        "default": false
                    },
                    "import_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 256
                    },
                    "delivered_at": {
                        "description": "delivery datetime of the apparatus <br>\n        DateTime are in ISO-8601 format <br> DateTime will be stored in UTC",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2025-03-26T14:00:00.123+02:00"
                    },
                    "interval_unit": {
                        "description": "Interval unit of the checkup, default will be used if `checkup` is true",
                        "type": "string",
                        "default": "months",
                        "enum": [
                            "days",
                            "weeks",
                            "months",
                            "years"
                        ]
                    },
                    "check_interval": {
                        "description": "Interval of the checkup, default will be used if `checkup` is true",
                        "type": "integer",
                        "format": "int64",
                        "default": 12,
                        "minimum": 1
                    },
                    "apparatuses_comments": {
                        "description": "List of comments to add or edit during apparatus editing",
                        "allOf": [
                            {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "$ref": "#/components/schemas/apparatusesCommentsEdit"
                                },
                                "property": "apparatuses_comments"
                            },
                            {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "$ref": "#/components/schemas/apparatusesCommentsAdd"
                                },
                                "property": "apparatuses_comments"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "apparatusesBasedatas": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "manufactor_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "model": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "apparatus_basedata_types": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/apparatusesBasedatasTypes"
                        }
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "apparatusesBasedatasTypes": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string",
                        "example": "HF-Wobbelmessplatz"
                    }
                },
                "type": "object"
            },
            "apparatusesComments": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "comment": {
                        "type": "string"
                    },
                    "creator_name": {
                        "description": "Author name, either from user profile or entered manually or API-Key name",
                        "type": "string"
                    },
                    "user_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "pinned": {
                        "description": "Pinned status of the comment<br />only one comment can be pinned at a time",
                        "type": "boolean",
                        "default": false
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "user_name": {
                        "description": "User Author name if available<br />use the `creator_name` field instead",
                        "type": [
                            "string",
                            "null"
                        ],
                        "deprecated": true
                    }
                },
                "type": "object"
            },
            "apparatuses": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatus_basedata_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatuses_locations_bases_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "costcenter_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "operational",
                            "not_available",
                            "out_of_house",
                            "undetectable",
                            "decommissioned",
                            "locked",
                            "defect",
                            "scrapped",
                            "not_operational",
                            "action_required"
                        ]
                    },
                    "is_customer_calibrated": {
                        "type": "boolean",
                        "deprecated": true
                    },
                    "identno": {
                        "type": "string",
                        "minLength": 1
                    },
                    "serial_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "checkup": {
                        "type": "boolean"
                    },
                    "next_check_at": {
                        "type": "string",
                        "format": "date",
                        "example": "2018-03-09"
                    },
                    "is_one_time_next_check_at": {
                        "description": "is true if the next_check_at is one time",
                        "type": "boolean",
                        "default": false
                    },
                    "import_id": {
                        "description": "import Id from import function or system import",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the apparatus",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "manufactor_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "model": {
                        "type": "string"
                    },
                    "costcenter_name": {
                        "type": "string"
                    },
                    "manufacturer_name": {
                        "type": "string"
                    },
                    "latest_checked": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "interval_unit": {
                        "type": "string",
                        "enum": [
                            "days",
                            "weeks",
                            "months",
                            "years"
                        ]
                    },
                    "check_interval": {
                        "type": "integer",
                        "format": "int64",
                        "minimum": 1
                    },
                    "apparatus_basedata": {
                        "$ref": "#/components/schemas/apparatusesBasedatas"
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "apparatus_fullname": {
                        "description": "apparatus full name contain (manufacturer model types)",
                        "type": "string",
                        "example": "Beck SMP 1 Strommeßplatz"
                    },
                    "apparatus_type_names": {
                        "description": "contain all type names",
                        "type": "string",
                        "example": "Spektrumanalyzer"
                    }
                },
                "type": "object"
            },
            "apparatusesView": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatus_basedata_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatuses_locations_bases_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "user_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "costcenter_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "operational",
                            "not_available",
                            "out_of_house",
                            "undetectable",
                            "decommissioned",
                            "locked",
                            "defect",
                            "scrapped",
                            "not_operational",
                            "action_required"
                        ]
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "is_customer_calibrated": {
                        "type": "boolean",
                        "deprecated": true
                    },
                    "identno": {
                        "type": "string",
                        "minLength": 1
                    },
                    "serial_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "checkup": {
                        "type": "boolean"
                    },
                    "next_check_at": {
                        "type": "string",
                        "format": "date",
                        "example": "2018-03-09"
                    },
                    "is_one_time_next_check_at": {
                        "description": "is true if the next_check_at is one time",
                        "type": "boolean",
                        "default": false
                    },
                    "import_id": {
                        "description": "import Id from import function or system import",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the apparatus",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "manufactor_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "model": {
                        "type": "string"
                    },
                    "costcenter_name": {
                        "type": "string"
                    },
                    "manufacturer_name": {
                        "type": "string"
                    },
                    "latest_checked": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "interval_unit": {
                        "type": "string",
                        "enum": [
                            "days",
                            "weeks",
                            "months",
                            "years"
                        ]
                    },
                    "check_interval": {
                        "type": "integer",
                        "format": "int64",
                        "minimum": 1
                    },
                    "apparatuses_comments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/apparatusesComments"
                        },
                        "maxItems": 5
                    },
                    "testplans": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/apparatusesTestplans"
                        },
                        "maxItems": 2
                    },
                    "inspections": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/apparatusesInspections"
                        },
                        "maxItems": 2
                    },
                    "costcenter": {
                        "$ref": "#/components/schemas/costcenter"
                    },
                    "apparatus_basedata": {
                        "$ref": "#/components/schemas/apparatusesBasedatas"
                    },
                    "files": {
                        "type": "object",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/files"
                            },
                            {
                                "$ref": "#/components/schemas/apparatusUploadType"
                            }
                        ]
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "costcenter": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "count_users": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "count_apparatuses": {
                        "type": "integer",
                        "format": "int64"
                    }
                },
                "type": "object"
            },
            "customFieldAddChoicesSchema": {
                "title": "choices",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "uniqueItems": true
                    }
                },
                "type": "object"
            },
            "customFieldChoicesSchema": {
                "title": "choices",
                "properties": {
                    "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 1
                    },
                    "name": {
                        "type": "string"
                    },
                    "deleted": {
                        "type": "boolean",
                        "default": false
                    }
                },
                "type": "object"
            },
            "customFieldsMetaAddOptions": {
                "title": "options",
                "properties": {
                    "min_length": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "format": "int64",
                        "maximum": 5000,
                        "minLength": 1,
                        "example": 1
                    },
                    "max_length": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "format": "int64",
                        "default": 500,
                        "maximum": 5000,
                        "minimum": 1,
                        "example": 500
                    },
                    "required": {
                        "type": "boolean",
                        "default": false
                    },
                    "placeholder": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "choices": {
                        "description": "only in the `select` type <br>each select need a unique name",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/customFieldAddChoicesSchema"
                        }
                    },
                    "checkbox_info": {
                        "description": "only in the `checkbox` type",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "default_select": {
                        "description": "only in the `select` type <br>choice: name of the select field",
                        "type": [
                            "string",
                            "null"
                        ],
                        "default": null
                    }
                },
                "type": "object"
            },
            "customFieldsMetaAdd": {
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "Apparatuses",
                            "Inspections",
                            "Testplans"
                        ]
                    },
                    "title": {
                        "description": "Unique in combination with type",
                        "type": "string",
                        "maxLength": 255,
                        "minLength": 1,
                        "uniqueItems": true
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "default": null
                    },
                    "is_enabled": {
                        "type": "boolean",
                        "default": false
                    },
                    "form_type": {
                        "enum": [
                            "textarea",
                            "input",
                            "checkbox",
                            "datetime",
                            "date",
                            "select"
                        ]
                    },
                    "options": {
                        "$ref": "#/components/schemas/customFieldsMetaAddOptions"
                    }
                },
                "type": "object"
            },
            "customFieldsMetaEdit": {
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_enabled": {
                        "type": "boolean"
                    },
                    "options": {
                        "$ref": "#/components/schemas/customFieldsMetaOptions"
                    }
                },
                "type": "object"
            },
            "customFieldsMetaOptions": {
                "title": "options",
                "properties": {
                    "min_length": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "format": "int64",
                        "maximum": 5000,
                        "minLength": 1,
                        "example": 1
                    },
                    "max_length": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "format": "int64",
                        "default": 500,
                        "maximum": 5000,
                        "minimum": 1,
                        "example": 500
                    },
                    "required": {
                        "description": "When saving an old record, if a custom field is set to `required`, \n        it is ignored and not validated. The `required` setting only applies to new records,\n        allowing old records to be saved without requiring the custom field.",
                        "type": "boolean",
                        "default": false
                    },
                    "placeholder": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "choices": {
                        "description": "only in the `select` type",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/customFieldChoicesSchema"
                        }
                    },
                    "checkbox_info": {
                        "description": "only in the `checkbox` type",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "default_select": {
                        "description": "only in the `select` type, choices id",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "default": null
                    }
                },
                "type": "object"
            },
            "customFieldsMeta": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "field_id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 1
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "Apparatuses",
                            "Inspections",
                            "Testplans"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_enabled": {
                        "type": "boolean"
                    },
                    "form_type": {
                        "enum": [
                            "textarea",
                            "input",
                            "checkbox",
                            "datetime",
                            "date",
                            "select"
                        ]
                    },
                    "options": {
                        "$ref": "#/components/schemas/customFieldsMetaOptions"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of custom field",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    }
                },
                "type": "object"
            },
            "customFields": {
                "title": "custom field",
                "description": "index is custom_field field_id",
                "properties": {
                    "title": {
                        "type": "string"
                    },
                    "form_type": {
                        "enum": [
                            "textarea",
                            "input",
                            "checkbox",
                            "datetime",
                            "date",
                            "select"
                        ]
                    },
                    "value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "view_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "ApparatusBasedataFilesAddSchema": {
                "description": "Apparatus basedata files add schema",
                "properties": {
                    "files": {
                        "description": "Array of files to upload<br/>\n        Files can be deleted and downloaded via the `Files` API endpoint.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "properties": {
                                "file": {
                                    "description": "File to upload",
                                    "type": "string",
                                    "format": "binary"
                                },
                                "type": {
                                    "description": "Upload type ID",
                                    "type": "integer",
                                    "enum": [
                                        6,
                                        7,
                                        8,
                                        9
                                    ],
                                    "x-enumDescriptions": {
                                        "6": "Master Data Device Image",
                                        "7": "Technical Drawing",
                                        "8": "Operating Manual",
                                        "9": "Specifications/Data Sheet"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "apparatusBasedataUploadType": {
                "properties": {
                    "type": {
                        "description": "Upload type ID",
                        "type": [
                            "enum",
                            "null"
                        ],
                        "enum": [
                            6,
                            7,
                            8,
                            9
                        ],
                        "x-enumDescriptions": {
                            "6": "Master Data Device Image",
                            "7": "Technical Drawing",
                            "8": "Operating Manual",
                            "9": "Specifications/Data Sheet"
                        }
                    }
                },
                "type": "object"
            },
            "apparatusUploadType": {
                "properties": {
                    "type": {
                        "description": "Upload type ID",
                        "type": [
                            "enum",
                            "null"
                        ],
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5
                        ],
                        "x-enumDescriptions": {
                            "1": "Technical Drawing",
                            "2": "Operating Manual",
                            "3": "Equipment Image",
                            "4": "Specifications/Data Sheet",
                            "5": "Service and Maintenance Documentation"
                        }
                    }
                },
                "type": "object"
            },
            "apparatusesFilesAdd": {
                "properties": {
                    "files": {
                        "title": "Custom Fields",
                        "description": "Array of files to upload<br/>\n        Files can be deleted and downloaded via the `Files` API endpoint.",
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "properties": {
                                "file": {
                                    "type": "string",
                                    "format": "binary"
                                },
                                "type": {
                                    "description": "Upload type ID",
                                    "type": [
                                        "enum",
                                        "null"
                                    ],
                                    "enum": [
                                        1,
                                        2,
                                        3,
                                        4,
                                        5
                                    ],
                                    "x-enumDescriptions": {
                                        "1": "Technical Drawing",
                                        "2": "Operating Manual",
                                        "3": "Equipment Image",
                                        "4": "Specifications/Data Sheet",
                                        "5": "Service and Maintenance Documentation"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                },
                "type": "object"
            },
            "filesPublic": {
                "properties": {
                    "public": {
                        "description": "Mark the file as public and get a url, or hide an already public file again",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "filesInfo": {
                "properties": {
                    "size": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "type": {
                        "description": "Upload Type ID if available",
                        "type": [
                            "integer",
                            "null"
                        ],
                        "example": "1"
                    },
                    "public_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "url",
                        "example": "https://api.memida.de/..."
                    }
                },
                "type": "object"
            },
            "files": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "file_type": {
                        "description": "MIME media type",
                        "type": "string"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Forbidden": {
                "properties": {
                    "message": {
                        "description": "Error Message",
                        "type": "string"
                    },
                    "url": {
                        "description": "Error Url",
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "default": 403
                    }
                },
                "type": "object"
            },
            "apparatusesInspections": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "report": {
                        "type": "string"
                    },
                    "inspection_result_id": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "checked_at": {
                        "description": "checked datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "inspection_type": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/inspectionType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "inspection_result": {
                        "$ref": "#/components/schemas/inspectionsResult"
                    }
                },
                "type": "object"
            },
            "inspectionTypeIndex": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "parent_type": {
                        "description": "Inspection Type enum value",
                        "type": "string",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "name": {
                        "type": "string",
                        "example": "Calibration"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    }
                },
                "type": "object"
            },
            "inspectionType": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "parent_type": {
                        "description": "Inspection Type enum value",
                        "type": "string",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "name": {
                        "type": "string",
                        "example": "Calibration"
                    }
                },
                "type": "object"
            },
            "inspectionsAdd": {
                "properties": {
                    "type": {
                        "description": "Use InspectionType enum or UUID of Master Data Inspection Type",
                        "type": "enum|string<uuid>",
                        "default": "calibration",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "report": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "apparatus_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "inspection_result": {
                        "type": "enum|integer<int64>",
                        "enum": [
                            "operational",
                            "operational_after_intervention",
                            "not_operational",
                            "conditionally_operational",
                            "defect",
                            "decommissioned",
                            "undetectable",
                            "scrapped",
                            "recovered",
                            "see_report",
                            "see_pdf"
                        ],
                        "example": "operational"
                    },
                    "checked_at": {
                        "description": "checked datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20 15:06:33"
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "inspectionsEdit": {
                "properties": {
                    "type": {
                        "description": "Use InspectionType enum or UUID of Master Data Inspection Type",
                        "type": "enum|string<uuid>",
                        "default": "calibration",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "report": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "inspection_result": {
                        "type": "enum|integer<int64>",
                        "enum": [
                            "operational",
                            "operational_after_intervention",
                            "not_operational",
                            "conditionally_operational",
                            "defect",
                            "decommissioned",
                            "undetectable",
                            "scrapped",
                            "recovered",
                            "see_report",
                            "see_pdf"
                        ],
                        "example": "operational"
                    },
                    "checked_at": {
                        "description": "checked datetime of the inspection, if not set new calibration date will not be calculated",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "inspectionsResult": {
                "properties": {
                    "id": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "name": {
                        "type": "string",
                        "enum": [
                            "operational",
                            "operational_after_intervention",
                            "not_operational",
                            "conditionally_operational",
                            "defect",
                            "decommissioned",
                            "undetectable",
                            "scrapped",
                            "recovered",
                            "see_report",
                            "see_pdf"
                        ]
                    }
                },
                "type": "object"
            },
            "inspections": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ],
                        "x-enumDescriptions": {
                            "calibration": "Calibration, set next calibration date",
                            "other": "Non Specified Inspection",
                            "repair": "Repair Type",
                            "inspection": "Inspection Type, does not set next calibration date",
                            "decision": "Decision Type, if decision is needed"
                        }
                    },
                    "report": {
                        "type": "string"
                    },
                    "inspection_result_id": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "checked_at": {
                        "description": "checked datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "inspection_type": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/inspectionType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "inspection_result": {
                        "$ref": "#/components/schemas/inspectionsResult"
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "inspectionsView": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatus_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "description": "Author ID (user_id), provided it was not generated via the API.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "other",
                            "calibration",
                            "repair",
                            "inspection",
                            "decision"
                        ]
                    },
                    "report": {
                        "type": "string"
                    },
                    "inspection_result_id": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "checked_at": {
                        "description": "checked datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the inspection",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "inspection_type": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/inspectionType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "inspection_result": {
                        "$ref": "#/components/schemas/inspectionsResult"
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/files"
                        }
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "manufacturersAdd": {
                "title": "Manufacturers Add Schema",
                "properties": {
                    "name": {
                        "description": "Name of the manufacturer",
                        "type": "string",
                        "maxLength": 128,
                        "example": "Rohde & Schwarz"
                    }
                },
                "type": "object"
            },
            "manufacturersIndex": {
                "title": "Manufacturers Index Schema",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "description": "Name of the manufactor",
                        "type": "string",
                        "example": "Rohde & Schwarz"
                    },
                    "is_default": {
                        "description": "Whether this is manufactor from system default set",
                        "type": "boolean"
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    }
                },
                "type": "object"
            },
            "NotFound": {
                "properties": {
                    "message": {
                        "description": "Error Message",
                        "type": "string"
                    },
                    "url": {
                        "description": "Error Url",
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "default": 404
                    }
                },
                "type": "object"
            },
            "Paginator": {
                "properties": {
                    "count": {
                        "description": "Total items",
                        "type": "integer",
                        "format": "int64"
                    },
                    "perPage": {
                        "description": "Items per page",
                        "type": "integer",
                        "format": "int64"
                    },
                    "page": {
                        "description": "Current page",
                        "type": "integer",
                        "format": "int64"
                    },
                    "pageCount": {
                        "description": "Number of Pages",
                        "type": "integer",
                        "format": "int64"
                    },
                    "sort": {
                        "description": "Sorting key",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "direction": {
                        "description": "Sorting direction - either 'asc' or 'desc'",
                        "type": [
                            "string",
                            "null"
                        ],
                        "default": "desc",
                        "enum": [
                            "asc",
                            "desc"
                        ]
                    },
                    "filter": {
                        "description": "Table Filter",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "apparatusesTestplans": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "inspection_plan": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "calibration_procedure": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the testplans",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    }
                },
                "type": "object"
            },
            "testplansAdd": {
                "properties": {
                    "apparatus_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "inspection_plan": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "calibration_procedure": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "testplansEdit": {
                "properties": {
                    "inspection_plan": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "calibration_procedure": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customFields": {
                        "title": "Custom Fields to save",
                        "description": "dynamically declared custom fields, key is the `field_id` <br>\n        fields with `is_enabled: true` and options `required: true` are require presence",
                        "properties": {
                            "3": {
                                "description": "`input`|`textarea`|`datetime`|`date`",
                                "type": "string",
                                "example": "Hello World"
                            },
                            "5": {
                                "description": "`select`<br>use the `id` of the choices",
                                "type": "string",
                                "example": "1"
                            },
                            "7": {
                                "description": "`checkbox`<br> use `boolean` type",
                                "type": "string",
                                "example": "false"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "testplansView": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "apparatus_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "user_id": {
                        "description": "Author ID (user_id), provided it was not generated via the API.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "inspection_plan": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "calibration_procedure": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the testplan",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/files"
                        }
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "testplans": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "inspection_plan": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "calibration_procedure": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "modified": {
                        "description": "Last modified datetime of the testplans",
                        "type": "string",
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "deleted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2022-07-20T15:06:33+00:00"
                    },
                    "custom_fields": {
                        "title": "Custom Fields",
                        "description": "dynamically declared custom fields<br>fields with `is_enabled: false` are also visible",
                        "properties": {
                            "1": {
                                "$ref": "#/components/schemas/customFields"
                            }
                        },
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                },
                "type": "object"
            },
            "unauthorized": {
                "properties": {
                    "message": {
                        "description": "Unauthorized Message",
                        "type": "string"
                    },
                    "url": {
                        "description": "Unauthorized Url",
                        "type": "string"
                    },
                    "code": {
                        "description": "Unauthorized Code",
                        "type": "integer",
                        "default": 401
                    }
                },
                "type": "object"
            },
            "webhookEvent": {
                "properties": {
                    "webhook_version": {
                        "type": "string",
                        "example": "1.0"
                    },
                    "event_id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "7a9651cf-e09d-45c7-bc17-f2115f98a6e2"
                    },
                    "event_type": {
                        "description": "Concrete webhook event type.",
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "example": "apparatus.updated",
                        "x-enumDescriptions": {
                            "apparatus.created": "Triggered when an apparatus is created.",
                            "apparatus.updated": "Triggered when an apparatus is updated.",
                            "inspection.created": "Triggered when an inspection is created.",
                            "inspection.updated": "Triggered when an inspection is updated."
                        }
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-02-18T10:12:45+00:00"
                    },
                    "organization_id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "5a05387f-96b7-42c0-a2fb-cae7bf2ad835"
                    },
                    "company_id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "77277053-7167-444e-83ea-57a2f8742e96"
                    },
                    "data": {
                        "description": "mixed>",
                        "properties": {
                            "resource": {
                                "description": "mixed>",
                                "properties": {
                                    "type": {
                                        "description": "mixed>",
                                        "type": "string",
                                        "enum": [
                                            "apparatus",
                                            "inspection"
                                        ]
                                    },
                                    "id": {
                                        "description": "mixed>",
                                        "type": "string",
                                        "example": "3e62cbca-01aa-4ce4-9313-93be9eaddb44"
                                    },
                                    "api_path": {
                                        "description": "mixed>",
                                        "type": "string",
                                        "example": "/api/v1/apparatuses/3e62cbca-01aa-4ce4-9313-93be9eaddb44"
                                    }
                                },
                                "type": "object"
                            },
                            "action": {
                                "description": "mixed>",
                                "type": "string",
                                "enum": [
                                    "created",
                                    "updated"
                                ]
                            },
                            "changed": {
                                "description": "Optional best-effort delta for update events.",
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "changed_fields": {
                                "description": "Optional changed field names when detailed `changed` deltas are missing or partial.",
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "webhookSubscriptionAdd": {
                "properties": {
                    "target_url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com/webhooks"
                    },
                    "event_type": {
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "example": "apparatus.updated"
                    },
                    "description": {
                        "description": "Optional description for internal usage.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "example": "Primary production endpoint for ERP sync"
                    },
                    "is_active": {
                        "description": "If false, the subscription is created but disabled.",
                        "type": "boolean",
                        "default": true
                    },
                    "secret": {
                        "description": "Optional custom signing secret. If omitted, the API generates one.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "whsec_01HXYZabcdefghijklmnopqrst"
                    }
                },
                "type": "object"
            },
            "webhookSubscriptionCreated": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "0f0c4d34-77a0-4b1a-8a1f-5f6f2f54f2c6"
                    },
                    "target_url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com/webhooks"
                    },
                    "event_type": {
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "example": "apparatus.created"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "example": "Primary production endpoint for ERP sync"
                    },
                    "is_active": {
                        "type": "boolean",
                        "example": true
                    },
                    "signing_secret": {
                        "description": "Signing secret, returned only once on creation.",
                        "type": "string",
                        "example": "whsec_01HXYZabcdefghijklmnopqrst"
                    }
                },
                "type": "object"
            },
            "webhookSubscriptionEdit": {
                "properties": {
                    "description": {
                        "description": "Optional description for internal usage.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "example": "Primary production endpoint for ERP sync"
                    },
                    "is_active": {
                        "description": "Enable or disable the subscription.",
                        "type": "boolean",
                        "example": true
                    },
                    "rotate_secret": {
                        "description": "Rotate signing secret and return the new secret once in the response.",
                        "type": "boolean",
                        "default": false,
                        "example": false
                    }
                },
                "type": "object"
            },
            "webhookSubscription": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "0f0c4d34-77a0-4b1a-8a1f-5f6f2f54f2c6"
                    },
                    "target_url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com/webhooks"
                    },
                    "event_type": {
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "example": "apparatus.updated"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "example": "Primary production endpoint for ERP sync"
                    },
                    "is_active": {
                        "type": "boolean",
                        "example": true
                    },
                    "consecutive_failures": {
                        "type": "integer",
                        "format": "int64",
                        "minimum": 0,
                        "example": 0
                    },
                    "last_success_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-02-18T10:12:45+00:00"
                    },
                    "disabled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": null
                    },
                    "created": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-02-18T10:10:01+00:00"
                    },
                    "modified": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": "2026-02-18T10:12:45+00:00"
                    }
                },
                "type": "object"
            },
            "webhookSubscriptionTestQueued": {
                "properties": {
                    "subscription_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "event_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "event_type": {
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "x-enumDescriptions": {
                            "apparatus.created": "Triggered when an apparatus is created.",
                            "apparatus.updated": "Triggered when an apparatus is updated.",
                            "inspection.created": "Triggered when an inspection is created.",
                            "inspection.updated": "Triggered when an inspection is updated."
                        }
                    },
                    "delivery_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "type": "string",
                        "example": "queued"
                    }
                },
                "type": "object"
            },
            "webhookSubscriptionUpdated": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid",
                        "example": "0f0c4d34-77a0-4b1a-8a1f-5f6f2f54f2c6"
                    },
                    "target_url": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com/webhooks"
                    },
                    "event_type": {
                        "type": "string",
                        "enum": [
                            "apparatus.created",
                            "apparatus.updated",
                            "inspection.created",
                            "inspection.updated"
                        ],
                        "example": "inspection.updated"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "example": "Primary production endpoint for ERP sync"
                    },
                    "is_active": {
                        "type": "boolean",
                        "example": true
                    },
                    "consecutive_failures": {
                        "type": "integer",
                        "format": "int64",
                        "minimum": 0,
                        "example": 0
                    },
                    "disabled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "example": null
                    },
                    "signing_secret": {
                        "description": "Present only when `rotate_secret=true` was sent.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "whsec_01HXYZabcdefghijklmnopqrst"
                    }
                },
                "type": "object"
            }
        },
        "responses": {
            "default_edit_response": {
                "description": "success",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "id": {
                                    "description": "not null if saved",
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "uuid"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "default_validation_error_response": {
                "description": "validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "description": "Error Message",
                                    "type": "string"
                                },
                                "url": {
                                    "description": "Error Url",
                                    "type": "string"
                                },
                                "integer": {
                                    "default": 400
                                },
                                "error": {
                                    "description": "request key > error key > message <br> `null` if no validation error occurred",
                                    "type": [
                                        "object",
                                        "null"
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "Token": {
                "type": "apiKey",
                "name": "Auth",
                "in": "header"
            }
        }
    },
    "security": [
        {
            "Token": []
        }
    ],
    "tags": [
        {
            "name": "ApiToken",
            "description": "Manage API tokens used for authentication.",
            "x-displayName": "ApiToken"
        },
        {
            "name": "Apparatuses",
            "description": "Endpoints for customer apparatus records,\nincluding listing, detail views, and apparatus-specific data.",
            "x-displayName": "Apparatuses"
        },
        {
            "name": "ApparatusBasedatas",
            "description": "Master data for apparatus definitions and technical base information used by apparatus records.",
            "x-displayName": "Apparatuses Basedatas"
        },
        {
            "name": "Manufacturers",
            "description": "Master data for manufacturers referenced by apparatuses and basedata entries.",
            "x-displayName": "Manufacturers"
        },
        {
            "name": "ApparatusBasedataTypes",
            "description": "Master data for apparatus basedata type categories used to classify equipment.",
            "x-displayName": "Basedata Types"
        },
        {
            "name": "Inspections",
            "description": "Endpoints for inspection records linked to apparatuses, including outcomes and inspection context.",
            "x-displayName": "Inspections"
        },
        {
            "name": "Testplans",
            "description": "Endpoints for test plan records linked to apparatuses,\nincluding inspection plans and calibration procedures.",
            "x-displayName": "Testplans"
        },
        {
            "name": "Custom Fields",
            "description": "\nCustom Fields allow for the creation of dynamic fields that can be displayed across various views such as\n`Apparatuses`, `Inspections`, `Testplans`. Each custom field is defined with attributes including an identifier,\ntype, title, and form configuration. The fields can be customized to suit specific requirements, for example,\nby setting the form type (e.g., textarea, select, input), enabling or disabling the field,\n and specifying additional options like whether the field is required or its maximum length.\n This flexibility enables tailored data entry forms for different operational needs.",
            "x-displayName": "Custom Fields"
        },
        {
            "name": "Files",
            "description": "Upload, view, and delete files attached to `Apparatuses`, `Testplans`, `Inspections`\nand `Apparatuses Basedatas`, including file metadata endpoints.",
            "x-displayName": "Files"
        },
        {
            "name": "Webhooks",
            "description": "Outgoing webhook delivery format and headers for subscribed events.\n### Outgoing Webhooks\n\nOutgoing Headers for Webhooks sent by Memida to your configured endpoints include:\n```\nX-Memida-Id: <webhook_delivery_id>\nX-Memida-Event: <event_type>\nX-Memida-Timestamp: <timestamp>\nX-Memida-Signature: v1=<hmac_signature>\n```\n\nVerify the HMAC signature using your webhook secret to ensure the request's authenticity.\nThe signature is generated using the HMAC-SHA256 algorithm with the following format:\n```\nHMAC-SHA256(secret, timestamp + '.' + rawJsonBody)\n```\n\n<details>\n<summary>**Webhook hmac Example** (Python)</summary>\n```python\nimport hmac\nimport hashlib\nimport json\n\ndef verify_memida_signature(\n    secret: str,\n    timestamp: str,\n    raw_json_body: bytes,   # unparsed raw request body\n    signature_header: str,  # e.g. 'v1=abcdef...'\n) -> bool:\n    if not signature_header.startswith('v1='):\n        return False\n    received_sig = signature_header.split('=', 1)[1]\n\n    # HMAC-SHA256(secret, timestamp + '.' + rawJsonBody)\n    signed_payload = timestamp.encode('utf-8') + b'.' + raw_json_body\n    expected_sig = hmac.new(\n        key=secret.encode('utf-8'),\n        msg=signed_payload,\n        digestmod=hashlib.sha256,\n    ).hexdigest()\n\n    return hmac.compare_digest(received_sig, expected_sig)\n\n\n# Example\nsecret = 'whsec_test_123'\ntimestamp = '1700000000'\nraw_body = json.dumps(\n    {'event_id': 'abc', 'event_type': 'apparatus.updated'},\n    separators=(',', ':'),\n).encode('utf-8')\nsignature_header = 'v1=<your_signature_from_x-memida-signature>'\n\nprint('valid' if verify_memida_signature(secret, timestamp, raw_body, signature_header) else 'invalid')\n```\n</details>\n\nYou can use the test endpoint to validate your webhook handling implementation and signature verification logic.\nThe test endpoint will send a sample webhook payload to your configured URL, allowing you to confirm that your\nsystem correctly processes incoming webhooks and verifies signatures as expected.\n\n",
            "x-displayName": "Webhooks"
        }
    ],
    "webhooks": {
        "event": {
            "summary": "Memida event",
            "description": "Symbolic outbound Memida event endpoint for all event types. Use payload field `event_type` (and header `X-Memida-Event`) plus payload fields `organization_id` and `company_id` (UUIDs) to resolve the correct tenant context.",
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "operationId": "memidaEvent",
                "parameters": [
                    {
                        "name": "X-Memida-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "X-Memida-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "description": "Concrete webhook event type.",
                            "type": "string",
                            "enum": [
                                "apparatus.created",
                                "apparatus.updated",
                                "inspection.created",
                                "inspection.updated"
                            ],
                            "example": "apparatus.updated",
                            "x-enumDescriptions": {
                                "apparatus.created": "Triggered when an apparatus is created.",
                                "apparatus.updated": "Triggered when an apparatus is updated.",
                                "inspection.created": "Triggered when an inspection is created.",
                                "inspection.updated": "Triggered when an inspection is updated."
                            }
                        }
                    },
                    {
                        "name": "X-Memida-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "1700000000"
                        }
                    },
                    {
                        "name": "X-Memida-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "v1=0123456789abcdef0123456789abcdef"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/webhookEvent"
                            },
                            "example": {
                                "webhook_version": "1.0",
                                "event_id": "7a9651cf-e09d-45c7-bc17-f2115f98a6e2",
                                "event_type": "apparatus.updated",
                                "occurred_at": "2026-02-18T10:12:45+00:00",
                                "organization_id": "5a05387f-96b7-42c0-a2fb-cae7bf2ad835",
                                "company_id": "77277053-7167-444e-83ea-57a2f8742e96",
                                "data": {
                                    "resource": {
                                        "type": "apparatus",
                                        "id": "3e62cbca-01aa-4ce4-9313-93be9eaddb44",
                                        "api_path": "/api/v1/apparatuses/3e62cbca-01aa-4ce4-9313-93be9eaddb44"
                                    },
                                    "action": "updated",
                                    "changed": {
                                        "serial_number": {
                                            "from": "OLD-SN-001",
                                            "to": "NEW-SN-001"
                                        }
                                    },
                                    "changed_fields": [
                                        "serial_number",
                                        "files"
                                    ]
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Acknowledged"
                    },
                    "202": {
                        "description": "Accepted"
                    },
                    "204": {
                        "description": "No Content"
                    }
                }
            }
        }
    },
    "x-tagGroups": [
        {
            "name": "General",
            "tags": [
                "Apparatuses",
                "Inspections",
                "Testplans"
            ]
        },
        {
            "name": "Settings",
            "tags": [
                "Files",
                "Custom Fields",
                "Webhooks"
            ]
        }
    ]
}