{"openapi":"3.0.0","info":{"description":"API documentation of AAA microservice","version":"1.0.0","title":"AAA microservice","contact":{"email":"you@your-company.com"}},"servers":[{"description":"Alfinity API gateway server","url":"https://alfinity-api-gateway.altorumleren.com/gateway"}],"paths":{"/api/v1/oauth/permissions":{"post":{"tags":["Oauth"],"summary":"To create a new permission","description":"This API will create a new permission","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Permission details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Permissions"}}},"required":true},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"get":{"tags":["Oauth"],"summary":"Fetch all permissions","description":"This API will fetch all the permissions","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/permissions/{permission-id}":{"put":{"tags":["Oauth"],"summary":"To edit a permission using permissionId","description":"This API is used to edit a permission","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"permission-id","in":"path","description":"The permission that needs to be edited must be passed with permissionId","required":true,"schema":{"type":"string","example":765457}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Enter updated details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Permissions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionsResponse"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"get":{"tags":["Oauth"],"summary":"Fetch permission through permissionId","description":"This API will fetch permission through permissionId","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"permission-id","in":"path","description":"The permission Id for which the permission is being fetched","required":true,"schema":{"type":"number","example":674091}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"delete":{"tags":["Oauth"],"summary":"Delete a permission based on permissionId","description":"This API will be used to delete a permission based on permissionId","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"permission-id","in":"path","description":"The permission Id for which the permission is being deleted","required":true,"schema":{"type":"number","example":987576}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"responses":{"204":{"description":"Permission successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/role":{"post":{"tags":["Oauth"],"summary":"To create a new role","description":"This API will create a new role","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Role details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roles"}}},"required":true},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"get":{"tags":["Oauth"],"summary":"Fetch all roles","description":"This API will fetch all the roles","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/role/{role-id}":{"put":{"tags":["Oauth"],"summary":"To edit a role using roleId","description":"This API is used to edit a role","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}},{"name":"role-id","in":"path","description":"The role that needs to be edited must be passed with roleId","required":true,"schema":{"type":"string","example":765487}}],"requestBody":{"description":"Enter updated details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roles"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"get":{"tags":["Oauth"],"summary":"Fetch role through roleId","description":"This API will fetch role through roleId","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}},{"name":"role-id","in":"path","description":"The role Id for which the role is being fetched","required":true,"schema":{"type":"number","example":674091}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"delete":{"tags":["Oauth"],"summary":"Delete a role based on roleId","description":"This API will be used to delete a role based on roleId","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}},{"name":"role-id","in":"path","description":"The role Id for which the role is being deleted","required":true,"schema":{"type":"number","example":987760}}],"responses":{"204":{"description":"Role successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/signup":{"post":{"tags":["Oauth"],"summary":"To sign up into the application","description":"With this API the user will be able to sign up alfinity","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Signup details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Signup"}}},"required":true},"responses":{"201":{"description":"Ok - signup successful"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/login":{"post":{"tags":["Oauth"],"summary":"To login to the application","description":"With this API the user will login to the application","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Login details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"201":{"description":"Ok - login successful"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/login/passwordFlowAccessToken":{"post":{"tags":["Oauth"],"summary":"To get the access token","description":"With this API the user will receive an access token via the password flow","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenPassword"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessToken"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/login/pkceFlowAccessToken":{"post":{"tags":["Oauth"],"summary":"To get the access token","description":"With this API the user will receive an access token via the pkce flow","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTokenPkce"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessToken"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/login/authorisationCodeAccessToken":{"post":{"tags":["Oauth"],"summary":"To get the access token","description":"With this API the user will receive an access token via the authorisation code grant","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorisationCodeAccessToken"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessToken"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/oauth/logout":{"post":{"tags":["Oauth"],"summary":"To logout of the application","description":"With this API the user can logout of the application","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logout"}}},"required":true},"responses":{"200":{"description":"Ok"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/resetPassword":{"put":{"tags":["User"],"summary":"To edit the login password","description":"This API is used to edit the login password","parameters":[{"name":"Authorisation","in":"header","description":"The authorisation header will contain the access token","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"Enter password details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePassword"}}}},"responses":{"200":{"description":"Ok - password updated successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/forgotPassword":{"post":{"tags":["User"],"summary":"To start the forgot password flow","description":"This API will used to start the forgot password flow","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"description":"User details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"Ok"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"/api/v1/verifyOtp":{"post":{"tags":["User"],"summary":"To verify the OTP","description":"This API will used to verify the OTP given by the user","parameters":[{"name":"Authorisation","in":"header","required":true,"schema":{"type":"string","example":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},{"name":"request-id","in":"header","required":true,"description":"To identify the request uniquely","schema":{"type":"string","example":"X-requested-with abc123"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Otp"}}},"required":true},"responses":{"200":{"description":"Ok"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestError"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Forbidden"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}},"components":{"schemas":{"Permissions":{"properties":{"tenantId":{"type":"number","example":674091},"customerId":{"type":"number","example":368683},"permissionName":{"type":"string","example":"Products"},"scope":{"type":"string","example":"Products"},"permissionDescription":{"type":"string","example":"To perform operations on products"}}},"PermissionsResponse":{"properties":{"permissionsId":{"type":"number","example":256967},"permissionDetails":{"type":"array","items":{"$ref":"#/components/schemas/Permissions"}},"active":{"type":"boolean","example":true},"createdAt":{"type":"string","example":"03-12-2017"},"updatedAt":{"type":"string","example":"02-07-2020"}}},"PermissionWithGrants":{"properties":{"permissionId":{"type":"string"},"grants":{"type":"array","items":{"type":"string","example":"create, read, update"}}}},"Roles":{"properties":{"tenantId":{"type":"number","example":674091},"customerId":{"type":"number","example":null},"roleName":{"type":"string","example":"Tenant admin"},"roleDescription":{"type":"string","example":"This role is an admin for the tenant"},"access":{"type":"array","items":{"$ref":"#/components/schemas/PermissionWithGrants"}}}},"RoleResponse":{"properties":{"roleId":{"type":"number","example":186739},"roleDetails":{"type":"array","items":{"$ref":"#/components/schemas/Roles"}},"active":{"type":"boolean","example":true},"createdAt":{"type":"string","example":"03-12-2017"},"updatedAt":{"type":"string","example":"02-07-2020"}}},"Signup":{"properties":{"username":{"type":"string","example":"Mark"},"email":{"type":"string","example":"mark@abc.com"},"password":{"type":"string"},"confirmPassword":{"type":"string"}}},"Login":{"properties":{"clientId":{"type":"string"},"responseType":{"type":"string"},"redirectUrl":{"type":"string","example":"www.alfinity.com"},"grantType":{"type":"string","example":"authorisation code flow"},"email":{"type":"string","example":"abc@alfinity.com"},"password":{"type":"string","example":"Test@123"},"codeChallenge":{"type":"string","example":"abcdefghi"}}},"AccessTokenPassword":{"properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"},"grantTpye":{"type":"string","example":"password"},"email":{"type":"string","example":"abc@alfinity.com"},"username":{"type":"string","example":"abc"},"password":{"type":"string","example":"Test@123"}}},"AccessTokenPkce":{"properties":{"clientId":{"type":"string"},"grantTpye":{"type":"string","example":"pkce"},"redirectUrl":{"type":"string","example":"www.alfinity.com"},"codeVerify":{"type":"string","example":"abcdefghi"}}},"AuthorisationCodeAccessToken":{"properties":{"clientId":{"type":"string"},"redirectUrl":{"type":"string","example":"www.alfinity.com"},"grantType":{"type":"string"},"clientSecret":{"type":"string"}}},"AccessToken":{"properties":{"accessToken":{"type":"string"}}},"Logout":{"properties":{"clientId":{"type":"string"}}},"ChangePassword":{"properties":{"oldPassword":{"type":"string","example":"Test@123"},"newPassword":{"type":"string","example":"Test@2020"},"confirmPassword":{"type":"string","example":"Test@2020"}}},"User":{"properties":{"username":{"type":"string","example":"abc123"},"email":{"type":"string","example":"abc@alfinity.com"},"phoneNumber":{"type":"string","example":9876543210}}},"Otp":{"properties":{"otp":{"type":"string","example":29572}}},"BadRequestError":{"properties":{"code":{"type":"number","example":400},"message":{"type":"string","example":"Bad Request"}}},"Forbidden":{"properties":{"code":{"type":"number","example":403},"message":{"type":"string","example":"Unauthorised access"}}},"InternalServerError":{"properties":{"code":{"type":"number","example":500},"message":{"type":"string","example":"Internal server error"}}}}}}