API Upload Fails Validation
This article explains the steps that should be taken to investigate a failed file validation when the upload occurred via API. While validation errors are explained clearly for user uploads, it can be slightly more obscure to identify the source of a validation error for API uploads, and this article is intended to outline the procedures for investigation.
Successful uploads are visible clearly from the UI in the Previous Uploads page (Admin > Previous Uploads)
If an API upload fails validation (see this article for a general overview of validation), an email will be sent to the person who authorised the API upload, similar to the way that an error message is produced if an upload fails validation when uploading via UI.
The following steps should be taken to investigate the error:
1. Log in to the FundApps environment the file has been uploaded to.
2. Go to Admin > Previous Uploads
3. Find the upload which has failed and you are investigating. Uploads that have failed validation will be highlighted in bronze.
3. Click on this icon on the right to show the validation errors by rerunning the API-uploaded file in the UI.
4. The next screen will show why it's failing validation and will help you identify what to change.
This will give the full details of the properties which made the file fail the validation procedure, just as if the file was uploaded via the UI.
Q. I tried uploading a file but get the following error: "There was a problem validating this data file. Support has been notified and we will let you know when the issue has been resolved."
A. While this is a blanket error, one of the reasons that could be causing the file upload to fail and receive this error may be the file size. The maximum file size is 11.4 MB when uploading via the UI. If your file is larger than this specified size, then compress the file and upload it as a zip. In the positions upload screen, you can upload .xml and zip files (.csv are not allowed). The API is not limited to this file size restriction.
Q. Why can't FundApps not give this information in the API response?
A. The simple answer is security around sensitive data. At FundApps we take security extremely seriously. As the validation errors could contain position level information, we contain the API validation feedback in FundApps to ensure that only people with the appropriate permissions can see it.
Q. I received the following validation error for Portfolios: "(invalid - The portfolio has an inception date beyond nav date)"
A. This error ("inception date beyond nav date") appears as you are not providing a Date in your positions file and in the positions file (which can be downloaded from the Previous Uploads screen) will most likely show on line 1 that you have Date="Null". Please provide a NAV date and this should resolve the issue.
Q. Can amendments be made to how files are processed upon discovering a validation error?
A. The way XML validation behaves upon discovering a file error is not something FundApps can amend due to it using a standard XML parser; however, please contact email@example.com if you have any questions on validation failures.