GET Deal - radio select responses showing internal value

Hi! When I make a call to GET deal (/deals/v1/deal/:dealId), I can see in the response (found here https://legacydocs.hubspot.com/docs/methods/deals/get_deal) for example:

"dealstage": {
 "value": "closedwon",

Seems like for field type “radio select” I’m getting the internal value back in the response.. is there any way to get hold of the Label value instead? shown in the photo


api

Thanks!

Henrietta

Hello @henriettacooler !

A similar question was asked here

The tl;dr is you will have to hit the properties API to find the label in the response

Hi Dennis,

thanks for quick reply :slightly_smiling_face: will check it out!

Best,

Henrietta

Hi @henriettacooler ,

No, Only those value selected with you have submitted. But you can try below code for only listing closedwon
<?php
$hapikey = ‘demo’;
$json_data = json_encode([
“filterGroups”=>[
[
“filters”=>[
[
“propertyName” => “dealstage”,
“operator” => “EQ”,
“value” => ‘closedwon’
]
]
]
]
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘https://api.hubapi.com/crm/v3/objects/deals/search?hapikey=’.$hapikey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
$headers = array();
$headers[] = ‘Content-Type: application/json’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo ‘Error:’ . curl_error($ch);
}
curl_close($ch);
$result = json_decode($result);
print_r($result);
die;
?>
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.