# Move Companies Between Portfolios This endpoint allows you to move companies from one portfolio to single (or) multiple portfolios. Removes the companies from the portfolio provided in the path parameter. Endpoint: POST /monitoring/portfolios/{portfolioId}/companies/remove Version: 1.10.9 Security: bearerToken ## Path parameters: - `portfolioId` (number, required) The unique identifier of the portfolio you want to move companies from, obtained from . ## Query parameters: - `removeAll` (boolean) When RemoveAll query parameter is False, a portfolios and companies list needs to be passed. When RemoveAll query parameter is True, only portfolios need to be passed and companies List must be empty. All companies are moved and deleted from current portfolio. ## Request fields (application/json): - `portfolios` (array, required) Comma separated portfolioId(s). - `companies` (array) Array of companies to copy. - `companies.id` (string) Company Safe Number or Connect ID. Not required when copyAll query parameter is set to true. ## Response 200 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. Example: "23921650-c073-11ea-860f-06bc8182190e" - `data` (object) - `data.totalPortfoliosCompanies` (integer) Total amount of companies attempted to copy. Example: 5 - `data.successfulPortfoliosCompanies` (integer) Amount of companies successfully copied. Example: 3 - `data.failedPortfoliosCompanies` (integer) Amount of companies successfully copied. Example: 2 - `data.reason` (string) A message with a reason for why there was failures. Example: "Duplicate entry '199483-FR00002855' for key 'PRIMARY" ## Response 400 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. - `message` (string) - `details` (string) Provides further information on why the request was rejected ## Response 401 fields (application/json): - `error` (string) ## Response 403 fields (application/json): - `message` (string) Example: "Access forbidden" ## Response 404 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. - `message` (string) - `details` (string) Provides further information on why the request was rejected