ItemSearch

Ordered reference objects, pointing to either Deals, Persons, Organizations, Leads, Products, Files or Mail Attachments.

Perform a search from multiple item types

Copy link
Copy to clipboard
GET

/v1/itemSearch

Performs a search from your choice of item types and fields.

Query parameters

term

string

required

The search term to look for. Minimum 2 characters (or 1 if using exact_match).

item_types

string

A comma-separated string array. The type of items to perform the search from. Defaults to all.

Values

deal

person

organization

product

lead

file

mail_attachment

fields

string

A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:

Item typeField
Dealcustom_fields, notes, title
Personcustom_fields, email, name, notes, phone
Organizationaddress, custom_fields, name, notes
Productcode, custom_fields, name
Leademail, organization_name, person_name, phone, title
Filename
Mail attachmentname

When searching for Leads, the email, organization_name, person_name, and phone fields will return results only for Leads not linked to contacts. For searching Leads by Person or Organization values, please use search_for_related_items.

Values

address

code

custom_fields

email

name

notes

organization_name

person_name

phone

title

search_for_related_items

boolean

When enabled, the response will include up to 100 newest related Leads and 100 newest related Deals for each found Person and Organization and up to 100 newest related Persons for each found Organization.

Values

true

false

exact_match

boolean

When enabled, only full exact matches against the given term are returned. It is not case sensitive.

Values

true

false

include_fields

string

A comma-separated string array. Supports including optional fields in the results which are not provided by default.

Values

deal.cc_email

person.picture

product.price

start

integer

Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter.

Default

0

limit

integer

Items shown per page

Response
200

success

Expand all
Copy code
    • true
    • { ... }
      • { ... }

      Perform a search using a specific field from an item type

      Copy link
      Copy to clipboard
      GET

      /v1/itemSearch/field

      Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (Deals, Persons, Organizations or Products).

      Query parameters

      term

      string

      required

      The search term to look for. Minimum 2 characters (or 1 if using exact_match).

      field_type

      string

      required

      The type of the field to perform the search from

      Values

      dealField

      personField

      organizationField

      productField

      exact_match

      boolean

      When enabled, only full exact matches against the given term are returned. The search is case sensitive.

      Values

      true

      false

      field_key

      string

      required

      The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields' API GET methods (dealFields, personFields, etc.).

      return_item_ids

      boolean

      Whether to return the IDs of the matching items or not. When not set or set to 0 or false, only distinct values of the searched field are returned. When set to 1 or true, the ID of each found item is returned.

      Values

      true

      false

      start

      integer

      Pagination start

      limit

      integer

      Items shown per page

      Response
      200

      success

      Subscribe to Pipedrive’s Developer Newsletter