To get a specific deal with the API, use the same request you use for obtaining all deals but include one additional parameter, the deal_id.

This example can be used for any other module as well, simply swap the module name and deal_id for the other record id of your choice.

// Snapforce API token
$api_token = 'your api token goes here';

// Snapforce username
$api_user = 'your username goes here';

// Module name
$module = "Deals";

// Module ID value
$deal_id = 12345;

// Endpoint url
$url = "$module&deal_id=$deal_id&api_username=$api_user&api_token=$api_token";

// GET request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

echo 'Sending request...' . PHP_EOL;

$output = curl_exec($ch);

// JSON decode returned deal object
$result = json_decode($output, true);

// Snapforce API token
api_token='api token goes here'

// Snapforce username
api_user='username goes here'

// Module name

// Deal ID

// Endpoint url

curl -H 'Content-type: application/json' -url $url