{"openapi":"3.1.0","info":{"title":"TCN API","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/companies":{"get":{"operationId":"companies_list","tags":["Company"],"responses":{"200":{"description":"Company collection","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Company-company.read"}}}}}},"summary":"Retrieves the collection of Company resources.","description":"Retrieves the collection of Company resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":false}]},"post":{"operationId":"companies_create","tags":["Company"],"responses":{"201":{"description":"Company resource created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Company-company.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}}},"links":{}}},"summary":"Creates a Company resource.","description":"Creates a Company resource.","parameters":[],"requestBody":{"description":"The new Company resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Company-company.write_company.create"}}},"required":true}}},"\/api\/companies\/{id}":{"get":{"operationId":"companies_get","tags":["Company"],"responses":{"200":{"description":"Company resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Company-company.read"}}}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Retrieves a Company resource.","description":"Retrieves a Company resource.","parameters":[{"name":"id","in":"path","description":"Company identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]},"put":{"operationId":"companies_update","tags":["Company"],"responses":{"200":{"description":"Company resource updated","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Company-company.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}}},"links":{}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Replaces the Company resource.","description":"Replaces the Company resource.","parameters":[{"name":"id","in":"path","description":"Company identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}],"requestBody":{"description":"The updated Company resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Company-company.write"}}},"required":true}}},"\/api\/login_check":{"post":{"operationId":"login_check_post","tags":["Login Check"],"responses":{"200":{"description":"User token created","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"readOnly":true,"type":"string","nullable":false}},"required":["token"]}}}}},"summary":"Creates a user token.","description":"Creates a user token.","requestBody":{"description":"The login data","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]}}},"required":true}}},"\/api\/current\/user":{"get":{"operationId":"current_user","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.read"}}}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[]}},"\/api\/users":{"get":{"operationId":"users_list","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/User-user.read"}}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":false}]},"post":{"operationId":"users_create","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}}},"links":{}}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.write_user.create"}}},"required":true}}},"\/api\/users\/{id}":{"get":{"operationId":"users_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.read"}}}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]},"put":{"operationId":"users_update","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ConstraintViolation"}}},"links":{}},"404":{"description":"Not found","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Error.jsonld"}},"application\/problem+json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}},"links":{}}},"summary":"Replaces the User resource.","description":"Replaces the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}],"requestBody":{"description":"The updated User resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User-user.write"}}},"required":true}}}},"components":{"schemas":{"Company-company.read":{"type":"object","properties":{"id":{"readOnly":true,"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]},"fax":{"type":["string","null"]},"website":{"type":["string","null"]},"contactEmail":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"contactPersons":{"type":"array","items":{"$ref":"#\/components\/schemas\/User-company.read"}},"createdAt":{"readOnly":true,"type":"string","format":"date-time"},"updatedAt":{"readOnly":true,"type":"string","format":"date-time"}},"required":["name"]},"Company-company.write":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"phone":{"type":["string","null"]},"fax":{"type":["string","null"]},"website":{"type":["string","null"]},"contactEmail":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"contactPersons":{"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Company-company.write_company.create":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"phone":{"type":["string","null"]},"fax":{"type":["string","null"]},"website":{"type":["string","null"]},"contactEmail":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"contactPersons":{"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"ConstraintViolation":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"ConstraintViolation.jsonld":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"description":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"examples":[404],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"examples":[404],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"User-company.read":{"type":"object","required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"}}},"User-user.read":{"type":"object","properties":{"id":{"readOnly":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"phone":{"type":["string","null"]},"roles":{"type":"array","items":{"type":["string","null"]}},"createdAt":{"readOnly":true,"type":"string","format":"date-time"},"updatedAt":{"readOnly":true,"type":"string","format":"date-time"},"totpEnabled":{"default":false,"type":"boolean"},"companies":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}},"required":["firstName","lastName","email"]},"User-user.write":{"type":"object","required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"phone":{"type":["string","null"]},"roles":{"type":"array","items":{"type":["string","null"]}}}},"User-user.write_user.create":{"type":"object","required":["firstName","lastName","email","password"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"phone":{"type":["string","null"]},"password":{"minLength":8,"type":"string"},"roles":{"type":"array","items":{"type":["string","null"]}}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[],"tags":[{"name":"Company","description":"Resource 'Company' operations."},{"name":"User","description":"Resource 'User' operations."}],"webhooks":{}}