How to add new values to deal labels

Som I’m tryin to add some new values to labels, but it doesnt work for me
req is
[

  1. {
  • “url”:“dealFields/12483”,
  • “body”:"[ { “color”: “blue”, “label”: “VIP”, “id”: 80 }, { “color”: “purple”, “label”: “топ55”, “id”: 154 }, { “color”: “gray”, “label”: “test update”, “id”: 159 }, { “color”: “red”, “label”: “test 2” } ]",
  • “method”:“PUT”,
  • “headers”:[
    1. {
    • “key”:“Content-Type”,
    • “value”:“application/json”}]}

]

resp is ok, but test 2 doent adding, when I’m trying to update a color of label it doesnt work neither
[
{
“color”: “blue”,
“label”: “VIP”,
“id”: 80
},
{
“color”: “purple”,
“label”: “топ55”,
“id”: 154
},
{
“color”: “red”,
“label”: “test update”,
“id”: 159
}
]
resp ok, color or name doesnt changing

Any tips?
support cant help yet.

Hi Matteo,

For test 2, our apologies. We made a small mistake in the code in the Updating and adding label values for Deals, Organizations, and Persons section of our Working with Labels guide.

When you want to update a color or name of a deal field, the data needs to be sent as an object which contains the options property, for example:
{
“options”: [
{
“color”: “green”,
“label”: “Customer”,
“id”: 1
},
{
“color”: “red”,
“label”: “Hot lead”,
“id”: 2
},
{
“color”: “yellow”,
“label”: “Warm lead”,
“id”: 3
},
{
“color”: “blue”,
“label”: “Cold lead”,
“id”: 4
}
]
}

You can copy this code from the Updating and adding label values for Deals, Organizations, and Persons section as well.

Please let me know if this works for you now?

Thanks, it working now :wink:

Great to hear! All the best. :slightly_smiling_face: