Get using custom field value (ex: cpf)

Hello,

OK folks?

Does anyone know if it would be possible to query the API through the value of a field?

For example:

The customer has the CPF field, every time I type his CPF, the api will only bring that person’s data.

I tried to apply it in a few ways, but without success. Has anyone done this? Can you give me a direction?

The custom field I need is inside Deals, when I tried to query by field ID, it didn’t work as expected, I brought all Deals.

Thank you for your help.

Welcome to the community @DouglasCarvalhoPereira :wave:

You could use the GET /deals/search endpoint by specifying the term parameter as the customer’s CPF field value and the fields parameter as custom_fields. The search will return the deal’s info, including the deal person’s ID and name.

To get additional info about the person, you could then use the GET /persons/{id} with the person’s ID.

Let us know id you have additional question! :slight_smile: