uploadVerificationDocument

This method is used to upload documentation to verify Accredited Investor status to a specific account. NCPS requires one of the three following options for accreditation verification: 1) W2's, 1099's or tax returns for the past two years to show your individual income exceeds $200,000 (or joint income exceeds $300,000) for each year. 2) Provide recent account statements or third party appraisals that show the value of your assets exceed $1,000,000 excluding your primary residence. (Must be dated within the last 3 months) 3) Provide an official written communication from any of the following stating that the professional service provider has a reasonable belief that you are an Accredited Investor (Must be dated within the last 3 months): A licensed CPA, Attorney, Investment Advisor, or Registered broker-dealer.
PDF, jpg, and png files are supported. Files cannot be larger than 100 MB.

Request Parameters

ParameterRequiredTypeDescription
clientIDyesstringTransactAPI Client ID
developerAPIKeyyesstringTransactAPI Developer Key
accountIdyesstringAccount ID that is generated by the API when an account is created (createAccount)
documentTitleyesstringUploaded document title. Please use prefix "documentTitle0=" in the value of documentTitle field
userfileyesstringRaw file data. Specification of raw file data is application specific. Accepted file types are PDF, JPG, PNG, HEIC and BMP. Minimum file size is 1 kB. Maximum file size is 100 MB. Please refer to the Sample Requests section for reference implementations.
createdIpAddressnostringRequested IP Address

Requirements

  • File size: Files must be at least 1 kB and cannot exceed 100 MB.
  • Accepted Formats: pdf, jpg, jpeg, and png.
  • Content Type: The request must use multipart/form-data for proper file handling.
  • Note: This endpoint uses userfile instead of userfile0 for the file parameter.
  • A valid account ID is required; use the createAccount endpoint if the account does not exist.

Sample Requests

curl --location --request POST 'https://api-sandboxdash.norcapsecurities.com/tapiv3/index.php/v3/uploadVerificationDocument' 
--form 'clientID=someclientid'
--form 'accountId=someaccountid'
--form 'createdIpAddress="127.0.0.1"' 
--form 'documentTitle="documentTitle0=Accreditation Verification Document"' 
--form 'userfile=@"/path/to/file"' 
--form 'developerAPIKey=somedeveloperAPIkey'
import axios from 'axios';
import { Readable } from 'stream';
import FormData from 'form-data';

const apiHost = process.env.TAPI_HOST || 'https://api-sandboxdash.norcapsecurities.com';
const tapiUriSegment = 'tapiv3/index.php/v3';
const tapiUri = `${apiHost}/${tapiUriSegment}`;
const mimeType = 'application/json';

const tapi = axios.create({
  baseURL: tapiUri,
  timeout: 10000,
  headers: { accept: mimeType, 'content-type': mimeType },
});

const auth = {
  clientID: process.env.TAPI_CLIENT_ID,
  developerAPIKey: process.env.TAPI_API_KEY,
};

const uploadVerificationDocument = (accountId, file) => {
  const data = new FormData();
  data.append('clientID', auth.clientID);
  data.append('developerAPIKey', auth.developerAPIKey);
  data.append('accountId', accountId);
  data.append('documentTitle', `documentTitle0="${file.originalname}"`);
  data.append('userfile', Readable.from(file.buffer), { filename: file.originalname });
  data.append('createdIpAddress', '127.0.0.1');
  
  return tapi.post('/uploadVerificationDocument', data, {
    timeout: 60000,
    headers: { ...data.getHeaders() },
  });
};

const accountId = process.env.TAPI_ACCOUNT_ID;
const fakeFile = {
  buffer: Buffer.from('a'.repeat(1e3)),
  originalname: 'test-verification-file.pdf',
};

const response = await uploadVerificationDocument(accountId, fakeFile);

console.log(response.data);

/*
output:

{
  statusCode: '101',
  statusDesc: 'Ok',
  document_details: 'Document has been uploaded Successfully'
}
*/

Response Parameters

ParameterTypeDescription
statusCodestringAPI Status Code
statusDescstringAPI Status Description
document_detailsstringDocument has been uploaded
Errors(s)string(optional) provides more information about error response

Sample Response

{
  "statusCode": "101",
  "statusDesc": "Ok",
  "document_details": "Document has been uploaded Successfully"
}

Errors

HTTP response codeTAPI error codeDescription
404103Invalid credentials
4001400Invalid content-type (must be multipart/form-data)
4001400No file data set in request
404106Invalid request parameters
404106accountId required but not provided
404148Account is not exist/active
4221422documentTitlemalformed
4221422userfilerequired but not provided
404106File content does not meet minimum byte size requirement (1 kilobyte)

Test it Yourself!

Language
Click Try It! to start a request and see the response here!