This article will detail how to add a Deal Note or change a Deal Status via our MCA REST API v2.  Keep in mind, to change a deal status in the front end requires you to add a deal note.  This will be the same process through the API.  


Login
 
All calls require two identifying header parameters for credentialing:

1.    X_MCASUITE_APP_ID
2.    X_MCASUITE_APP_TOKEN

Both of these values will be generated by MCA Suite and provided to our customers. Please contact your representative to get these credentials. 
 
URLS: 
 
The Base REST URL will be provided to the customer upon API request.  The URL will be different than our version 1 API.
 
Format:
 
The API will only accept json encoded parameters.


Function:
Name: deal/addNote

Type: POST
Parameters: 


Field NameRequired?TypeDescription
idYes
Integer
Deal ID in MCA Suite
statusYes
StringDeal Status in MCA Suite.  It must match exactly
note
String - 500 maxDescription of the deal note.  We recommend you add "From API".





PHP Example:

This example will add a note to Deal 1166 with description "Generated by API" and change the status of the deal to 'Funded'. 


<?php


$service_url = 'https://xxxxxxxxxxxx/deal/addNote';

$app_id = 'xxxxxx';

$token = 'xxxxx';


$curl = curl_init($service_url);


$data = array("id" => 1166,

"status" => "Funded",

"note"=> "Generated by API"

);

$data_json = json_encode($data);


$headr = array();

$headr[] = 'X_MCASUITE_APP_ID: ' . $app_id;

$headr[] = 'X_MCASUITE_APP_TOKEN: ' . $token;

$headr[] = 'Content-Type: application/json';


curl_setopt($curl, CURLOPT_POST, true);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

curl_setopt($curl, CURLOPT_POSTFIELDS, $data_json);

curl_setopt($curl, CURLOPT_HTTPHEADER, $headr);


$curl_response = curl_exec($curl);

curl_close($curl);


// Check out response message, it will be in json format.

echo $curl_response;


?>