Skip to main content

Upload File

Submit document uploads associated with a specific lead using the following structure.

Endpoint

Staging

POST https://missioncapital--full.sandbox.my.salesforce.com/services/apexrest/UploadFileApiV1

Production

POST https://missioncapital.my.salesforce.com/services/apexrest/UploadFileApiV1

Headers

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
Content-Typeapplication/json

Request Body Parameters

FieldTypeDescriptionRequired
leadIdstringThe ID of the lead to associate the file with.Yes
fileobjectObject containing file details.Yes

File Object

FieldTypeDescriptionRequired
namestringThe name of the file (without extension).Yes
extstringThe file extension (e.g., "txt", "pdf", "jpg").Yes
filestringBase64 encoded content of the file.Yes
categorystringCategory of the uploaded document. See 'Allowed Document Categories' below.Yes

Allowed Document Categories

The category field must be one of the following values:

  • Bank Statements - Jan
  • Bank Statements - Feb
  • Bank Statements - Mar
  • Bank Statements - Apr
  • Bank Statements - May
  • Bank Statements - Jun
  • Bank Statements - Jul
  • Bank Statements - Aug
  • Bank Statements - Sept
  • Bank Statements - Oct
  • Bank Statements - Nov
  • Bank Statements - Dec
  • Signed Application
  • Driver's License
  • Voided Check
  • Proof of Citizenship
  • Bank Statements
  • Month to Date Bank Statement(s)
  • Business Tax Return
  • Tax Return Extenstion
  • Year to Date Profit & Loss and Balance Sheet
  • Cuurent Aging AR and AP Report
  • WIP Report
  • Proof of Ownership
  • Operating Agreement
  • Purchase Agreement
  • EIN Letter
  • Utility Bill
  • Proof of Good Standing with the SOS
  • Tax Lien Payment Plan
  • Documentation on UCC Filing(s)
  • Zero Balance letter
  • Payoff Letter
  • Merchant Interview
  • Signed Contracts
  • Bank Verification -Plaid
  • Funding Call
  • Other
  • PSF
  • Bank Letter

Sample Request

{
"leadId": "00QEa00000PCRxLMAX",
"file": {
"name": "example1",
"ext": "txt",
"file": "ew0KImZvcm0iOiB7DQoiZmlyc3ROYW1lIjogIktyenlzenRvZiIsDQoibGFzdE5hbWUiOiAiQ3Vnb3dza2kiLA0KImVtYWlsIjogImpvaG4uZG9lQGV4YW1wbGUuY9lSU0...", // Shortened for brevity
"category": "Bank Statements - Feb"
}
}

Sample Response

This is an example of a successful response:

{
"IsSuccessful": true,
"ResponseMessage": "File has been successfully uploaded",
"DocumentId": "069Qm0000004tTqIAI",
"ReferenceID": "00QEa00000PCRxLMAX"
}

Response Fields

FieldTypeDescription
IsSuccessfulbooleanIndicates whether the request was successful.
ResponseMessagestringA human-readable message providing details about the outcome.
DocumentIdstringThe unique identifier for the uploaded document if successful.
ReferenceIDstringThe leadId that was passed in the request, returned for your reference.

Error Responses

If an error occurs, the IsSuccessful field in the response will be false, and the ResponseMessage will contain a description of the error.

Example Error:

{
"IsSuccessful": false,
"ResponseMessage": "Error: Missing required field: leadId"
}

Common error scenarios include:

  • Invalid or expired Authorization token.
  • Missing required fields in the request body (e.g., leadId, file object, or any of its properties like name, ext, file, category).
  • Invalid values for fields (e.g., leadId does not correspond to an existing lead, category is not one of the allowed values).
  • The file content is not correctly Base64 encoded. '''