Assigning a label to a deal

Couldn’t find in the API reference how to assign a label to a deal
How can I do it ?

Hi Itay,

You should be able to add them similar to how you add Custom Field data, you just need to search the GET /dealFields and find the values IDs attached to ‘label’ and update a person like you would a Custom Field

1 Like

I added “&234234=13” to the end of the add deal request and got (400) Bad Request.
where 234234 is the label’s custom field ID and 13 is the value of an option

Ping, hello, anyone ?

Can you share your full request (minus API token)?

“title=Label+Deal&user_id=11365344&org_id=14206&person_id=14214&stage_id=1&6543b7c219de1a23ff9d830050cca98a2b255648=testing&ed19542873d5d1684419da6ab7586a523454ec6e=5&12485=19”

Please answer quickly,
Thanks

Hi,
Don’t I deserve an answer ?

In the body of the request you just need to include:

"label": "id"

id needs to be the id of an existing label

19 is the id of the label

In this case, you should be able to do something like this (example in Postman):

As a second call after creating the deal ?
If so, can’t I add this to the new deals params ?
If so, this is what I did but it doesn’t work
Do you mean to use “label” instead of “12485” which is the label’s field id ?
Why isn’t it documented anywhere ?

As a second call after creating the deal ?

Do you mean to use “label” instead of “12485” which is the label’s field id ?
For labels, “label” is the key, and the id is added as a value

Why isn’t it documented anywhere ?

  • We plan to add this to documentation in the future

More than 2 weeks later, it works

@Itay

It was exactly what I said in the first message to you.

1 Like

I’m trying to do that throught integromat, but I can’t make it work. I don’t know if I am missing headers or the key and value aren’t correct. I understand the value of the label is the label id that I can see when I get a deal.

Can you help me?

Hi @adrianboor

Could send an example of how it looks for you as you’re trying to make it work with Integromat?

@David - how do I get the IDs of the labels I can attached to a deal? I’ve been contemplating on this for a few days now for some task.

Looking forward to hearing from you. Thanks!

Hi @JamesC,

You should be able to find the IDs of the labels attached to a deal via the GET/dealFields endpoint.

In Postman, I used the GET/dealFields endpoint to get all the fields of my deals. I then searched for ‘label’ and found the ‘label’ field with an array of all my labels and their IDs.

I hope this answers your question for you. Please do let us know if you have further questions.