PersonFields

PersonFields represent the near-complete schema for a Person in the context of the company of the authorized user. Each company can have a different schema for their Persons, with various custom fields. In the context of using PersonFields as a schema for defining the data fields of a Person, it must be kept in mind that some types of custom fields can have additional data fields which are not separate PersonFields per se. Such is the case with monetary, daterange and timerange fields – each of these fields will have one additional data field in addition to the one presented in the context of PersonFields. For example, if there is a monetary field with the key ffk9s9 stored on the account, ffk9s9 would hold the numeric value of the field, and ffk9s9_currency would hold the ISO currency code that goes along with the numeric value. To find out which data fields are available, fetch one Person and list its keys.

Get all person fields

Copy link
Copy to clipboard
GET

/v1/personFields

Returns data about all person fields

Query parameters

start

integer

Pagination start

Default

0

limit

integer

Items shown per page

Response
200

success

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

      Get one person field

      Copy link
      Copy to clipboard
      GET

      /v1/personFields/{id}

      Returns data about a specific person field.

      Path parameters

      id

      integer

      required

      ID of the field

      Response
      200

      success

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

        Add a new person field

        Copy link
        Copy to clipboard
        POST

        /v1/personFields

        Adds a new person field. For more information on adding a new custom field, see this tutorial.

        Body parameters

        application/json

        name

        string

        required

        Name of the field

        options

        string

        When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. Example: [{"label":"New Item"}]

        add_visible_flag

        boolean

        Whether the field is available in 'add new' modal or not (both in web and mobile app)

        Default

        true

        Values

        true

        false

        field_type

        string

        required

        Type of the field

        ValueDescription
        addressAddress field (has multiple subfields, autocompleted by Google Maps)
        dateDate (format YYYY-MM-DD)
        daterangeDate-range field (has a start date and end date value, both YYYY-MM-DD)
        doubleNumeric value
        enumOptions field with a single possible chosen option
        intInteger value
        monetaryMonetary field (has a numeric value and a currency value)
        orgOrganization field (contains an organization ID which is stored on the same account)
        peoplePerson field (contains a person ID which is stored on the same account)
        phonePhone field (up to 255 numbers and/or characters)
        setOptions field with a possibility of having multiple chosen options
        textLong text (up to 65k characters)
        timeTime field (format HH:MM:SS)
        timerangeTime-range field (has a start time and end time value, both HH:MM:SS)
        userUser field (contains a user ID of another Pipedrive user)
        varcharText (up to 255 characters)
        varchar_autoAutocomplete text (up to 255 characters)
        visible_toSystem field that keeps item's visibility setting

        Values

        address

        date

        daterange

        double

        enum

        int

        monetary

        org

        people

        phone

        set

        text

        time

        timerange

        user

        varchar

        varchar_auto

        visible_to

        Response
        200

        success

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

          Update a person field

          Copy link
          Copy to clipboard
          PUT

          /v1/personFields/{id}

          Updates a person field. See an example of updating custom fields’ values in this tutorial.

          Path parameters

          id

          integer

          required

          ID of the field

          Body parameters

          application/json

          name

          string

          Name of the field

          options

          string

          When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{"id":123,"label":"Existing Item"},{"label":"New Item"}]

          add_visible_flag

          boolean

          Whether the field is available in 'add new' modal or not (both in web and mobile app)

          Default

          true

          Values

          true

          false

          Response
          200

          success

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

            Delete multiple person fields in bulk

            Copy link
            Copy to clipboard
            DELETE

            /v1/personFields

            Marks multiple fields as deleted.

            Query parameters

            ids

            string

            required

            Comma-separated field IDs to delete

            Response
            200

            success

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

              Delete a person field

              Copy link
              Copy to clipboard
              DELETE

              /v1/personFields/{id}

              Marks a field as deleted. For more information on how to delete a custom field, see this tutorial.

              Path parameters

              id

              integer

              required

              ID of the field

              Response
              200

              success

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

                Subscribe to Pipedrive’s Developer Newsletter