swagger: '2.0' info: description: Api Documentation version: '1.0' title: Api Documentation termsOfService: 'urn:tos' contact: {} license: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0' host: 'localhost:8443' basePath: / tags: - name: Company Registrations Office REST API Interface description: Company Registrations Office REST API Interface - name: authorization-endpoint description: Authorization Endpoint - name: basic-error-controller description: Basic Error Controller - name: check-token-endpoint description: Check Token Endpoint - name: token-endpoint description: Token Endpoint - name: token-key-endpoint description: Token Key Endpoint - name: whitelabel-approval-endpoint description: Whitelabel Approval Endpoint - name: whitelabel-error-endpoint description: Whitelabel Error Endpoint paths: /cro/companies: get: tags: - Company Registrations Office REST API Interface summary: Get/search a list of all companies stored in application. description: Retrieve all companies details. operationId: searchCompaniesUsingGET produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: CompanyName in: query description: name of the company required: false type: string - name: id in: query description: searching for a company by id required: false type: integer format: int32 - name: showall in: query description: Show companies with all stakeholders details. required: false type: boolean responses: '200': description: OK schema: type: array items: $ref: '#/definitions/Company' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found post: tags: - Company Registrations Office REST API Interface summary: Receive a company details as a request to be created on Company Registration Office(CRO). description: Receive a company details as a request to be created on Company Registration Office(CRO) operationId: registerCompanyUsingPOST consumes: - application/json produces: - '*/*' - application/json;charset=UTF-8 parameters: - in: body name: request description: request required: true schema: $ref: '#/definitions/CompanyRegistrationRequest' responses: '200': description: OK schema: $ref: '#/definitions/Company' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found '/cro/companies/{companyId}': get: tags: - Company Registrations Office REST API Interface summary: Search a company based on the received company Id. description: Search a company based on the received company Id. operationId: getCompanyByIdUsingGET produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: companyId in: path description: companyId required: true type: integer format: int32 responses: '200': description: OK schema: $ref: '#/definitions/Company' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - Company Registrations Office REST API Interface summary: Receive a company details as an update request to be updated on Company Registration Office. description: Receive an updateRequest for update an existing company in store. operationId: updateCompanyUsingPUT consumes: - application/json produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: companyId in: path description: companyId required: true type: integer format: int32 - in: body name: updateRequest description: updateRequest required: true schema: $ref: '#/definitions/CompanyRegistrationRequest' responses: '200': description: OK schema: $ref: '#/definitions/Company' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found /cro/owners: post: tags: - Company Registrations Office REST API Interface summary: Receive a company Id and a list of stakeholders Id's as a request to be registered as beneficial owner of the company. description: Receive a company Id and a list of stakeholders Id's as a request to be registered as beneficial owner of the company. operationId: registerBeneficialOwnerUsingPOST consumes: - application/json produces: - '*/*' - application/json;charset=UTF-8 parameters: - in: body name: req description: req required: true schema: $ref: '#/definitions/BeneficialRegisterRequest' responses: '200': description: OK schema: $ref: '#/definitions/Company' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found /cro/stakeholders: get: tags: - Company Registrations Office REST API Interface summary: Search in or get a list of all stakeholders stored in application. description: Retrieve all stakeholders registered in CRO. operationId: searchStakeholdersUsingGET produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: StakeholderName in: query description: FirstName or LastName of the stakeholder required: false type: string - name: LastName in: query description: LastName of the stakeholder required: false type: string - name: FirstName in: query description: FirstName of the stakeholder required: false type: string - name: showall in: query description: Show stakeholders with all companies owned details. required: false type: boolean responses: '200': description: OK schema: type: array items: $ref: '#/definitions/Stakeholder' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found post: tags: - Company Registrations Office REST API Interface summary: Receive a Stakeholder details as a request to register it at CRO. description: Receive a Stakeholder details as a request to register it at CRO. operationId: registerStakeholderUsingPOST consumes: - application/json produces: - '*/*' - application/json;charset=UTF-8 parameters: - in: body name: request description: request required: true schema: $ref: '#/definitions/CompanyRegistrationRequest' responses: '200': description: OK schema: $ref: '#/definitions/Stakeholder' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found '/cro/stakeholders/{id}': put: tags: - Company Registrations Office REST API Interface summary: Receive a Stakeholder details to update a Stakeholder on CRO. description: Receive an updateRequest for update an existing Stakeholder in CRO. operationId: updateStakeholderUsingPUT consumes: - application/json produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: id in: path description: id required: true type: integer format: int32 - in: body name: updateRequest description: updateRequest required: true schema: $ref: '#/definitions/CompanyRegistrationRequest' responses: '200': description: OK schema: $ref: '#/definitions/Stakeholder' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found '/cro/stakeholders/{stakeholderId}': get: tags: - Company Registrations Office REST API Interface summary: Search a stakeholder based on the received stakeholder name. description: Search a stakeholder based on the received stakeholder name. operationId: getStakeholderByIdUsingGET produces: - '*/*' - application/json;charset=UTF-8 parameters: - name: stakeholderId in: path description: stakeholderId required: true type: integer format: int32 responses: '200': description: OK schema: $ref: '#/definitions/Stakeholder' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found /error: get: tags: - basic-error-controller summary: error operationId: errorUsingGET produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found head: tags: - basic-error-controller summary: error operationId: errorUsingHEAD consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden post: tags: - basic-error-controller summary: error operationId: errorUsingPOST consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - basic-error-controller summary: error operationId: errorUsingPUT consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found delete: tags: - basic-error-controller summary: error operationId: errorUsingDELETE produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden options: tags: - basic-error-controller summary: error operationId: errorUsingOPTIONS consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden patch: tags: - basic-error-controller summary: error operationId: errorUsingPATCH consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden /oauth/authorize: get: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingGET produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found head: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingHEAD consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden post: tags: - authorization-endpoint summary: approveOrDeny operationId: approveOrDenyUsingPOST consumes: - application/json produces: - '*/*' parameters: - name: approvalParameters in: query description: approvalParameters required: true items: type: object additionalProperties: type: string - name: model in: query description: model required: false type: object - name: user_oauth_approval in: query required: true type: string responses: '200': description: OK schema: $ref: '#/definitions/View' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingPUT consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found delete: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingDELETE produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden options: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingOPTIONS consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden patch: tags: - authorization-endpoint summary: authorize operationId: authorizeUsingPATCH consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden /oauth/check_token: get: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingGET produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found head: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingHEAD consumes: - application/json produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden post: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingPOST consumes: - application/json produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingPUT consumes: - application/json produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found delete: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingDELETE produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden options: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingOPTIONS consumes: - application/json produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden patch: tags: - check-token-endpoint summary: checkToken operationId: checkTokenUsingPATCH consumes: - application/json produces: - '*/*' parameters: - name: token in: query description: token required: true type: string responses: '200': description: OK schema: type: object '204': description: No Content '401': description: Unauthorized '403': description: Forbidden /oauth/confirm_access: get: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingGET produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found head: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingHEAD consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden post: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingPOST consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingPUT consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found delete: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingDELETE produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden options: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingOPTIONS consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden patch: tags: - whitelabel-approval-endpoint summary: getAccessConfirmation operationId: getAccessConfirmationUsingPATCH consumes: - application/json produces: - '*/*' parameters: - name: model in: query description: model required: false type: object responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden /oauth/error: get: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingGET produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found head: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingHEAD consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden post: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingPOST consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found put: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingPUT consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found delete: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingDELETE produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden options: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingOPTIONS consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden patch: tags: - whitelabel-error-endpoint summary: handleError operationId: handleErrorUsingPATCH consumes: - application/json produces: - '*/*' responses: '200': description: OK schema: $ref: '#/definitions/ModelAndView' '204': description: No Content '401': description: Unauthorized '403': description: Forbidden /oauth/token: get: tags: - token-endpoint summary: getAccessToken operationId: getAccessTokenUsingGET produces: - '*/*' parameters: - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/OAuth2AccessToken' '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found post: tags: - token-endpoint summary: postAccessToken operationId: postAccessTokenUsingPOST consumes: - application/json produces: - '*/*' parameters: - name: parameters in: query description: parameters required: true items: type: object additionalProperties: type: string responses: '200': description: OK schema: $ref: '#/definitions/OAuth2AccessToken' '201': description: Created '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found /oauth/token_key: get: tags: - token-key-endpoint summary: getKey operationId: getKeyUsingGET produces: - '*/*' responses: '200': description: OK schema: type: object additionalProperties: type: string '401': description: Unauthorized '403': description: Forbidden '404': description: Not Found definitions: BeneficialRegisterRequest: type: object required: - CompanyId - Stakeholders properties: CompanyId: type: integer format: int32 description: Company Id allowEmptyValue: false Stakeholders: type: array description: A collection of the company stakeholders ID's allowEmptyValue: false items: type: integer format: int32 title: BeneficialRegisterRequest description: Beneficial owner/stakeholder registration request resource representation Company: type: object required: - Stakeholders properties: Address: type: string City: type: string Country: type: string Email: type: string Id: type: integer format: int32 Name: type: string PhoneNumber: type: string Stakeholders: type: array description: A collection of the returned company stakeholders allowEmptyValue: false items: $ref: '#/definitions/Stakeholder' title: Company description: Company resource representation CompanyRegistrationRequest: type: object properties: FirstName: type: string LastName: type: string title: CompanyRegistrationRequest description: Create Stakeholder registration request resource representation ModelAndView: type: object properties: empty: type: boolean model: type: object modelMap: type: object additionalProperties: type: object reference: type: boolean status: type: string enum: - '100' - '101' - '102' - '103' - '200' - '201' - '202' - '203' - '204' - '205' - '206' - '207' - '208' - '226' - '300' - '301' - '302' - '303' - '304' - '305' - '307' - '308' - '400' - '401' - '402' - '403' - '404' - '405' - '406' - '407' - '408' - '409' - '410' - '411' - '412' - '413' - '414' - '415' - '416' - '417' - '418' - '419' - '420' - '421' - '422' - '423' - '424' - '426' - '428' - '429' - '431' - '451' - '500' - '501' - '502' - '503' - '504' - '505' - '506' - '507' - '508' - '509' - '510' - '511' view: $ref: '#/definitions/View' viewName: type: string title: ModelAndView OAuth2AccessToken: type: object properties: additionalInformation: type: object expiration: type: string format: date-time expired: type: boolean expiresIn: type: integer format: int32 refreshToken: $ref: '#/definitions/OAuth2RefreshToken' scope: type: array items: type: string tokenType: type: string value: type: string title: OAuth2AccessToken OAuth2RefreshToken: type: object properties: value: type: string title: OAuth2RefreshToken ResponseEntity: type: object properties: body: type: object statusCode: type: string enum: - '100' - '101' - '102' - '103' - '200' - '201' - '202' - '203' - '204' - '205' - '206' - '207' - '208' - '226' - '300' - '301' - '302' - '303' - '304' - '305' - '307' - '308' - '400' - '401' - '402' - '403' - '404' - '405' - '406' - '407' - '408' - '409' - '410' - '411' - '412' - '413' - '414' - '415' - '416' - '417' - '418' - '419' - '420' - '421' - '422' - '423' - '424' - '426' - '428' - '429' - '431' - '451' - '500' - '501' - '502' - '503' - '504' - '505' - '506' - '507' - '508' - '509' - '510' - '511' statusCodeValue: type: integer format: int32 title: ResponseEntity Stakeholder: type: object required: - Companies properties: Companies: type: array description: A list of companies details owned by this stakeholder allowEmptyValue: false items: $ref: '#/definitions/Company' FirstName: type: string Id: type: integer format: int32 LastName: type: string title: Stakeholder description: Stakeholder resource representation View: type: object properties: contentType: type: string title: View