{
    "openapi": "3.0.3",
    "info": {
        "title": "GoSpin API",
        "version": "1.0.0",
        "description": "GoSpin integracijų API. Per jį pasiekiami apsaugos objektų duomenys: objektai ir jų klientai,\napvaikštos, leidimai, incidentai, darbo žurnalai, anketos ir objektų personalas.\n\n### Bazinis adresas\n\n```\nhttps://api.gospin.lt/public/v1\n```\n\n### Autentikacija\n\nKiekvienoje užklausoje:\n\n```\nAuthorization: Bearer <raktas>\n```\n\nRaktus išduoda GoSpin portalas: Nustatymai → Integracijos → API raktai.\n\nRaktas būna tenant lygio arba objekto lygio. Tenant lygio raktas mato visus jūsų objektus,\nobjekto lygio — tik vieną. Objekto lygio raktui kitų objektų įrašai neegzistuoja: net\nnurodžius jų `id` grąžinama `404`, o ne `403`.\n\nKiekvienas raktas turi aprėpčių rinkinį, atskirai skaitymui ir rašymui (`objects:read`,\n`objects:write` ir taip toliau). Kurios aprėpties reikia, nurodyta prie kiekvieno metodo.\n\n### Atsakymo formatas\n\nVisi atsakymai naudoja tą patį apvalkalą. HTTP statusas sutampa su `code` lauku.\n\nVienas įrašas:\n\n```json\n{ \"data\": { \"id\": 12, \"name\": \"Sandėlis A\" }, \"status\": true, \"code\": 200 }\n```\n\nSąrašas, papildomai su puslapiavimo `meta`:\n\n```json\n{\n  \"data\": [ { \"id\": 12, \"name\": \"Sandėlis A\" } ],\n  \"meta\": { \"page\": 1, \"per_page\": 50, \"total\": 187 },\n  \"status\": true,\n  \"code\": 200\n}\n```\n\nKlaidos atveju `status` yra `false`, o `message` lauke grąžinamas klaidų žemėlapis pagal lauką.\nSu konkrečiu lauku nesusijusios klaidos rašomos po `__global` raktu:\n\n```json\n{ \"data\": [], \"message\": { \"name\": \"Privalomas laukas\" }, \"status\": false, \"code\": 422 }\n```\n\nNaudojami statusai:\n\n- `200` — gerai\n- `201` — sukurta\n- `401` — nėra `Authorization` antraštės arba raktas negalioja\n- `403` — raktui trūksta aprėpties; taip pat kai objekto lygio raktas kreipiasi į resursą,\n  prieinamą tik tenant lygio raktui\n- `404` — įrašo nėra arba jis nepasiekiamas šiam raktui\n- `409` — pažeistas unikalumas\n- `422` — validacijos klaida\n\n### Sąrašai\n\nFiltruojama query parametrais. Galimi filtrai išvardyti prie kiekvieno sąrašo metodo,\nnedeklaruoti parametrai ignoruojami.\n\nPuslapiuojama `?page=` (nuo 1) ir `?per_page=` (numatyta 50, daugiausia 200). Bendras įrašų\nkiekis grąžinamas `meta.total`, puslapių skaičius — `ceil(meta.total / meta.per_page)`.\n\n```\nGET /checks?object_id=12&status=completed&page=2&per_page=100\n```\n\nRikiavimas kiekvienam resursui fiksuotas (paprastai naujausi viršuje) ir nekonfigūruojamas.\n\n### Inkrementinė sinchronizacija\n\nKiekvienas sąrašas turi `?updated_since=` filtrą: grąžinami tik po nurodyto laiko pakeisti\nįrašai. Išsaugokite paskutinės sėkmingos sinchronizacijos laiką ir perduokite jį kitą kartą.\n\n```\nGET /tickets?updated_since=2026-08-01T00:00:00Z\n```\n\nLaikai perduodami ir grąžinami ISO 8601 formatu (`2026-08-01T14:30:00Z`).\n\nIštrinti įrašai iš sąrašų tiesiog dingsta, todėl per `updated_since` jų nepamatysite. Jei\nreikia sekti ir pašalinimus, periodiškai perskaitykite visą sąrašą.\n\n### `external_id`\n\nKuriami resursai turi `external_id` lauką jūsų sistemos identifikatoriui. Įrašykite jį kurdami\nir pagal jį ieškokite:\n\n```\nGET /tickets?external_id=CRM-4417\n```\n\nPrieš kurdami patikrinkite, ar toks `external_id` jau yra. Taip pakartotinis bandymas po\nnutrūkusio ryšio nesukurs dublikato.\n\n### Objektai ir klientai\n\nKlientas (užsakovas) — `accounts`, objektas — `objects`; objektą su klientu sieja\n`objects.account_id`. Abu resursai pasiekiami tik tenant lygio raktu (objekto raktas klientų\nnemato, o objektų mato tik savąjį). Tipinė seka:\n\n```\nPOST /accounts   { \"name\": \"UAB Pavyzdys\", \"code\": \"300000001\", \"country\": \"LT\",\n                   \"email\": \"info@pavyzdys.lt\", \"phone\": \"+37060000000\" }\n                 → 201 { \"data\": { \"id\": 56, ... } }\n\nPOST /objects    { \"name\": \"Sandėlis A\", \"account_id\": 56,\n                   \"address\": { \"address\": \"Pramonės g. 1, Vilnius\" } }\n\nGET  /objects?account_id=56          — kliento objektai\nPATCH /objects/99 { \"account_id\": null }  — atsieti\n```\n\n`account_id`, rodantis į neegzistuojantį ar kito tenant'o klientą, grąžina `422`. Kliento\n`email` ir `phone` — vienas adresas / numeris eilute. `responsible_person` (atsakingas GoSpin\nnaudotojas) neprivalomas: nenurodžius priskiriamas tenant'o administratorius.\n\n### Atnaujinimas\n\n`PATCH` perduodami tik keičiami laukai, neperduoti lieka nepakeisti. Laukui išvalyti perduokite\n`null`: praleistas laukas ir `null` nėra tas pats.\n\nTik skaitymo laukų (`id`, `created_at`, `updated_at` ir panašių) siųsti nereikia — jų rašymo\nschemoje nėra ir atsiuntus grąžinama `422`. Tą patį grąžina ir nežinomas laukas.",
        "contact": {
            "name": "GoSpin API Support",
            "email": "info@gospin.lt",
            "url": "https://www.gospin.lt/kontaktai/"
        },
        "termsOfService": "https://app.gospin.lt/legal/terms"
    },
    "servers": [
        {
            "url": "https://api.gospin.lt/public/v1",
            "description": "Produkcija"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Me",
            "x-displayName": "Raktas",
            "description": "Informacija apie naudojamą API raktą."
        },
        {
            "name": "Objects",
            "x-displayName": "Objektai",
            "description": "Saugomi objektai (teritorijos, pastatai). Objekto lygio raktas mato tik savo objektą."
        },
        {
            "name": "Accounts",
            "x-displayName": "Klientai",
            "description": "Klientai (užsakovai). Tik tenant lygio raktams — objekto raktas jų nemato."
        },
        {
            "name": "Checks",
            "x-displayName": "Apvaikštos",
            "description": "Įvykdytos ir suplanuotos apvaikštos: laikai, trukmė, būsena ir kokybės balas."
        },
        {
            "name": "CheckPoints",
            "x-displayName": "Apvaikštų taškai",
            "description": "Apvaikštos taškai: nuskaitymo laikas, koordinatės ir klausimų atsakymai."
        },
        {
            "name": "CheckSettings",
            "x-displayName": "Apvaikštų grafikai",
            "description": "Apvaikštų grafikai: dienos, valandos ir planuota trukmė."
        },
        {
            "name": "VpassInvites",
            "x-displayName": "Lankytojų leidimai",
            "description": "Lankytojų ir rangovų leidimai: kvietimas, galiojimas, būsena."
        },
        {
            "name": "Tickets",
            "x-displayName": "Incidentai",
            "description": "Incidentai objektuose: registravimas, būsena, prioritetas ir sprendimas."
        },
        {
            "name": "ObjectUsers",
            "x-displayName": "Objekto darbuotojai",
            "description": "Darbuotojų (apsaugininkų, operatorių, administratorių) priskyrimai objektams."
        },
        {
            "name": "Surveys",
            "x-displayName": "Anketos",
            "description": "Apklausos (anketos) su klausimais. Naudojamos apvaikštose, leidimuose ir kioske."
        },
        {
            "name": "SurveyResponses",
            "x-displayName": "Anketų atsakymai",
            "description": "Apklausų užpildymai: kas, kada, kokie atsakymai ir surinkti balai."
        },
        {
            "name": "LogTypes",
            "x-displayName": "Žurnalų tipai",
            "description": "Žurnalų tipai (šablonai) su jų laukų schema. Reikšmės — `log-entries`."
        },
        {
            "name": "LogEntries",
            "x-displayName": "Žurnalų įrašai",
            "description": "Žurnalų įrašai. Laukų raktus žr. `log-types` resurse."
        }
    ],
    "paths": {
        "/me": {
            "get": {
                "tags": [
                    "Me"
                ],
                "summary": "Apie raktą",
                "description": "Rakto pavadinimas, lygis (`tenant` / `object`), objektas (objekto raktui), efektyvios aprėptys ir galiojimas.\nTinka rakto patikrai: `401` — raktas netinkamas. Aprėpties nereikia.",
                "responses": {
                    "200": {
                        "description": "Rakto informacija",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string",
                                                    "example": "ERP integracija"
                                                },
                                                "token_hint": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "example": "…a1b2"
                                                },
                                                "level": {
                                                    "type": "string",
                                                    "enum": [
                                                        "tenant",
                                                        "object"
                                                    ]
                                                },
                                                "object": {
                                                    "type": "object",
                                                    "nullable": true,
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    }
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "objects:read",
                                                        "objects:write"
                                                    ]
                                                },
                                                "valid_to": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "nullable": true
                                                }
                                            }
                                        },
                                        "status": {
                                            "type": "boolean"
                                        },
                                        "code": {
                                            "type": "integer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Netinkamas raktas"
                    }
                }
            }
        },
        "/objects": {
            "get": {
                "tags": [
                    "Objects"
                ],
                "summary": "Sąrašas: /objects",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `objects:read`",
                "x-scope": "objects:read",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "archived"
                            ]
                        },
                        "description": "Filtruoti pagal būseną"
                    },
                    {
                        "name": "code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus objekto kodas"
                    },
                    {
                        "name": "account_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Tik šio kliento objektai"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Paieška pavadinime, kode, adrese"
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus kliento sistemos identifikatorius"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Objects"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "Objects"
                ],
                "summary": "Sukurti: /objects",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `objects:write`",
                "x-scope": "objects:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ObjectsWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Objects"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/objects/{id}": {
            "get": {
                "tags": [
                    "Objects"
                ],
                "summary": "Vienas įrašas: /objects/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `objects:read`",
                "x-scope": "objects:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Objects"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "patch": {
                "tags": [
                    "Objects"
                ],
                "summary": "Atnaujinti: /objects/{id}",
                "description": "Perduodami tik keičiami laukai, neperduoti lieka nepakeisti.\n\nLaukui išvalyti perduokite `null`: praleistas laukas ir `null` nėra tas pats.\n\nAprėptis: `objects:write`",
                "x-scope": "objects:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ObjectsUpdate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Atnaujinta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Objects"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Objects"
                ],
                "summary": "Ištrinti: /objects/{id}",
                "description": "Ištrina įrašą. Po to jis dingsta iš sąrašų, o kreipimasis pagal `id` grąžina `404`.\n\nAprėptis: `objects:write`",
                "x-scope": "objects:write",
                "responses": {
                    "200": {
                        "description": "Ištrinta"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/accounts": {
            "get": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Sąrašas: /accounts",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `accounts:read`",
                "x-scope": "accounts:read",
                "parameters": [
                    {
                        "name": "code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus įmonės kodas"
                    },
                    {
                        "name": "vat_code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus PVM kodas"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Šalies kodas"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Paieška pavadinime, kode, PVM kode"
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus kliento sistemos identifikatorius"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Accounts"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Sukurti: /accounts",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `accounts:write`",
                "x-scope": "accounts:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AccountsWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Accounts"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/accounts/{id}": {
            "get": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Vienas įrašas: /accounts/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `accounts:read`",
                "x-scope": "accounts:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Accounts"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "patch": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Atnaujinti: /accounts/{id}",
                "description": "Perduodami tik keičiami laukai, neperduoti lieka nepakeisti.\n\nLaukui išvalyti perduokite `null`: praleistas laukas ir `null` nėra tas pats.\n\nAprėptis: `accounts:write`",
                "x-scope": "accounts:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AccountsUpdate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Atnaujinta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Accounts"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Accounts"
                ],
                "summary": "Ištrinti: /accounts/{id}",
                "description": "Ištrina įrašą. Po to jis dingsta iš sąrašų, o kreipimasis pagal `id` grąžina `404`.\n\nAprėptis: `accounts:write`",
                "x-scope": "accounts:write",
                "responses": {
                    "200": {
                        "description": "Ištrinta"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/checks": {
            "get": {
                "tags": [
                    "Checks"
                ],
                "summary": "Sąrašas: /checks",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `checks:read`",
                "x-scope": "checks:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "check_setting_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal grafiką"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "planned",
                                "started",
                                "completed",
                                "not_all_points",
                                "missed",
                                "fail"
                            ]
                        },
                        "description": "Būsena: `planned` — suplanuota, `started` — pradėta, `completed` — atlikta, `not_all_points` — aplankyti ne visi taškai, `missed` — praleista, `fail` — nepavyko"
                    },
                    {
                        "name": "run_type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "planned",
                                "ad_hoc"
                            ]
                        },
                        "description": "Suplanuota pagal grafiką (`planned`) ar neeilinė (`ad_hoc`)"
                    },
                    {
                        "name": "shift",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "night"
                            ]
                        },
                        "description": "Pamaina: `day` — dieninė, `night` — naktinė"
                    },
                    {
                        "name": "started_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Prasidėjusios nuo šio laiko"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Checks"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/checks/{id}": {
            "get": {
                "tags": [
                    "Checks"
                ],
                "summary": "Vienas įrašas: /checks/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `checks:read`",
                "x-scope": "checks:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Checks"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/check-points": {
            "get": {
                "tags": [
                    "CheckPoints"
                ],
                "summary": "Sąrašas: /check-points",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `check-points:read`",
                "x-scope": "check-points:read",
                "parameters": [
                    {
                        "name": "check_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Vienos apvaikštos taškai"
                    },
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "waiting",
                                "completed",
                                "skip"
                            ]
                        },
                        "description": "Taško būsena: `waiting` — dar neaplankytas, `completed` — aplankytas, `skip` — praleistas"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/CheckPoints"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/check-points/{id}": {
            "get": {
                "tags": [
                    "CheckPoints"
                ],
                "summary": "Vienas įrašas: /check-points/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `check-points:read`",
                "x-scope": "check-points:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/CheckPoints"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/check-settings": {
            "get": {
                "tags": [
                    "CheckSettings"
                ],
                "summary": "Sąrašas: /check-settings",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `check-settings:read`",
                "x-scope": "check-settings:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/CheckSettings"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/check-settings/{id}": {
            "get": {
                "tags": [
                    "CheckSettings"
                ],
                "summary": "Vienas įrašas: /check-settings/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `check-settings:read`",
                "x-scope": "check-settings:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/CheckSettings"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/vpass-invites": {
            "get": {
                "tags": [
                    "VpassInvites"
                ],
                "summary": "Sąrašas: /vpass-invites",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `vpass-invites:read`",
                "x-scope": "vpass-invites:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "vpass_category_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal leidimo kategoriją"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "not_started",
                                "active",
                                "used",
                                "expired"
                            ]
                        },
                        "description": "Būsena: `not_started` — galiojimas dar neprasidėjęs, `active` — galiojantis, `used` — panaudotas, `expired` — pasibaigęs"
                    },
                    {
                        "name": "valid_from_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Galiojantys nuo šio laiko"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Paieška pagal lankytojo vardą, įmonę arba automobilio valstybinį numerį"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/VpassInvites"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "VpassInvites"
                ],
                "summary": "Sukurti: /vpass-invites",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `vpass-invites:write`",
                "x-scope": "vpass-invites:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/VpassInvitesWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/VpassInvites"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/vpass-invites/{id}": {
            "get": {
                "tags": [
                    "VpassInvites"
                ],
                "summary": "Vienas įrašas: /vpass-invites/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `vpass-invites:read`",
                "x-scope": "vpass-invites:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/VpassInvites"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/tickets": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Sąrašas: /tickets",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `tickets:read`",
                "x-scope": "tickets:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "open",
                                "closed"
                            ]
                        },
                        "description": "Būsena: `open` — atviras, `closed` — uždarytas"
                    },
                    {
                        "name": "priority",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "low",
                                "medium",
                                "high"
                            ]
                        },
                        "description": "Prioritetas: `low` — žemas, `medium` — vidutinis, `high` — aukštas"
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tikslus objekto incidentų kategorijos kodas"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Paieška pagal pavadinimą, aprašymą ir priežastį"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Tickets"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Sukurti: /tickets",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `tickets:write`",
                "x-scope": "tickets:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketsWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Tickets"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/tickets/{id}": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Vienas įrašas: /tickets/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `tickets:read`",
                "x-scope": "tickets:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Tickets"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "patch": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Atnaujinti: /tickets/{id}",
                "description": "Perduodami tik keičiami laukai, neperduoti lieka nepakeisti.\n\nLaukui išvalyti perduokite `null`: praleistas laukas ir `null` nėra tas pats.\n\nAprėptis: `tickets:write`",
                "x-scope": "tickets:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketsUpdate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Atnaujinta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Tickets"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/object-users": {
            "get": {
                "tags": [
                    "ObjectUsers"
                ],
                "summary": "Sąrašas: /object-users",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `object-users:read`",
                "x-scope": "object-users:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal naudotoją"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "guard",
                                "operator",
                                "administrator",
                                "validator",
                                "auditor"
                            ]
                        },
                        "description": "Vaidmuo objekte: `guard` — apsaugininkas, `operator` — operatorius, `administrator` — administratorius, `validator` — tvirtintojas, `auditor` — auditorius"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/ObjectUsers"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/object-users/{id}": {
            "get": {
                "tags": [
                    "ObjectUsers"
                ],
                "summary": "Vienas įrašas: /object-users/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `object-users:read`",
                "x-scope": "object-users:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/ObjectUsers"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/surveys": {
            "get": {
                "tags": [
                    "Surveys"
                ],
                "summary": "Sąrašas: /surveys",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `surveys:read`",
                "x-scope": "surveys:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive"
                            ]
                        },
                        "description": "Būsena: `active` — aktyvi, `inactive` — neaktyvi"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Paieška pagal anketos pavadinimą ir aprašymą"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Surveys"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/surveys/{id}": {
            "get": {
                "tags": [
                    "Surveys"
                ],
                "summary": "Vienas įrašas: /surveys/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `surveys:read`",
                "x-scope": "surveys:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/Surveys"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/survey-responses": {
            "get": {
                "tags": [
                    "SurveyResponses"
                ],
                "summary": "Sąrašas: /survey-responses",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `survey-responses:read`",
                "x-scope": "survey-responses:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "survey_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal anketą"
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal anketą pildžiusį naudotoją"
                    },
                    {
                        "name": "completed_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Užpildyti nuo šio laiko"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/SurveyResponses"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "SurveyResponses"
                ],
                "summary": "Sukurti: /survey-responses",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `survey-responses:write`",
                "x-scope": "survey-responses:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SurveyResponsesWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/SurveyResponses"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/survey-responses/{id}": {
            "get": {
                "tags": [
                    "SurveyResponses"
                ],
                "summary": "Vienas įrašas: /survey-responses/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `survey-responses:read`",
                "x-scope": "survey-responses:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/SurveyResponses"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/log-types": {
            "get": {
                "tags": [
                    "LogTypes"
                ],
                "summary": "Sąrašas: /log-types",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `log-types:read`",
                "x-scope": "log-types:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/LogTypes"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            }
        },
        "/log-types/{id}": {
            "get": {
                "tags": [
                    "LogTypes"
                ],
                "summary": "Vienas įrašas: /log-types/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `log-types:read`",
                "x-scope": "log-types:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/LogTypes"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        },
        "/log-entries": {
            "get": {
                "tags": [
                    "LogEntries"
                ],
                "summary": "Sąrašas: /log-entries",
                "description": "Puslapiuojama `?page=` ir `?per_page=` (numatyta 50, daugiausia 200), bendras kiekis — `meta.total`.\nInkrementinei sinchronizacijai naudokite `?updated_since=`.\n\nAprėptis: `log-entries:read`",
                "x-scope": "log-entries:read",
                "parameters": [
                    {
                        "name": "object_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Filtruoti pagal objektą"
                    },
                    {
                        "name": "log_type_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Vieno žurnalo įrašai"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Tiksli įrašo būsena (reikšmės priklauso nuo žurnalo tipo)"
                    },
                    {
                        "name": "created_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Įrašyti nuo šio laiko"
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "description": "Tik po šio laiko keisti įrašai (inkrementinei sinchronizacijai)"
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sąrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ListEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/LogEntries"
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    }
                }
            },
            "post": {
                "tags": [
                    "LogEntries"
                ],
                "summary": "Sukurti: /log-entries",
                "description": "Sukuria naują įrašą. Tik skaitymo laukų (`id`, `created_at`, `updated_at`) siųsti nereikia, jų užklausos schemoje nėra ir atsiuntus grąžinama `422`.\n\nKad pakartotinis bandymas po nutrūkusio ryšio nesukurtų dublikato, įrašykite savo `external_id` ir prieš kurdami patikrinkite `GET` su `?external_id=`.\n\nAprėptis: `log-entries:write`",
                "x-scope": "log-entries:write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LogEntriesWrite"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Sukurta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/LogEntries"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    }
                }
            }
        },
        "/log-entries/{id}": {
            "get": {
                "tags": [
                    "LogEntries"
                ],
                "summary": "Vienas įrašas: /log-entries/{id}",
                "description": "Grąžina vieną įrašą pagal `id`.\n\nObjekto lygio raktui kito objekto įrašas neegzistuoja: grąžinama `404`, o ne `403`.\n\nAprėptis: `log-entries:read`",
                "x-scope": "log-entries:read",
                "responses": {
                    "200": {
                        "description": "Įrašas",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/Envelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/LogEntries"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            },
            "parameters": [
                {
                    "$ref": "#/components/parameters/id"
                }
            ]
        }
    },
    "components": {
        "schemas": {
            "Envelope": {
                "type": "object",
                "description": "Bendras vieno įrašo atsakymo apvalkalas.",
                "properties": {
                    "data": {
                        "type": "object",
                        "description": "Pats įrašas"
                    },
                    "message": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Informaciniai pranešimai, jei tokių yra"
                    },
                    "status": {
                        "type": "boolean",
                        "description": "Ar užklausa pavyko",
                        "example": true
                    },
                    "code": {
                        "type": "integer",
                        "description": "HTTP statusas, sutampa su atsakymo statusu",
                        "example": 200
                    }
                }
            },
            "ListEnvelope": {
                "type": "object",
                "description": "Sąrašo apvalkalas su puslapiavimo metaduomenimis.",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        },
                        "description": "Šio puslapio įrašai"
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMeta"
                    },
                    "status": {
                        "type": "boolean",
                        "description": "Ar užklausa pavyko",
                        "example": true
                    },
                    "code": {
                        "type": "integer",
                        "description": "HTTP statusas, sutampa su atsakymo statusu",
                        "example": 200
                    }
                }
            },
            "PaginationMeta": {
                "type": "object",
                "description": "Puslapiavimas. Puslapių skaičius — `ceil(total / per_page)`.",
                "properties": {
                    "page": {
                        "type": "integer",
                        "description": "Dabartinis puslapis (nuo 1)",
                        "example": 1
                    },
                    "per_page": {
                        "type": "integer",
                        "description": "Įrašų puslapyje",
                        "example": 50
                    },
                    "total": {
                        "type": "integer",
                        "description": "Bendras įrašų kiekis pagal filtrus, ne šiame puslapyje",
                        "example": 187
                    }
                }
            },
            "Error": {
                "type": "object",
                "description": "Klaidos atsakymas: tas pats apvalkalas, tik `status: false`.",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Klaidos atveju tuščias"
                    },
                    "message": {
                        "type": "object",
                        "description": "Klaidų žemėlapis: laukas => klaida. Bendros klaidos — po `__global` raktu.",
                        "additionalProperties": true
                    },
                    "status": {
                        "type": "boolean",
                        "description": "Klaidos atveju visada `false`",
                        "example": false
                    },
                    "code": {
                        "type": "integer",
                        "description": "HTTP statusas, sutampa su atsakymo statusu",
                        "example": 422
                    }
                }
            },
            "Objects": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Įrašo ID"
                    },
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto kodas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "archived"
                        ],
                        "description": "Būsena",
                        "default": "active"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas (LT, LV, ...)"
                            }
                        },
                        "description": "Objekto adresas"
                    },
                    "account_id": {
                        "type": "integer",
                        "description": "Klientas (užsakovas) — `accounts` resurso ID; null — be kliento"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "El. paštas"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    },
                    "company_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Įmonės pavadinimas"
                    },
                    "company_code": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Įmonės kodas"
                    },
                    "company_responsible_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Atsakingas asmuo"
                    },
                    "company_responsible_phone": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Atsakingo telefonas"
                    },
                    "company_responsible_email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "Atsakingo el. paštas"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio keitimo laikas"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "ObjectsWrite": {
                "type": "object",
                "properties": {
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto kodas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "archived"
                        ],
                        "description": "Būsena",
                        "default": "active"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas (LT, LV, ...)"
                            }
                        },
                        "description": "Objekto adresas"
                    },
                    "account_id": {
                        "type": "integer",
                        "description": "Klientas (užsakovas) — `accounts` resurso ID; null — be kliento"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "El. paštas"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    },
                    "company_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Įmonės pavadinimas"
                    },
                    "company_code": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Įmonės kodas"
                    },
                    "company_responsible_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Atsakingas asmuo"
                    },
                    "company_responsible_phone": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Atsakingo telefonas"
                    },
                    "company_responsible_email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "Atsakingo el. paštas"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "ObjectsUpdate": {
                "type": "object",
                "properties": {
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 512,
                        "description": "Objekto kodas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "archived"
                        ],
                        "description": "Būsena",
                        "default": "active"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas (LT, LV, ...)"
                            }
                        },
                        "description": "Objekto adresas"
                    },
                    "account_id": {
                        "type": "integer",
                        "description": "Klientas (užsakovas) — `accounts` resurso ID; null — be kliento"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "El. paštas"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    },
                    "company_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Įmonės pavadinimas"
                    },
                    "company_code": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Įmonės kodas"
                    },
                    "company_responsible_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Atsakingas asmuo"
                    },
                    "company_responsible_phone": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Atsakingo telefonas"
                    },
                    "company_responsible_email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255,
                        "description": "Atsakingo el. paštas"
                    }
                }
            },
            "Accounts": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Įmonės kodas"
                    },
                    "vat_code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "PVM kodas"
                    },
                    "country": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Šalies kodas (LT, LV, ...)"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas (vienas adresas)"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas (vienas numeris)"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas"
                            }
                        },
                        "description": "Adresas"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "director": {
                        "type": "string",
                        "description": "Vadovas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo naudotojo ID; nenurodžius kuriant — tenant'o administratorius"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "AccountsWrite": {
                "type": "object",
                "properties": {
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Įmonės kodas"
                    },
                    "vat_code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "PVM kodas"
                    },
                    "country": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Šalies kodas (LT, LV, ...)"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas (vienas adresas)"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas (vienas numeris)"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas"
                            }
                        },
                        "description": "Adresas"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "director": {
                        "type": "string",
                        "description": "Vadovas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo naudotojo ID; nenurodžius kuriant — tenant'o administratorius"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "AccountsUpdate": {
                "type": "object",
                "properties": {
                    "external_id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Kliento sistemos identifikatorius"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Įmonės kodas"
                    },
                    "vat_code": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "PVM kodas"
                    },
                    "country": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Šalies kodas (LT, LV, ...)"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas (vienas adresas)"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas (vienas numeris)"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "address": {
                                "type": "string",
                                "description": "Pilnas adresas viena eilute"
                            },
                            "street": {
                                "type": "string",
                                "description": "Gatvė ir numeris"
                            },
                            "city": {
                                "type": "string",
                                "description": "Miestas"
                            },
                            "district": {
                                "type": "string",
                                "description": "Apskritis / rajonas"
                            },
                            "postal_code": {
                                "type": "string",
                                "description": "Pašto kodas"
                            },
                            "country": {
                                "type": "string",
                                "description": "Šalies kodas"
                            }
                        },
                        "description": "Adresas"
                    },
                    "description": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "director": {
                        "type": "string",
                        "description": "Vadovas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo naudotojo ID; nenurodžius kuriant — tenant'o administratorius"
                    }
                }
            },
            "Checks": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "check_setting_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Grafikas, pagal kurį apvaikšta suplanuota"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "planned",
                            "started",
                            "completed",
                            "not_all_points",
                            "missed",
                            "fail"
                        ],
                        "readOnly": true,
                        "description": "Būsena"
                    },
                    "run_type": {
                        "type": "string",
                        "enum": [
                            "planned",
                            "ad_hoc"
                        ],
                        "readOnly": true,
                        "description": "Suplanuota ar neeilinė"
                    },
                    "shift": {
                        "type": "string",
                        "enum": [
                            "day",
                            "night"
                        ],
                        "readOnly": true,
                        "description": "Pamaina"
                    },
                    "planned_start_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Planuota pradžia"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Faktinė pradžia"
                    },
                    "complete_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Pabaiga"
                    },
                    "duration_sec": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Faktinė trukmė, sekundėmis"
                    },
                    "planned_duration_sec": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Planuota trukmė, sekundėmis"
                    },
                    "quality_score": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Kokybės balas (0–100)"
                    },
                    "close_reason": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Uždarymo priežastis, jei nutraukta"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "CheckPoints": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "check_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Kuriai apvaikštai priklauso"
                    },
                    "name": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Taško pavadinimas"
                    },
                    "code": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Taško kodas (QR / NFC)"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "qr",
                            "nfc"
                        ],
                        "readOnly": true,
                        "description": "Žymos tipas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "waiting",
                            "completed",
                            "skip"
                        ],
                        "readOnly": true,
                        "description": "Būsena"
                    },
                    "complete_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Kada nuskaitytas"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Taško platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Taško ilguma"
                    },
                    "scan_lat": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Nuskaitymo platuma"
                    },
                    "scan_lng": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Nuskaitymo ilguma"
                    },
                    "scan_accuracy_m": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Nuskaitymo tikslumas, metrais"
                    },
                    "answers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "question": {
                                    "type": "string",
                                    "description": "Klausimo tekstas"
                                },
                                "answer": {
                                    "type": "string",
                                    "enum": [
                                        "yes",
                                        "no"
                                    ],
                                    "description": "Atsakymas"
                                },
                                "comment": {
                                    "type": "string",
                                    "description": "Apsaugininko komentaras"
                                },
                                "is_flagged": {
                                    "type": "boolean",
                                    "description": "Ar atsakymas pažymėtas kaip problema"
                                },
                                "ticket_id": {
                                    "type": "integer",
                                    "description": "Incidentas, jei buvo sukurtas"
                                }
                            }
                        },
                        "readOnly": true,
                        "description": "Taško klausimų atsakymai"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "CheckSettings": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "name": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Grafiko pavadinimas"
                    },
                    "planned_duration_sec": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Planuota trukmė, sekundėmis"
                    },
                    "checkpoints_must_be_in_order": {
                        "type": "boolean",
                        "readOnly": true,
                        "description": "Ar taškai turi būti apeinami iš eilės"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "VpassInvites": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas, į kurį kviečiama"
                    },
                    "vpass_category_id": {
                        "type": "integer",
                        "description": "Leidimo kategorija (nustato tipą ir SDID reikalavimą)"
                    },
                    "person_name": {
                        "type": "string",
                        "description": "Lankytojo vardas ir pavardė"
                    },
                    "person_email": {
                        "type": "string",
                        "format": "email",
                        "description": "Lankytojo el. paštas"
                    },
                    "person_phone": {
                        "type": "string",
                        "description": "Lankytojo telefonas"
                    },
                    "company_name": {
                        "type": "string",
                        "description": "Lankytojo įmonė"
                    },
                    "car_license_plate": {
                        "type": "string",
                        "description": "Automobilio valstybinis numeris"
                    },
                    "trailer_license_plate": {
                        "type": "string",
                        "description": "Priekabos valstybinis numeris"
                    },
                    "allow_object_zone_id": {
                        "type": "integer",
                        "description": "Zona, kurioje leidžiama lankytis"
                    },
                    "description": {
                        "type": "string",
                        "description": "Vizito tikslas / pastabos"
                    },
                    "valid_from": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Galioja nuo"
                    },
                    "valid_to": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Galioja iki"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "single",
                            "recurring"
                        ],
                        "description": "Vienkartinis ar pasikartojantis"
                    },
                    "inform_person_by": {
                        "type": "string",
                        "description": "Kanalai kvietimui: email, sms arba \"email,sms\""
                    },
                    "vpass_type": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Tipas iš kategorijos (visitor / contractor / employee)"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "not_started",
                            "active",
                            "used",
                            "expired"
                        ],
                        "readOnly": true,
                        "description": "Būsena — skaičiuojama pagal galiojimo langą"
                    },
                    "sdid_mode": {
                        "type": "string",
                        "readOnly": true,
                        "description": "SDID reikalavimas iš kategorijos"
                    },
                    "sdid_status": {
                        "type": "string",
                        "readOnly": true,
                        "description": "SDID patikros būsena"
                    },
                    "visitor_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Tvarus lankytojo įrašas"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                },
                "required": [
                    "object_id",
                    "vpass_category_id",
                    "person_name",
                    "valid_from",
                    "valid_to"
                ]
            },
            "VpassInvitesWrite": {
                "type": "object",
                "properties": {
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas, į kurį kviečiama"
                    },
                    "vpass_category_id": {
                        "type": "integer",
                        "description": "Leidimo kategorija (nustato tipą ir SDID reikalavimą)"
                    },
                    "person_name": {
                        "type": "string",
                        "description": "Lankytojo vardas ir pavardė"
                    },
                    "person_email": {
                        "type": "string",
                        "format": "email",
                        "description": "Lankytojo el. paštas"
                    },
                    "person_phone": {
                        "type": "string",
                        "description": "Lankytojo telefonas"
                    },
                    "company_name": {
                        "type": "string",
                        "description": "Lankytojo įmonė"
                    },
                    "car_license_plate": {
                        "type": "string",
                        "description": "Automobilio valstybinis numeris"
                    },
                    "trailer_license_plate": {
                        "type": "string",
                        "description": "Priekabos valstybinis numeris"
                    },
                    "allow_object_zone_id": {
                        "type": "integer",
                        "description": "Zona, kurioje leidžiama lankytis"
                    },
                    "description": {
                        "type": "string",
                        "description": "Vizito tikslas / pastabos"
                    },
                    "valid_from": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Galioja nuo"
                    },
                    "valid_to": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Galioja iki"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "single",
                            "recurring"
                        ],
                        "description": "Vienkartinis ar pasikartojantis"
                    },
                    "inform_person_by": {
                        "type": "string",
                        "description": "Kanalai kvietimui: email, sms arba \"email,sms\""
                    }
                },
                "required": [
                    "object_id",
                    "vpass_category_id",
                    "person_name",
                    "valid_from",
                    "valid_to"
                ]
            },
            "Tickets": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas, kuriame įvyko"
                    },
                    "name": {
                        "type": "string",
                        "description": "Pavadinimas"
                    },
                    "category": {
                        "type": "string",
                        "description": "Kategorija (objekto incidentų kategorijos kodas)"
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "medium",
                            "high"
                        ],
                        "description": "Prioritetas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "closed"
                        ],
                        "description": "Būsena"
                    },
                    "comment": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "reason": {
                        "type": "string",
                        "description": "Priežastis"
                    },
                    "decision": {
                        "type": "string",
                        "description": "Sprendimas"
                    },
                    "contact": {
                        "type": "string",
                        "description": "Kontaktinis asmuo"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas"
                    },
                    "receive_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Kada gautas pranešimas"
                    },
                    "closed_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Kada uždarytas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo vartotojo ID"
                    },
                    "check_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Apvaikšta, kurios metu užfiksuotas"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "TicketsWrite": {
                "type": "object",
                "properties": {
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas, kuriame įvyko"
                    },
                    "name": {
                        "type": "string",
                        "description": "Pavadinimas"
                    },
                    "category": {
                        "type": "string",
                        "description": "Kategorija (objekto incidentų kategorijos kodas)"
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "medium",
                            "high"
                        ],
                        "description": "Prioritetas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "closed"
                        ],
                        "description": "Būsena"
                    },
                    "comment": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "reason": {
                        "type": "string",
                        "description": "Priežastis"
                    },
                    "decision": {
                        "type": "string",
                        "description": "Sprendimas"
                    },
                    "contact": {
                        "type": "string",
                        "description": "Kontaktinis asmuo"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas"
                    },
                    "receive_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Kada gautas pranešimas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo vartotojo ID"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    }
                },
                "required": [
                    "name"
                ]
            },
            "TicketsUpdate": {
                "type": "object",
                "properties": {
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas, kuriame įvyko"
                    },
                    "name": {
                        "type": "string",
                        "description": "Pavadinimas"
                    },
                    "category": {
                        "type": "string",
                        "description": "Kategorija (objekto incidentų kategorijos kodas)"
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "medium",
                            "high"
                        ],
                        "description": "Prioritetas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "closed"
                        ],
                        "description": "Būsena"
                    },
                    "comment": {
                        "type": "string",
                        "description": "Aprašymas"
                    },
                    "reason": {
                        "type": "string",
                        "description": "Priežastis"
                    },
                    "decision": {
                        "type": "string",
                        "description": "Sprendimas"
                    },
                    "contact": {
                        "type": "string",
                        "description": "Kontaktinis asmuo"
                    },
                    "phone": {
                        "type": "string",
                        "description": "Telefonas"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "El. paštas"
                    },
                    "receive_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Kada gautas pranešimas"
                    },
                    "responsible_person": {
                        "type": "integer",
                        "description": "Atsakingo vartotojo ID"
                    },
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "minimum": -90,
                        "maximum": 90,
                        "description": "Platuma"
                    },
                    "lng": {
                        "type": "number",
                        "format": "float",
                        "minimum": -180,
                        "maximum": 180,
                        "description": "Ilguma"
                    }
                }
            },
            "ObjectUsers": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "user_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Vartotojo ID"
                    },
                    "account_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Klientas, jei priskyrimas per klientą"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "guard",
                            "operator",
                            "administrator",
                            "validator",
                            "auditor"
                        ],
                        "readOnly": true,
                        "description": "Rolė objekte"
                    },
                    "valid_from": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Galioja nuo"
                    },
                    "valid_to": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Galioja iki"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "Surveys": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas (tuščia = tenanto lygio apklausa)"
                    },
                    "name": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Pavadinimas"
                    },
                    "description": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Aprašymas"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "inactive"
                        ],
                        "readOnly": true,
                        "description": "Būsena"
                    },
                    "display_mode": {
                        "type": "string",
                        "enum": [
                            "single",
                            "all"
                        ],
                        "readOnly": true,
                        "description": "Rodyti po vieną klausimą ar visus iš karto"
                    },
                    "require_signature": {
                        "type": "boolean",
                        "readOnly": true,
                        "description": "Ar reikalingas parašas"
                    },
                    "questions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string",
                                    "description": "section, text, choice, boolean, nps, date, datetime"
                                },
                                "question_text": {
                                    "type": "string"
                                },
                                "note": {
                                    "type": "string"
                                },
                                "is_required": {
                                    "type": "boolean"
                                },
                                "allow_comment": {
                                    "type": "boolean"
                                },
                                "sort_order": {
                                    "type": "integer"
                                },
                                "options": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "integer"
                                            },
                                            "option_text": {
                                                "type": "string"
                                            },
                                            "score": {
                                                "type": "number",
                                                "format": "float"
                                            },
                                            "sort_order": {
                                                "type": "integer"
                                            }
                                        }
                                    },
                                    "readOnly": true
                                }
                            }
                        },
                        "readOnly": true,
                        "description": "Klausimai su atsakymų variantais"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "SurveyResponses": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "survey_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Kuri apklausa"
                    },
                    "user_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Kas užpildė"
                    },
                    "status": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Būsena"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Kada pradėta pildyti"
                    },
                    "completed_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Kada užbaigta; tuščia, jei dar pildoma"
                    },
                    "total_score": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Surinkta balų"
                    },
                    "max_score": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Maksimalus galimas balas"
                    },
                    "score_percent": {
                        "type": "number",
                        "format": "float",
                        "readOnly": true,
                        "description": "Rezultatas procentais"
                    },
                    "signed_by": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Kas pasirašė"
                    },
                    "answers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "question_id": {
                                    "type": "integer"
                                },
                                "value": {
                                    "type": "string",
                                    "description": "Atsakymo reikšmė"
                                },
                                "option_id": {
                                    "type": "integer",
                                    "description": "Pasirinktas variantas, jei `choice`"
                                },
                                "score": {
                                    "type": "number",
                                    "format": "float",
                                    "description": "Už atsakymą skirti balai"
                                },
                                "comment": {
                                    "type": "string"
                                }
                            }
                        },
                        "readOnly": true,
                        "description": "Atsakymai į klausimus. Pateikiant: [{\"question_id\":1,\"option_id\":5}] arba {\"question_id\":2,\"value\":\"tekstas\"}"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "SurveyResponsesWrite": {
                "type": "object",
                "properties": []
            },
            "LogTypes": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "Objektas"
                    },
                    "name": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Žurnalo pavadinimas"
                    },
                    "icon": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Piktogramos kodas portalo sąsajai"
                    },
                    "color": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Spalva HEX formatu portalo sąsajai"
                    },
                    "fields": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "description": "Lauko raktas — jį naudokite `log-entries.answers`"
                                },
                                "label": {
                                    "type": "string",
                                    "description": "Matomas pavadinimas"
                                },
                                "type": {
                                    "type": "string",
                                    "description": "text, select, checkbox, signature ir kt."
                                },
                                "choices": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "type": "string"
                                            },
                                            "label": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "readOnly": true,
                                    "description": "Galimos reikšmės, jei laukas su pasirinkimais"
                                }
                            }
                        },
                        "readOnly": true,
                        "description": "Žurnalo laukų schema"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                }
            },
            "LogEntries": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "description": "GoSpin įrašo ID"
                    },
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas"
                    },
                    "log_type_id": {
                        "type": "integer",
                        "description": "Žurnalo tipas"
                    },
                    "status": {
                        "type": "string",
                        "description": "Būsena"
                    },
                    "answers": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Reikšmės pagal `log-types.fields[].name`, pvz. {\"field_1\":\"Viskas gerai\"}"
                    },
                    "answers_text": {
                        "type": "string",
                        "readOnly": true,
                        "description": "Įrašo santrauka tekstu"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Sukūrimo laikas (ISO 8601, UTC)"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "description": "Paskutinio pakeitimo laikas (ISO 8601, UTC). Pagal jį veikia `?updated_since=`"
                    }
                },
                "required": [
                    "log_type_id"
                ]
            },
            "LogEntriesWrite": {
                "type": "object",
                "properties": {
                    "object_id": {
                        "type": "integer",
                        "description": "Objektas"
                    },
                    "log_type_id": {
                        "type": "integer",
                        "description": "Žurnalo tipas"
                    },
                    "status": {
                        "type": "string",
                        "description": "Būsena"
                    },
                    "answers": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Reikšmės pagal `log-types.fields[].name`, pvz. {\"field_1\":\"Viskas gerai\"}"
                    }
                },
                "required": [
                    "log_type_id"
                ]
            }
        },
        "parameters": {
            "id": {
                "name": "id",
                "in": "path",
                "required": true,
                "description": "Įrašo ID",
                "schema": {
                    "type": "integer"
                }
            },
            "page": {
                "name": "page",
                "in": "query",
                "required": false,
                "description": "Puslapio numeris (nuo 1)",
                "schema": {
                    "type": "integer",
                    "default": 1,
                    "minimum": 1
                }
            },
            "perPage": {
                "name": "per_page",
                "in": "query",
                "required": false,
                "description": "Įrašų puslapyje",
                "schema": {
                    "type": "integer",
                    "default": 50,
                    "minimum": 1,
                    "maximum": 200
                }
            }
        },
        "responses": {
            "Unauthorized": {
                "description": "Nėra arba negalioja API raktas",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "Raktui trūksta aprėpties arba resursas neprieinamas šiam raktui",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "Įrašas nerastas",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "ValidationFailed": {
                "description": "Validacijos klaida — žr. `message` lauką",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API raktas išduodamas GoSpin portale: Nustatymai → Integracijos → API raktai.\n\nTenant lygio raktas mato visus objektus, objekto lygio — tik vieną. Kokių aprėpčių\nreikia, nurodyta prie kiekvieno metodo.\n\nAprėptys:\n- `objects:read`\n- `objects:write`\n- `accounts:read`\n- `accounts:write`\n- `checks:read`\n- `check-points:read`\n- `check-settings:read`\n- `vpass-invites:read`\n- `vpass-invites:write`\n- `tickets:read`\n- `tickets:write`\n- `object-users:read`\n- `surveys:read`\n- `survey-responses:read`\n- `survey-responses:write`\n- `log-types:read`\n- `log-entries:read`\n- `log-entries:write`"
            }
        }
    }
}