{"openapi":"3.1.0","info":{"title":"NEXITO WORK API","version":"1.0.0","description":"Tenant-gesicherte Integrationsschnittstelle für NEXITO WORK. Organisation und Berechtigungsbereich werden serverseitig aus dem Token bestimmt."},"servers":[{"url":"https://api.nexito.work"}],"paths":{"/v1/{entity}":{"parameters":[{"$ref":"#/components/parameters/Entity"}],"get":{"operationId":"listRecords","summary":"Datensätze einer Ressource auflisten","security":[{"NexitoBearer":[]}],"parameters":[{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Datensätze innerhalb der Organisation des API-Schlüssels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createRecord","summary":"Einen unterstützten Datensatz anlegen","description":"Schreibbar sind customers, contacts, leads, projects, tasks. Die Organisation sowie der Ersteller werden serverseitig gesetzt; tenant_id und organization_id sind keine vertrauenswürdigen Eingabefelder.","security":[{"NexitoBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsRequest"}}}},"responses":{"201":{"description":"Angelegter Datensatz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/{entity}/{id}":{"parameters":[{"$ref":"#/components/parameters/Entity"},{"$ref":"#/components/parameters/RecordId"}],"get":{"operationId":"getRecord","summary":"Einen Datensatz lesen","security":[{"NexitoBearer":[]}],"responses":{"200":{"description":"Datensatz innerhalb der Organisation des API-Schlüssels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateRecord","summary":"Einen unterstützten Datensatz ändern","description":"Schreibbar sind customers, contacts, leads, projects, tasks. Ein Löschendpunkt ist absichtlich nicht vorhanden; Finanzänderungen laufen über die fachlichen Freigabe- und Auditprozesse der Anwendung.","security":[{"NexitoBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsRequest"}}}},"responses":{"200":{"description":"Geänderter Datensatz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/mcp":{"post":{"operationId":"mcpJsonRpc","summary":"MCP-JSON-RPC-Anfrage verarbeiten","security":[{"NexitoBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"method":{"type":"string"},"params":{"type":"object","additionalProperties":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"JSON-RPC-Ergebnis oder -Fehler","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"202":{"description":"JSON-RPC-Benachrichtigung angenommen"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/timer/current":{"get":{"operationId":"getCurrentTimer","summary":"Aktiven Timer lesen","description":"Dieser Endpunkt gehört zur Desktop-Timer-Schnittstelle und verwendet einen Desktop-Bearer-Token, nicht den organisationsbezogenen REST-API-Schlüssel.","security":[{"DesktopBearer":[]}],"parameters":[{"$ref":"#/components/parameters/UserId"}],"responses":{"200":{"description":"Aktiver Timer oder null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/timer/options":{"get":{"operationId":"listTimerOptions","summary":"Timeroptionen lesen","description":"Liefert tenant-gefilterte Projekte, Aufgaben und Benutzer für einen Desktop-Client.","security":[{"DesktopBearer":[]}],"parameters":[{"$ref":"#/components/parameters/ProjectId"},{"$ref":"#/components/parameters/UserId"}],"responses":{"200":{"description":"Timeroptionen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/timer/start":{"post":{"operationId":"startTimer","summary":"Einen Timer starten","security":[{"DesktopBearer":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStartRequest"}}}},"responses":{"200":{"description":"Idempotentes Timerergebnis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/timer/stop":{"post":{"operationId":"stopTimer","summary":"Einen aktiven Timer stoppen","security":[{"DesktopBearer":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStopRequest"}}}},"responses":{"200":{"description":"Idempotentes Stop-Ergebnis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/v1/timer/summary":{"get":{"operationId":"getTimerSummary","summary":"Zeiterfassungs-Zusammenfassung lesen","security":[{"DesktopBearer":[]}],"parameters":[{"$ref":"#/components/parameters/UserId"},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"}],"responses":{"200":{"description":"Zusammenfassung","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"components":{"securitySchemes":{"NexitoBearer":{"type":"http","scheme":"bearer","bearerFormat":"nex_mcp_token","description":"Organisationsbezogener API-Schlüssel aus NEXITO WORK."},"DesktopBearer":{"type":"http","scheme":"bearer","bearerFormat":"nexito_desktop_token","description":"Geräte-Token für die geschützte Desktop-Timer-Schnittstelle."}},"parameters":{"Entity":{"name":"entity","in":"path","required":true,"schema":{"type":"string","enum":["customers","contacts","leads","projects","tasks","invoices","support_tickets","conversations","documents","exports"]}},"RecordId":{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":120}},"Search":{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},"Limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},"UserId":{"name":"userId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},"ProjectId":{"name":"projectId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},"From":{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},"To":{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Wiederholungen derselben Aktion müssen denselben Schlüssel verwenden."}},"schemas":{"FieldsRequest":{"type":"object","required":["fields"],"additionalProperties":false,"properties":{"fields":{"type":"object","description":"Nur skalare, für die jeweilige Ressource erlaubte Felder. Organisation und Ersteller werden serverseitig gesetzt.","additionalProperties":true}}},"RecordResponse":{"type":"object","required":["data"],"properties":{"data":{"type":["object","null"],"additionalProperties":true}},"additionalProperties":false},"RecordListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":false},"TimerStartRequest":{"type":"object","additionalProperties":false,"properties":{"userId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"description":{"type":"string","maxLength":1000},"billable":{"type":"boolean","default":true}}},"TimerStopRequest":{"type":"object","additionalProperties":false,"properties":{"userId":{"type":"string","format":"uuid"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"responses":{"BadRequest":{"description":"Ungültige Eingabe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Fehlender oder ungültiger Token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Der Token besitzt nicht den benötigten Berechtigungsbereich","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Ressource oder Datensatz nicht gefunden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Semantisch ungültige Eingabe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate Limit erreicht","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServiceUnavailable":{"description":"Der benötigte Dienst ist momentan nicht verfügbar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}