Update multiple deals with new values for 3 properties


#1

Hi, I’m a complete novice at APIs, REST etc. so please be gentle… I’ve spent 2 nights solid working out how to do the very basic stuff.

I have deals in Hubspot with quotes for customers. My boss now wants the quote dollar value broken down into shipping costs, GST and amount. I have created 2 custom properties i.e. GST_value and shipping_value. (done through the hubspot web i/f not API)

Novice talk now…

I need to populate these properties for all deals (data held in CSV but originally in accounting package MYOB). I found and now using (which could be wrong) the software "Insomnia’ to GET all the DealIds and I’m OK with PUTing the new values into the custom properties… but I can only PUT one deal at a time using HTTPS.

I know what I want to do but how? I could be way off my understanding on how REST works…I’m very old school.

I want to loop round this ‘code’ with each deal and update the properties with the new values. Obviously the value in the JSON changes for each dealid

PUT https://api.hubapi.com/deals/v1/deal/nnn?hapikey=xxx

JSON
{
“properties”: [
{
“name”: “amount”,
“value”: “4750.66”
},
{
“name”: “gst_value”,
“value”: “619.33”
},
{
“name”: “shipping_value”,
“value”: “40.33”
}
]
}

I’m using a very simple way of doing this, is there a better way of updating multiple deals and update the value of 3 properties? I have 100’s deals to update so this is getting very laborious very quickly!

Any advice on how I can achieve this in basic steps?

Really appreciate all the help out there

Regards
Mike