Last updated

Import Multiple Companies

This method allows you to upload a file containing multiple companies to add them to a portfolio in bulk.

Example Request

POST /monitoring/portfolios/{portfolioId}/import

Key Considerations

When utilising the API to submit files for processing, consider the following recommendations to optimize performance:

1. File Size and Format:

  • Files smaller than 50KB or in CSV format are processed faster compared to larger files or those in XLS format.
  • The advanced queuing system efficiently handles smaller files and CSV formats, expediting their processing.

2. Best Practices:

  • Break Down Larger Files:
    For datasets exceeding the recommended file size threshold, break them into smaller, manageable chunks. This allows the queuing system to process each segment more efficiently, resulting in quicker results.
  • Prefer CSV over XLS Format:
    Whenever possible, use CSV files for submissions. CSV files are simpler and have minimal overhead, leading to faster processing times compared to XLS files.
  • Practical Considerations:
    While CSV format and smaller files are encouraged, specific use cases may require XLS format or larger datasets. In such scenarios, evaluate the trade-offs between processing time and other factors to determine the most suitable approach.

Example File Structure

The file must include the following fields:

Header NameRequiredDescription
Safe NumberYesThe unique identifier for the company
Local Org No.NoThe local organization number for the company
Country CodeYesThe ISO country code for the company
ReferenceNoOptional field for internal references
Free TextNoOptional field for additional notes
Personal LimitNoOptional field for setting an internal limit (not related to credit limits)

NOTE: If a field is not being used, leave it blank in the file but ensure the column headers remain in place.


Example CSV File

Safe Number,Local Org No.,Country Code,Reference,Free Text,Personal Limit
GB-0-12345678,,GB,Test Reference,Test Notes,10000
,01777777,US,Another Reference,,5000

Variations Allowed in the Submitted File

The following variations are allowed when submitting files:

1. Safe Number vs. ConnectID:

  • The Safe Number can be substituted for ConnectID in column A if preferred.
  • A greater success rate is achieved when using the Safe Number.

2.Local Org No.:

  • The Local Org No. can be used instead of Safe Number or ConnectID.
  • If the Local Org No. is used, the Country Code becomes mandatory.
  • You MUST insert a blank space where the Safe Number would be.

Examples

Example 1: Using Local Org No.

Safe No.Local Org No.Country CodeReferenceFree TextPersonal Limit
01777777GB

CSV Format:

,01777777,GB

Example 2: Using Local Org No. with Reference

Safe No.Local Org No.Country CodeReferenceFree TextPersonal Limit
01777777GBThis is a Test

CSV Format:

,01777777,GB,,This is a test

Key Details

  • Existing companies in the portfolio will be skipped, and only new unique entries will be added.
  • If optional fields are not used, they can be left blank, but the column headers must remain in the file.
  • Use the portfolioId in the URL path to specify the portfolio to which the companies will be added.

Sync Portfolio

The Sync Portfolio method allows you to replace all existing companies in a portfolio with the contents of an uploaded file. Unlike the Import method, this endpoint overwrites the entire portfolio, deleting all previously allocated companies.

Example Request

POST /monitoring/portfolios/{portfolioId}/sync

Key Details

  • The file structure and requirements are identical to the Import Multiple Companies method.
  • All existing companies in the portfolio will be deleted and replaced with the companies in the uploaded file.
  • Use this method when you want to completely reset the portfolio with a new set of companies.

By following these guidelines, you can efficiently import multiple companies into a portfolio while optimising processing speed and ensuring accurate data handling.