ProductFields

ProductFields represent the near-complete schema for a Product in the context of the company of the authorized user. Each company can have a different schema for their Products, with various custom fields. In the context of using ProductFields as a schema for defining the data fields of a Product, it must be kept in mind that some types of custom fields can have additional data fields which are not separate ProductFields 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 ProductFields. 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 Product and list its keys.

Get all product fields

Copy link
Copy to clipboard
GET

/v1/productFields

Returns data about all product fields

Query parameters

start

integer

Pagination start

Default

0

limit

integer

Items shown per page

Response
200

Get data about all Product Fields

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

      Get one product field

      Copy link
      Copy to clipboard
      GET

      /v1/productFields/{id}

      Returns data about a specific product field.

      Path parameters

      id

      integer

      required

      ID of the Product Field

      Response
      200

      Get the data for a single Product Field

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

        Add a new product field

        Copy link
        Copy to clipboard
        POST

        /v1/productFields

        Adds a new product 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

        array

        When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array, for example:
        [{"label":"red"}, {"label":"blue"}, {"label":"lilac"}]

        field_type

        string

        required

        Type of the field

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

        Values

        varchar

        varchar_auto

        text

        double

        monetary

        date

        set

        enum

        user

        org

        people

        phone

        time

        timerange

        daterange

        address

        Response
        201

        Get the data for a single Product Field

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

          Update a product field

          Copy link
          Copy to clipboard
          PUT

          /v1/productFields/{id}

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

          Path parameters

          id

          integer

          required

          ID of the Product Field

          Body parameters

          application/json

          name

          string

          required

          Name of the field

          options

          array

          When field_type is either set or enum, possible options on update must be supplied as an array of objects each containing id and label, for example: [{"id":1, "label":"red"},{"id":2, "label":"blue"},{"id":3, "label":"lilac"}]

          Response
          200

          Get the data for a single Product Field

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

            Delete multiple product fields in bulk

            Copy link
            Copy to clipboard
            DELETE

            /v1/productFields

            Marks multiple fields as deleted.

            Query parameters

            ids

            string

            required

            Comma-separated field IDs to delete

            Response
            200

            Mark multiple Product Fields as deleted

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

              Delete a product field

              Copy link
              Copy to clipboard
              DELETE

              /v1/productFields/{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 Product Field

              Response
              200

              Delete a Product Field

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

                Subscribe to Pipedrive’s Developer Newsletter