Search Deal: include_fields not allowing won_time

I am trying to return the won_time of a deal from the search deal (Pipedrive API v1 Reference) endpoint however receive the following error:

ServerError [ERR_INVALID_INPUT]: Invalid input: "includeFields[0]" must be one of [deal.cc_email, deal.next_activity]

I have tried to use the following values when defining include_fields with no luck:

  • won_time
  • deal.won_time

Am I missing something here?

Hello :wave: @charltondurie, welcome to the community!

when searching deals, only those two (deal.cc_email, deal.next_activity) are valid values for the include_fields query parameters.

The search endpoint for deals returns only limited values. A won_time is sadly not one of them.

After you perform the search you can get the id of a found deal and call Get details of a deal endpoint which contains the value.