ProductFields

Product fields 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 product fields 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 product fields 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 product fields. 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

Returns metadata about all product fields in the company.

Cost

10

Request
GET

/api/v2/productFields

Query parameters

include_fields

string

Optional comma separated string array of additional data namespaces to include in response

Values

ui_visibility

limit

integer

For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.

cursor

string

For pagination, the marker (an opaque string value) representing the first item on the next page

Response
200

OK

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

      Get one product field

      Copy link

      Returns metadata about a specific product field.

      Cost

      1

      Request
      GET

      /api/v2/productFields/{field_code}

      Path parameters

      field_code

      string

      required

      The unique code identifying the field

      Query parameters

      include_fields

      string

      Optional comma separated string array of additional data namespaces to include in response

      Values

      ui_visibility

      Response
      200

      OK

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

        Add a new product field

        Copy link

        Creates a new product custom field.

        Cost

        5

        Request
        POST

        /api/v2/productFields

        Body parameters

        application/json

        field_name

        string

        required

        Field name

        field_type

        string

        required

        The 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

        Values

        varchar

        text

        double

        phone

        date

        daterange

        time

        timerange

        set

        enum

        varchar_auto

        address

        monetary

        org

        people

        user

        options

        array

        Field options (required for enum and set field types)

        ui_visibility

        object

        UI visibility settings for the field. Controls where the field appears in the Pipedrive web UI. Note that products have a simpler visibility model than other entity types.

        description

        string

        Field description

        Response
        200

        OK

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

          Add product field options in bulk

          Copy link

          Adds new options to a product custom field that supports options (enum or set field types). This operation is atomic - all options are added or none are added. Returns only the newly added options.

          Cost

          5

          Request
          POST

          /api/v2/productFields/{field_code}/options

          Path parameters

          field_code

          string

          required

          The unique code identifying the field

          Body parameters

          application/json

          [ ]

          array

          Array of options to add. Each item must contain a label. At least one option is required.

          label

          string

          required

          The display label for the new option

          Response
          200

          OK

          Expand all
          Copy code
            • true
            • [ ... ]
              • null

            Update a product field

            Copy link

            Updates a product custom field. The field_code and field_type cannot be changed. At least one field must be provided in the request body.

            Cost

            5

            Request
            PATCH

            /api/v2/productFields/{field_code}

            Path parameters

            field_code

            string

            required

            The unique code identifying the field

            Body parameters

            application/json

            field_name

            string

            Field name

            ui_visibility

            object

            UI visibility settings for the field. Controls where the field appears in the Pipedrive web UI. Note that products have a simpler visibility model than other entity types.

            description

            string

            Field description

            Response
            200

            OK

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

              Update product field options in bulk

              Copy link

              Updates existing options for a product custom field. This operation is atomic and fails if any of the specified option IDs do not exist. Returns only the updated options.

              Cost

              5

              Request
              PATCH

              /api/v2/productFields/{field_code}/options

              Path parameters

              field_code

              string

              required

              The unique code identifying the field

              Body parameters

              application/json

              [ ]

              array

              Array of options to update. Each item must contain an ID and the updated label. At least one option is required. The entire request fails if any option does not exist.

              id

              integer

              required

              The unique identifier of the option to update

              label

              string

              required

              The new display label for the option

              Response
              200

              OK

              Expand all
              Copy code
                • true
                • [ ... ]
                  • null

                Delete multiple product fields in bulk

                Copy link

                Marks multiple fields as deleted.

                Cost

                10

                Request
                DELETE

                /v1/productFields

                Query parameters

                ids

                string

                required

                The comma-separated field IDs to delete

                Response
                200

                OK

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

                  Delete a product field

                  Copy link

                  Marks a custom field as deleted.

                  Cost

                  3

                  Request
                  DELETE

                  /api/v2/productFields/{field_code}

                  Path parameters

                  field_code

                  string

                  required

                  The unique code identifying the field

                  Response
                  200

                  OK

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

                    Delete product field options in bulk

                    Copy link

                    Removes existing options from a product custom field. This operation is atomic and fails if any of the specified option IDs do not exist. Returns only the deleted options.

                    Cost

                    3

                    Request
                    DELETE

                    /api/v2/productFields/{field_code}/options

                    Path parameters

                    field_code

                    string

                    required

                    The unique code identifying the field

                    Body parameters

                    application/json

                    [ ]

                    array

                    Array of option IDs to delete. Each item must contain an ID of the option to delete. At least one option ID is required. The entire request fails if any option does not exist.

                    id

                    integer

                    required

                    The unique identifier of the option to delete

                    Response
                    200

                    OK

                    Expand all
                    Copy code
                      • true
                      • [ ... ]
                        • null

                      Subscribe to Pipedrive’s Developer Newsletter