Skip To Content

Developer Documenation: Partner Equipment Finance API – Application Status

Json request structure

  1. Submit your request in POST
  2. Headers need to include:
    1. Content-Type : application/json
    2. x-api-key : Your API Key
    3. Authorization : Basic Auth
      1. With your username & password base64 encoded
  3. Body must be as an array which should be formatted as noted in the JSON tab to the right

Examples

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.

Legend

While testing, please use testdevportal. When ready for production, be sure change it to devportal.

The 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.

jQuery(function( $ ) {

	// These variables should be populated from a remote & secure source
	var applicationNumber = '510000343',
		partnerReferenceId = '',
		username = '********',
		password = '********',
		xApiKey = '********-********-********-********',
		requri = 'https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/efappstatus/v1/getEFApplicationStatusApi';

	callEFStatus( applicationNumber, partnerReferenceId, username, password, xApiKey, requri );

	function callEFStatus( applicationNumber, partnerReferenceId, username, password, xApiKey, requri ) {

		var jsonRequest = {
				'Application Number': applicationNumber,
				'Partner Reference Id': partnerReferenceId
			},
			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 )

				} 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 callEFStatus

}); // End Jquery
// These variables should be populated from a remote & secure source
var applicationNumber = '510000343',
	partnerReferenceId = '',
	username = '********',
	password = '********',
	xApiKey = '********-********-********-********-********',
	requri = 'https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/efappstatus/v1/getEFApplicationStatusApi';

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 jsonArr = JSON.parse( respData ),
				respStatus = jsonArr[ 'Status' ],
				respMessage = jsonArr['Application Status'];

		if ( 200 === respCode ) {
			// Good response, now to do something with it.
			var respStatus = respData['Status'],
				respMessage = respData['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/efappstatus/v1/getEFApplicationStatusApi";
$application_number   = '510000343';
$partner_reference_id = '';
$username             = '********';
$password             = '********';
$x_api_key            = '********-********-********-********-********';

$data = [
'Application Number'   => $application_number,
'Partner Reference Id' => $partner_reference_id,
];

$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 Required/Optional Format Sample Values
Application Number Required(Either Partner Reference Id /Application Number is Required) String 510000579
Partner Reference ID Required(Either Partner Reference Id /Application Number is Required) String CD1911270045
Note:
  1. If values are not there or it's OPTIONAL field, please pass empty ("") value to field name as in JSON Format.
  2. For Array Fields , If no values is there just include one array element with all values empty "".
Sample Request JSON

{
"Application Number":"510000348",
"Partner Reference Id":""
}

Sample Response JSON

{ 
    "Status": true,
    "Message": "success",
    "Application Status": "Automatically Approved",
    "ApplicationNumber": "510000348",
    "BusinessName": "Precision Contracting Services Inc",
    "ExternalStips": [
        {
            "StipName": "Corporate Officer or Owner to Sign",
            "StipStatus": "Open"
        },
        {
            "StipName": "Proof of equipment location",
            "StipStatus": "Open"
        }
    ]
}
Note:
  1. Please pass in mentioned JSON Format. Else Dell Boomi - Application Status Fetch API will fail.
  2. If values are not present/Optional please pass empty (" ") value to field name.
HTTP Method POST
Development Environment
URL https://testdevportal.marlincapitalsolutions.com:8077/ws/rest/efappstatus/v1/getEFApplicationStatusApi
Headers
content-type application/json
x-api-key 19ab739e-e10a-4bf9-9cd2-79387860fa4b
Authorization
Username: Devportal UID
Password: Devportal PWD
Production Environment
URL https://devportal.marlincapitalsolutions.com:8077/ws/rest/efappstatus/v1/getEFApplicationStatusApi
Headers
content-type application/json
x-api-key 4edeccb1-2d4e-4a54-8976-6d151f51d2de
Authorization
Username PROD Devportal UID
Password PROD Devportal PWD