Developer Documenation: Working Capital API – Application Submit
Json request structure
- Submit your request in POST
- Headers need to include:
- Content-Type : application/json
- x-api-key : Your API Key
- Authorization : Basic Auth
- With your username & password base64 encoded
- Body must be as an array which should be formatted as shown in the jQuery, javascript and PHP examples to the right
Testing
For initial testing and setup we recommend using postman as your platform to ensure you are preparing and formatting your requests properly.Once you have your structure setup correctly we’ve prepared some basic examples to the right for you to start with while using testdevportal. Of note, these examples will return a sum total error of ownership which can be adjusted by reviewing the owners section.
Legend
While testing, please use testdevportal. When ready for production, be sure change it to devportal.
These highlighted areas you see in the examples to the right represent the variables which will need to be filled with your data. These are sensitive so ensure you are loading them from a remote and secure source.
Some fields are optional. Please see the Field Details for more information about this. If values are not present/Optional please pass empty (" ") value to field name.
If you have a document to upload please be sure to convert your file to base64 before uploading.
jQuery(function( $ ) {
// These variables should be populated from a remote & secure source
var partnerId = '7783311SFVULIAR',
partnerReferenceId = '1234567',
username = '********',
password = '********',
xApiKey = '********-********-********-********',
requri = 'https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/wcl/v1/createWclApi/';
applyWCRequest( partnerId, partnerReferenceId, username, password, xApiKey, requri );
function applyWCRequest( partnerId, partnerReferenceId, username, password, xApiKey, requri ) {
var jsonRequest = {
'PartnerId': partnerId,
'Partner Reference Id': partnerReferenceId,
'Broker Number': '',
'Business Details': {
'Legal Business Name': 'Wcl Api Test9',
'Business Tax ID': '194785345',
'DBA Name': 'test',
'Business Type': 'Partnership',
'Business Start Month': '04',
'Business Start Year': '1992',
'Business Address Line 1': '1210 Brace Rd',
'Business Address Line 2': 'HCL Address2',
'City': 'Medford',
'State': 'NJ',
'Zipcode': '08055',
'Business Phone': '1834567890',
'Business Email': '[email protected]',
'Contact Name': 'WCLApi one',
'Contact Phone': '9492349884',
'CCAN': '',
'CCID': '',
'Billing Address Line 1': '7736 Green Valley Rd',
'Billing Address Line 2': '',
'Billing Address City': 'Wyncote',
'Billing Address State': 'PA',
'Billing Address Zip': '19095',
'Phone Type': 'Mobile'
},
'Amount Needed': '2000',
'Estimated Annual Revenue': '100000',
'Estimated Daily Balance': 'Less than $2,499',
'Purpose of Loan': 'Expansion',
'Offer Pricing Model': 'Indirect',
'Owner Details': [
{
'Business Owner Name': 'Owner WclAPione',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '177006454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
},
{
'Business Owner Name': 'Owner WclAPto',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '166006454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
},
{
'Business Owner Name': 'Owner WclAPithree',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '199996454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
}
],
'Broker Details': {
'Broker Contact Name': 'Broker WCLtest1',
'Broker Email': '[email protected]'
},
'Document Details': [
{
'Attachment': '',
'FileDataEncoded': '',
'FileExtension': '',
'Document Type': '',
'Description': '',
}
]
},
jsonHeaders = {
'Authorization': 'Basic ' + btoa( username + ':' + password, '' ),
'x-api-key': xApiKey
};
$.ajax( {
type: 'POST',
url: requri,
headers: jsonHeaders,
data: JSON.stringify( jsonRequest ),
contentType: 'application/json',
success: function( json ) {
if ( 'true' === json[ 'Status' ] ) {
// Good response, now to do something with it.
console.log( 'success' );
console.log( json );
} else if ( false === json[ 'Status' ] ) {
console.log( 'successful connection but no data in the response' );
console.log( json[ 'Message' ] );
} else {
console.log( 'successful connection but we have an unexpected response' );
console.log( json );
}
}, // End Success
error: function( json ) {
// Something has happened with the communication and we need to do something here.
console.log( 'error with connection' );
console.log( json );
} // End Error
} ); // End Ajax
} // End applyWCRequest
} ); // End Jquery
// These variables should be populated from a remote & secure source
var partnerId = '7783311SFVULIAR',
partnerReferenceId = '1234567',
username = '********',
password = '********',
xApiKey = '********-********-********-********',
requri = 'https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/wcl/v1/createWclApi/',
data = {
'PartnerId': partnerId,
'Partner Reference Id': partnerReferenceId,
'Broker Number': '',
'Business Details': {
'Legal Business Name': 'Wcl Api Test9',
'Business Tax ID': '194785345',
'DBA Name': 'test',
'Business Type': 'Partnership',
'Business Start Month': '04',
'Business Start Year': '1992',
'Business Address Line 1': '1210 Brace Rd',
'Business Address Line 2': 'HCL Address2',
'City': 'Medford',
'State': 'NJ',
'Zipcode': '08055',
'Business Phone': '1834567890',
'Business Email': '[email protected]',
'Contact Name': 'WCLApi one',
'Contact Phone': '9492349884',
'CCAN': '',
'CCID': '',
'Billing Address Line 1': '7736 Green Valley Rd',
'Billing Address Line 2': '',
'Billing Address City': 'Wyncote',
'Billing Address State': 'PA',
'Billing Address Zip': '19095',
'Phone Type': 'Mobile'
},
'Amount Needed': '2000',
'Estimated Annual Revenue': '100000',
'Estimated Daily Balance': 'Less than $2,499',
'Purpose of Loan': 'Expansion',
'Offer Pricing Model': 'Indirect',
'Owner Details': [
{
'Business Owner Name': 'Owner WclAPione',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '177006454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
},
{
'Business Owner Name': 'Owner WclAPto',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '166006454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
},
{
'Business Owner Name': 'Owner WclAPithree',
'Ownership': '78',
'Home Address Line 1': '736 Green Valley Rd',
'Home Address Line 2': '',
'City': 'Wyncote',
'State': 'PA',
'Zipcode': '19095',
'Date of Birth': '1974-01-19',
'Social Security Number': '199996454',
'Business Owner Email': '[email protected]',
'Business Owner Phone': '1234567891'
}
],
'Broker Details': {
'Broker Contact Name': 'Broker WCLtest1',
'Broker Email': '[email protected]'
},
'Document Details': [
{
'Attachment': '',
'FileDataEncoded': '',
'FileExtension': '',
'Document Type': '',
'Description': '',
}
]
};
var xhr = new XMLHttpRequest();
xhr.open("POST", requri);
xhr.setRequestHeader('Accept', 'application/json' );
xhr.setRequestHeader('Authorization', 'Basic ' + btoa( username + ':' + password ) );
xhr.setRequestHeader('x-api-key', xApiKey );
xhr.setRequestHeader('Content-Type', 'application/json' );
xhr.onreadystatechange = function() {
if ( xhr.readyState === 4 ) {
var respCode = xhr.status,
respData = xhr.responseText;
if ( 200 === respCode ) {
// Good response, now to do something with it.
var jsonArr = JSON.parse( respData ),
respStatus = jsonArr[ 'Status' ],
respMessage = jsonArr[ 'Message' ];
if ( true === respStatus ) {
// Good response, now to do something with it.
console.log( 'success' );
console.log( respMessage );
} else if ( false === respStatus ) {
console.log( 'successful connection but no data in the response' );
console.log( respMessage );
} else {
console.log( 'successful connection but we have an unexpected response' );
console.log( respData )
}
} else {
// We did not get a good response status
console.log('bad response code');
console.log( responseCode );
console.log( respData );
}
}
};
xhr.send( JSON.stringify( data ) );
<?php
// These variables should be populated from a remote & secure source
$url = 'https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/wcl/v1/createWclApi/';
$partner_id = '7783311SFVULIAR';
$partner_reference_id = '1234567';
$username = '********';
$password = '********';
$x_api_key = '********-********-********-********-********';
$data = [
'PartnerId' => $partner_id,
'Partner Reference Id' => $partner_reference_id,
'Broker Number' => '',
'Business Details' => [
'Legal Business Name' => 'Wcl Api Test9',
'Business Tax ID' => '194785345',
'DBA Name' => 'test',
'Business Type' => 'Partnership',
'Business Start Month' => '04',
'Business Start Year' => '1992',
'Business Address Line 1' => '1210 Brace Rd',
'Business Address Line 2' => 'HCL Address2',
'City' => 'Medford',
'State' => 'NJ',
'Zipcode' => '08055',
'Business Phone' => '1834567890',
'Business Email' => '[email protected]',
'Contact Name' => 'WCLApi one',
'Contact Phone' => '9492349884',
'CCAN' => '',
'CCID' => '',
'Billing Address Line 1' => '7736 Green Valley Rd',
'Billing Address Line 2' => '',
'Billing Address City' => 'Wyncote',
'Billing Address State' => 'PA',
'Billing Address Zip' => '19095',
'Phone Type' => 'Mobile'
],
'Amount Needed' => '2000',
'Estimated Annual Revenue' => '100000',
'Estimated Daily Balance' => 'Less than $2,499',
'Purpose of Loan' => 'Expansion',
'Offer Pricing Model': 'Indirect',
'Owner Details' => [
[
'Business Owner Name' => 'Owner WclAPione',
'Ownership' => '78',
'Home Address Line 1' => '736 Green Valley Rd',
'Home Address Line 2' => '',
'City' => 'Wyncote',
'State' => 'PA',
'Zipcode' => '19095',
'Date of Birth' => '1974-01-19',
'Social Security Number' => '177006454',
'Business Owner Email' => '[email protected]',
'Business Owner Phone' => '1234567891'
],
[
'Business Owner Name' => 'Owner WclAPto',
'Ownership' => '78',
'Home Address Line 1' => '736 Green Valley Rd',
'Home Address Line 2' => '',
'City' => 'Wyncote',
'State' => 'PA',
'Zipcode' => '19095',
'Date of Birth' => '1974-01-19',
'Social Security Number' => '166006454',
'Business Owner Email' => '[email protected]',
'Business Owner Phone' => '1234567891'
],
[
'Business Owner Name' => 'Owner WclAPithree',
'Ownership' => '78',
'Home Address Line 1' => '736 Green Valley Rd',
'Home Address Line 2' => '',
'City' => 'Wyncote',
'State' => 'PA',
'Zipcode' => '19095',
'Date of Birth' => '1974-01-19',
'Social Security Number' => '199996454',
'Business Owner Email' => '[email protected]',
'Business Owner Phone' => '1234567891'
]
],
'Broker Details' => [
'Broker Contact Name' => 'Broker WCLtest1',
'Broker Email' => '[email protected]'
],
'Document Details' => [
[
'Attachment' => '',
'FileDataEncoded' => '',
'FileExtension' => '',
'Document Type' => '',
'Description' => '',
]
]
];
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_URL, $url );
curl_setopt( $curl, CURLOPT_POST, true );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
$headers = array(
'Accept: application/json',
'Content-Type: application/json',
'Authorization: Basic ' . base64_encode( $username . ':' . $password ),
'x-api-key: ' . $x_api_key,
);
curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers );
$json_data = json_encode( $data );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $json_data );
// FOR DEBUGGNIG ONLY!! DO NOT USE IN PRODUCTION
curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, false );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
// END DEBUGGING
$resp = json_decode( curl_exec( $curl ) );
curl_close( $curl );
if ( isset( $resp->Status) ) {
// We have a response lets confirm what it is and go from there.
if ( true == $resp->Status ) {
// Good response, now to do something with it.
var_dump( 'successful connection' );
var_dump( $resp );
} elseif ( false == $resp->Status ) {
var_dump( 'successful connection but no data in the response' );
var_dump( $resp );
} else {
var_dump( 'successful connection but we have an unexpected response' );
var_dump( $resp );
}
} else {
var_dump( 'Bad response, no status detected' );
var_dump( $resp );
}
JSON Field Name | Parameter | Format | Sample Values | Default Values | Comments |
---|---|---|---|---|---|
PartnerId | Required(Either Partner Id /Broker Number is Required) | String | 8042971FIOMIQAY | ||
Partner Reference Id | Optional | String | 855331.7237 | ||
Broker Number | Required(Either Partner Id /Broker Number is Required) | String | CD1911130624 | ||
Business Details | Object | ||||
Legal Business Name | Required | String | Business@123 ( max length should be 50) | ||
Business Tax ID | Required | String (9 digit Numeric value) | 123645987(max length 9) | ||
DBA Name | Required | String | DBA@123 ( max dbalength should be 50) | Its Optional but mentioned as required | |
Business Type | Required | String | Partnership(Any one from default values) | Sole proprietorship Partnership Corporation Limited Liability Company (LLC) |
|
Business Start Month | Optional | String | Any one from default values based on the Month as "01"-"12" | JAN = "01", FEB = "02", MAR = "03", APR = "04", MAY = "05", JUNE = "06", JULY = "07", AUG = "08", SEP = "09", OCT = "10", NOV = "11", DEC = "12" |
|
Business Start Year | Optional | String | 2015(Max length of 4) | ||
Business Address Line 1 | Required | String | 1234 Market St | ||
Business Address Line 2 | Optional | String | Line 2 | ||
City | Required | String | Iowa | ||
State | Required | String | Any one state code from default value based on the state. (Max length 2) |
AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY | |
Zipcode | Required | String | 12345(Max length of 5) | ||
Business Phone | Required | String (10 digit Numeric Value) | 1122334455(Max length of 10) | ||
Business Email | Required | String -Valid email Format | [email protected] | Its Optional but mentioned as required | |
Contact Name | Required | String - Letters Only ( A- Z) | Two Words (i.e; required first name and last name, letters only a-z and A-Z), FirstName (max length 40), LastName( max length 80) | Its Optional but mentioned as required | |
Contact Phone | Required | String(10 digit Numeric Value) | 1122334455(Max length of 10) | Its Optional but mentioned as required | |
Phone Type | Required | String | Mobile(any one of the default values) | Mobile,Other | |
CCAN | Optional | String(7 digit Numeric Value) | 1234567(Max length of 7) | ||
CCID | Optional | String(7 Digit Alpha Numeric Value) | C234567(Max length of 7) | ||
Billing Address Line 1 | Optional | String(Alphanumeric Values) | 1234 Market St | ||
Billing Address Line 2 | Optional | String(Alphanumeric Values) | Line 2 | ||
Billing Address City | Optional | String | Philadelphia | ||
Billing Address State | Optional | String | Any one state code from default value based on the state. (Max length 2) |
AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY | |
Billing Address Zip | Optional | String | 12345(Max length of 5) | ||
Amount Needed | Required | String(Numeric Value) | 5000 | 1000 to 250000 | |
Estimated Annual Revenue | Required | String(Numeric Value) | 500000 | Value between 10000 and 10000000 | |
Estimated Daily Balance | Optional | String | $2,500 - $6,499(Any one from default values) | Less than $2,499', '$2,500 - $6,499', '$6,500 - $34,999', '$35,000 - $49,999', 'More than $50,000' |
|
Purpose of Loan | Required | String | Expansion(Any one from default values) | Purchase Inventory, Equipment/Technology, Marketing Campaign, Expansion, Debt Consolidation/Refinance, Reduce Accounts Payable, Cash Crunch |
|
Offer Pricing Model | Optional | String | Any one from default values | Indirect,Direct,Direct-Referral,LendingTree, | |
Owner Details | Array (Max of three owners can be added) | ||||
Business Owner Name | Required | String | Peter Mark, FirstName (max length 40), LastName (max length 80) | ||
Ownership | Required | String(Numeric Value) | 51 | Sum of ownership percentage should be within 51-100 | |
Home Address Line 1 | Required | String | 1234 Market St | ||
Home Address Line 2 | Optional | String | Line 2 | ||
City | Required | String | Philadelphia | ||
State | Required | String | Any one state code from default value based on the state. (Max length 2) |
AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY | |
Zipcode | Required | String | 12345(Max length of 5) | ||
Date of Birth | Required | String | YYYY-MM-DD | ||
Social Security Number | Required | String | 9 Digit number | ||
Business Owner Email | Required | String | [email protected] | ||
Business Owner Phone | Required | String | 1122334455(Max length of 10) | ||
Broker Details | object | ||||
Broker Contact Name | Optional | String | Two Words (i.e; required first name and last name, letters only a-z and A-Z), FirstName (max length 40), LastName (max length 80) | ||
Broker Email | Optional | String -Valid email Format | [email protected] | ||
Document Details | Array | ||||
Attachment | Optional | String | Test document | Name of the attached doc | |
FileDataEncoded | Optional | String | Base 64 String here | Base 64 encoded string | |
fileExtension | Optional | String | uploaded file type extension | ||
Document Type | Optional | String | FS - Bank Statements - Aug(any one of the default value) | FS - Bank Statements - Jan FS - Bank Statements - Feb FS - Bank Statements - Mar FS - Bank Statements - Apr FS - Bank Statements - May FS - Bank Statements - Jun FS - Bank Statements - Jul FS - Bank Statements - Aug FS - Bank Statements - Sept FS - Bank Statements - Oct FS - Bank Statements - Nov FS - Bank Statements - Dec FS - Competitor Payoff FS - Credit Application FS - Financial Statements FS - Tax Returns FS - Voided Check FS - Landlord Reference FS - Lease Agreement FS - Mortgage Statement FS - Payoff Agreement FS - Signed Loan Agreement FS - Drivers License FS - Clear Report FS - Misc FS - Lexis Nexis FS - Site Inspection FS - UCC Data FS - Welcome Call FS - SOS/License Verification FS - Bank Statements MTD |
|
Description | Optional | String | Bank document uploaded |
Sample Request JSON
{
"PartnerId": partnerId,
"Partner Reference Id": partnerReferenceId,
"Broker Number": "",
"Business Details": {
"Legal Business Name": "Wcl Api Test9",
"Business Tax ID": "194785345",
"DBA Name": "test",
"Business Type": "Partnership",
"Business Start Month": "04",
"Business Start Year": "1992",
"Business Address Line 1": "1210 Brace Rd",
"Business Address Line 2": "HCL Address2",
"City": "Medford",
"State": "NJ",
"Zipcode": "08055",
"Business Phone": "1834567890",
"Business Email": "[email protected]",
"Contact Name": "WCLApi one",
"Contact Phone": "9492349884",
"CCAN": "",
"CCID": "",
"Billing Address Line 1": "7736 Green Valley Rd",
"Billing Address Line 2": "",
"Billing Address City": "Wyncote",
"Billing Address State": "PA",
"Billing Address Zip": "19095",
"Phone Type": "Mobile"
},
"Amount Needed": "2000",
"Estimated Annual Revenue": "100000",
"Estimated Daily Balance": "Less than $2,499",
"Purpose of Loan": "Expansion",
"Offer Pricing Model": "Indirect",
"Owner Details": [
{
"Business Owner Name": "Owner WclAPione",
"Ownership": "78",
"Home Address Line 1": "736 Green Valley Rd",
"Home Address Line 2": "",
"City": "Wyncote",
"State": "PA",
"Zipcode": "19095",
"Date of Birth": "1974-01-19",
"Social Security Number": "177006454",
"Business Owner Email": "[email protected]",
"Business Owner Phone": "1234567891"
},
{
"Business Owner Name": "Owner WclAPto",
"Ownership": "78",
"Home Address Line 1": "736 Green Valley Rd",
"Home Address Line 2": "",
"City": "Wyncote",
"State": "PA",
"Zipcode": "19095",
"Date of Birth": "1974-01-19",
"Social Security Number": "166006454",
"Business Owner Email": "[email protected]",
"Business Owner Phone": "1234567891"
},
{
"Business Owner Name": "Owner WclAPithree",
"Ownership": "78",
"Home Address Line 1": "736 Green Valley Rd",
"Home Address Line 2": "",
"City": "Wyncote",
"State": "PA",
"Zipcode": "19095",
"Date of Birth": "1974-01-19",
"Social Security Number": "199996454",
"Business Owner Email": "[email protected]",
"Business Owner Phone": "1234567891"
}
],
"Broker Details": {
"Broker Contact Name": "Broker WCLtest1",
"Broker Email": "[email protected]"
},
"Document Details": [
{
"Attachment": "",
"FileDataEncoded": "",
"FileExtension": "",
"Document Type": "",
"Description": "",
}
]
}
Sample Response JSON
{
"Status": "false",
"Message": "Sum of ownership percentage should be within 51-100,\r\n"
}
HTTP Method | POST |
---|---|
Development Environment | |
URL | https:// |
Headers | |
content-type | application/json |
x-api-key | YOUR DEV X API KEY |
Authorization | |
Type : Basic Auth | UserName: YOUR DEV USERNAME Password: YOUR DEV PASSWORD |
Production Environment | |
URL | https:// |
Headers | |
content-type | application/json |
x-api-key | YOU X API KEY |
Authorization | |
Type : Basic Auth | UserName: YOUR USERNAME Password: YOUR PASSWORD |