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
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_ACCESS_TOKEN |
| Content-Type | application/json |
Request Body Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| leadId | string | The ID of the lead to associate the file with. | Yes |
| file | object | Object containing file details. | Yes |
File Object
| Field | Type | Description | Required |
|---|---|---|---|
| name | string | The name of the file (without extension). | Yes |
| ext | string | The file extension (e.g., "txt", "pdf", "jpg"). | Yes |
| file | string | Base64 encoded content of the file. | Yes |
| category | string | Category 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
| Field | Type | Description |
|---|---|---|
| IsSuccessful | boolean | Indicates whether the request was successful. |
| ResponseMessage | string | A human-readable message providing details about the outcome. |
| DocumentId | string | The unique identifier for the uploaded document if successful. |
| ReferenceID | string | The 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
Authorizationtoken. - Missing required fields in the request body (e.g.,
leadId,fileobject, or any of its properties likename,ext,file,category). - Invalid values for fields (e.g.,
leadIddoes not correspond to an existing lead,categoryis not one of the allowed values). - The
filecontent is not correctly Base64 encoded. '''