format numeric string

I’m retrieving changed data through the /crm/v3/objects/0-3/search api. The body I’m sending is

{“after”: “0”,
“limit”: 100,
“sorts”: [“lastmodifieddate”
],“properties”: [
“deal_customer_number”,
“opp_account_number”,
“opportunity_id”,
“closed_lost_reason”,
“closedate”,
“createdate”,
“dealname”,
“dealstage”,
“description”,
“product_type”,
“source”,
“hs_deal_stage_probability”,
“hs_projected_amount”,
“hubspot_owner_id”,
“expected_close_date”,
“forecast”,
“gm”],
“filterGroups”: [
{“filters”: [
{“propertyName”: “hs_lastmodifieddate”,
“value”: “2026-03-03T16:50:02Z”,
“operator”: “GT”
},“propertyName”: “pipeline”,
“value”: “default”,
“operator”: “EQ”}]}]}

The problem is I’m receiving data back like below. Is there anyway of limiting the number of decimal places it returns for hs_deal_stage_probability and hs_projected_amount

“id”: “56284170888”,
“properties”: {
“closed_lost_reason”: null,
“closedate”: null,
“createdate”: “2026-02-05T13:49:33Z”,
“deal_customer_number”: “1118276”,
“dealname”: “01.16.2026 1220 EXHIBITS AXS 195959”,
“dealstage”: “qualifiedtobuy”,
“description”: “01.16.2026 1220 EXHIBITS AXS 195959”,
“expected_close_date”: “2026-05-01”,
“forecast”: “11950”,
“gm”: “.4054”,
“hs_deal_stage_probability”: “0.299999999999999988897769753748434595763683319091796875”,
“hs_lastmodifieddate”: “2026-03-03T18:02:19.199Z”,
“hs_object_id”: “56284170888”,
“hs_projected_amount”: “3584.999999999999867328348557293793419376015663146972656250”,
“hubspot_owner_id”: “32613012”,
“opp_account_number”: “61276”,
“opportunity_id”: “62864”,
“product_type”: null,
“source”: null
},

Hi @aemmi,

Unfortunately, there isn’t a way to format the values for properties such as “hs_deal_stage_probability” or “hs_projected_amount” in the payload that is returned by the API. The response will always return raw values.

You would need to extract the values from the payload and process them via code.

Simple example to round “hs_deal_stage_probability” value to two decimal points using javascript

const probability = parseFloat(deal.properties.hs_deal_stage_probability);
const roundedProbability = Number(probability.toFixed(2));

This would turn “0.299999999999999988897769753748434595763683319091796875” into “0.30”

Hope this helps

Thank you for your reply