API Reference / Deal Fields

GET /deal_fields

Get the list of deal fields (for the logged API user's account)

Returns the custom fields defined for deals on your account — id, name, type, position and, for select_box and multiple_choice fields, their choices. Deal fields are separate from contact and company custom fields.

Query parameters

Name Type Description
sort_by string Specify field by which to order the results (use in conjunction with `order`)
order string Specify the order (ascending or descending) of the sort of the results (use in conjunction with `sort_by`)
page integer Page number. Starts from 1. Default is 1.
per_page integer Number of records to return. Maximum 100 allowed. Default is 10.

Responses

200 OK
  • statusintegerint32

    Response code

  • messagestring

    Response message

  • timestampintegerunix-timestamp

    Response time

  • dataobject
    object fields →
    • deal_fieldsarray<object>
      array item fields →
      • deal_fieldobject

        Extra user-configurable data fields for Deals. Only editable by admins.

        object fields →
        • idstringbson-id

          ID of the deal field

        • namestringrequired

          Name of the deal field

        • typestringrequired

          Type of the deal field. There are several types of custom fields that may store data in different formats. External ID type is a special type introduced for referencing entities in the external systems. Its value is unique amid the whole system. Section divider type is introduced just for visual purpose: it allows grouping custom fields. If custom fields in the section don't have values then they are hidden in the 'view' UI (but always shown in 'edit' UI). This logic is applied in the API: if a deal doesn't have values for all the custom fields in the section then this section divider custom field isn't exposed in the API (along with other custom fields inside the section).

          enum: date · multi_line_text · multiple_choice · number · select_box · single_line_text · external_id · section_divider

        • positionintegerint32

          The position of the deal field in the list

        • choicesarray<string>

          A list of possible choices (for fields of type `multiple_choice` or `select_box`)

      • total_countintegerint32

        Total number of items

      • pageintegerint32

        Current page number

      • per_pageintegerint32

        Number of items returned in each page

      • max_pageintegerint32

        The page number of the last page of items

Standard error responses: 400 · 401 · 403 · 404 · 409 · 500 — shared across the API. See Errors.

Related guides