{"openapi":"3.1.0","info":{"title":"Ticke API","version":"1.0.0","summary":"Spanish invoicing & fiscal platform REST API","description":"REST JSON API for Ticke, the Spanish invoicing platform with AEAT-certified Verifactu compliance and the Zero AI agent.\n\nThis is a discovery mirror. The complete, always-current OpenAPI document is served by the backend itself at https://api.ticke.es/v3/api-docs (interactive UI: https://api.ticke.es/swagger-ui.html).\n\nAuthentication: JWT Bearer tokens obtained via POST https://api.ticke.es/api/auth/login. Errors are structured JSON with stable errorCode values (see components.schemas.Error). Rate-limited responses include RateLimit-Limit / RateLimit-Remaining / RateLimit-Reset headers and Retry-After on 429.\n\nVersioning policy: the API has no URL or header versioning in V1; all clients integrate against the single current version described here. Breaking changes will be announced in advance on https://ticke.es/developers with a migration window of at least 6 months, and deprecated operations will be signalled with Sunset and Deprecation response headers plus a timeline in their description. Monitor these headers; pinning to a version is not required.","contact":{"name":"Ticke","email":"contact@ticke.es","url":"https://ticke.es/developers/"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://api.ticke.es","description":"Production API"}],"paths":{"/api/auth/login":{"post":{"operationId":"login","summary":"Authenticate and receive JWT tokens","description":"Exchanges account credentials for an accessToken and a refreshToken. Rate limited per source IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Account email"},"password":{"type":"string","description":"Account password"}},"required":["email","password"]}}}},"responses":{"200":{"description":"Authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token (30 min)"},"refreshToken":{"type":"string","description":"JWT refresh token"}}}}}},"401":{"description":"Invalid credentials (JSON error body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (Retry-After header, JSON error body)","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/refresh":{"post":{"operationId":"refreshToken","summary":"Renew the access token","description":"Exchanges a valid refreshToken for a fresh token pair.","responses":{"200":{"description":"New token pair issued","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token (30 min)"},"refreshToken":{"type":"string","description":"JWT refresh token"}}}}}},"401":{"description":"Invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","description":"Structured error body returned by every 4xx/5xx response. Only errorCode and message are guaranteed on every endpoint (e.g. filter-level 429s omit status/path); status, path and resolution are present on application errors.","properties":{"errorCode":{"type":"string","description":"Stable machine-readable code, e.g. VALIDATION_INVALID_NIF, RATE_LIMIT_EXCEEDED.","examples":["RATE_LIMIT_EXCEEDED"]},"message":{"type":"string","description":"Human-readable explanation."},"status":{"type":"integer","description":"HTTP status code, mirrors the response status (application errors)."},"path":{"type":"string","description":"Request path that failed (application errors)."},"resolution":{"type":"string","description":"Hint telling the caller what to do next."},"timestamp":{"type":"string","description":"Error time (application errors).","format":"date-time"},"error":{"type":"string","description":"Error category, e.g. 'Not Found' (application errors)."}},"required":["errorCode","message"]}}},"tags":[{"name":"auth","description":"Authentication and token lifecycle"}],"externalDocs":{"description":"Developer portal","url":"https://ticke.es/developers/"}}