DealProducts

Deal products are goods or services attached to a deal. Each deal product links a product to a deal with configurable quantity, pricing, and discounts, and contributes to the total value of the deal.

List products attached to a deal

Copy link

Lists products attached to a deal.

Cost

10

Request
GET

/api/v2/deals/{id}/products

Path parameters

id

integer

required

The ID of the deal

Query parameters

cursor

string

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

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.

sort_by

string

The field to sort by. Supported fields: id, add_time, update_time, order_nr.

Default

id

Values

id

add_time

update_time

order_nr

sort_direction

string

The sorting direction. Supported values: asc, desc.

Default

asc

Values

asc

desc

Response
200

OK

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

      Get deal products of several deals

      Copy link

      Returns data about products attached to deals

      Cost

      10

      Request
      GET

      /api/v2/deals/products

      Query parameters

      deal_ids

      array

      required

      An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.

      cursor

      string

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

      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.

      sort_by

      string

      The field to sort by. Supported fields: id, deal_id, add_time, update_time, order_nr.

      Default

      id

      Values

      id

      deal_id

      add_time

      update_time

      order_nr

      sort_direction

      string

      The sorting direction. Supported values: asc, desc.

      Default

      asc

      Values

      asc

      desc

      Response
      200

      OK

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

          Add a product to a deal

          Copy link

          Adds a product to a deal, creating a new item called a deal-product.

          Cost

          5

          Request
          POST

          /api/v2/deals/{id}/products

          Path parameters

          id

          integer

          required

          The ID of the deal

          Body parameters

          application/json

          product_id

          integer

          required

          The ID of the product

          item_price

          number

          required

          The price value of the product

          quantity

          number

          required

          The quantity of the product

          tax

          number

          The product tax

          Default

          0

          comments

          string

          The comments of the product

          discount

          number

          The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

          Default

          0

          is_enabled

          boolean

          Whether this product is enabled for the deal

          Not possible to disable the product if the deal has installments associated and the product is the last one enabled

          Not possible to enable the product if the deal has installments associated and the product is recurring

          Default

          true

          tax_method

          string

          The tax option to be applied to the products. When using inclusive, the tax percentage will already be included in the price. When using exclusive, the tax will not be included in the price. When using none, no tax will be added. Use the tax field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal

          Values

          exclusive

          inclusive

          none

          discount_type

          string

          The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

          Default

          percentage

          Values

          percentage

          amount

          product_variation_id

          integer

          The ID of the product variation

          billing_frequency

          string

          Only available in Growth and above plans

          How often a customer is billed for access to a service or product

          To set billing_frequency different than one-time, the deal must not have installments associated

          A deal can have up to 20 products attached with billing_frequency different than one-time

          Default

          one-time

          Values

          one-time

          annually

          semi-annually

          quarterly

          monthly

          weekly

          billing_frequency_cycles

          integer

          Only available in Growth and above plans

          The number of times the billing frequency repeats for a product in a deal

          When billing_frequency is set to one-time, this field must be null

          When billing_frequency is set to weekly, this field cannot be null

          For all the other values of billing_frequency, null represents a product billed indefinitely

          Must be a positive integer less or equal to 208

          billing_start_date

          string

          Only available in Growth and above plans

          The billing start date. Must be between 10 years in the past and 10 years in the future

          Format

          YYYY-MM-DD

          Response
          201

          Created

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

            Add multiple products to a deal

            Copy link

            Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.

            Cost

            25

            Request
            POST

            /api/v2/deals/{id}/products/bulk

            Path parameters

            id

            integer

            required

            The ID of the deal

            Body parameters

            application/json

            data

            array

            required

            Array of products to attach to the deal. Each product object may have the following properties.

            product_id

            integer

            required

            The ID of the product

            item_price

            number

            required

            The price value of the product

            quantity

            number

            required

            The quantity of the product

            tax

            number

            The product tax

            Default

            0

            comments

            string

            The comments of the product

            discount

            number

            The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

            Default

            0

            is_enabled

            boolean

            Whether this product is enabled for the deal

            Not possible to disable the product if the deal has installments associated and the product is the last one enabled

            Not possible to enable the product if the deal has installments associated and the product is recurring

            Default

            true

            tax_method

            string

            The tax option to be applied to the products. When using inclusive, the tax percentage will already be included in the price. When using exclusive, the tax will not be included in the price. When using none, no tax will be added. Use the tax field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal

            Values

            exclusive

            inclusive

            none

            discount_type

            string

            The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

            Default

            percentage

            Values

            percentage

            amount

            product_variation_id

            integer

            The ID of the product variation

            billing_frequency

            string

            Only available in Growth and above plans

            How often a customer is billed for access to a service or product

            To set billing_frequency different than one-time, the deal must not have installments associated

            A deal can have up to 20 products attached with billing_frequency different than one-time

            Default

            one-time

            Values

            one-time

            annually

            semi-annually

            quarterly

            monthly

            weekly

            billing_frequency_cycles

            integer

            Only available in Growth and above plans

            The number of times the billing frequency repeats for a product in a deal

            When billing_frequency is set to one-time, this field must be null

            When billing_frequency is set to weekly, this field cannot be null

            For all the other values of billing_frequency, null represents a product billed indefinitely

            Must be a positive integer less or equal to 208

            billing_start_date

            string

            Only available in Growth and above plans

            The billing start date. Must be between 10 years in the past and 10 years in the future

            Format

            YYYY-MM-DD

            Response
            201

            Created

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

              Update the product attached to a deal

              Copy link

              Updates the details of the product that has been attached to a deal.

              Cost

              5

              Request
              PATCH

              /api/v2/deals/{id}/products/{product_attachment_id}

              Path parameters

              id

              integer

              required

              The ID of the deal

              product_attachment_id

              integer

              required

              The ID of the deal-product (the ID of the product attached to the deal)

              Body parameters

              application/json

              product_id

              integer

              The ID of the product

              item_price

              number

              The price value of the product

              quantity

              number

              The quantity of the product

              tax

              number

              The product tax

              Default

              0

              comments

              string

              The comments of the product

              discount

              number

              The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

              Default

              0

              is_enabled

              boolean

              Whether this product is enabled for the deal

              Not possible to disable the product if the deal has installments associated and the product is the last one enabled

              Not possible to enable the product if the deal has installments associated and the product is recurring

              Default

              true

              tax_method

              string

              The tax option to be applied to the products. When using inclusive, the tax percentage will already be included in the price. When using exclusive, the tax will not be included in the price. When using none, no tax will be added. Use the tax field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal

              Values

              exclusive

              inclusive

              none

              discount_type

              string

              The value of the discount. The discount_type field can be used to specify whether the value is an amount or a percentage

              Default

              percentage

              Values

              percentage

              amount

              product_variation_id

              integer

              The ID of the product variation

              billing_frequency

              string

              Only available in Growth and above plans

              How often a customer is billed for access to a service or product

              To set billing_frequency different than one-time, the deal must not have installments associated

              A deal can have up to 20 products attached with billing_frequency different than one-time

              Values

              one-time

              annually

              semi-annually

              quarterly

              monthly

              weekly

              billing_frequency_cycles

              integer

              Only available in Growth and above plans

              The number of times the billing frequency repeats for a product in a deal

              When billing_frequency is set to one-time, this field must be null

              When billing_frequency is set to weekly, this field cannot be null

              For all the other values of billing_frequency, null represents a product billed indefinitely

              Must be a positive integer less or equal to 208

              billing_start_date

              string

              Only available in Growth and above plans

              The billing start date. Must be between 10 years in the past and 10 years in the future

              Format

              YYYY-MM-DD

              Response
              200

              OK

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

                Delete many products from a deal

                Copy link

                Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.

                Cost

                15

                Request
                DELETE

                /api/v2/deals/{id}/products

                Path parameters

                id

                integer

                required

                The ID of the deal

                Query parameters

                ids

                string

                Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.

                Response
                200

                OK

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

                    Delete an attached product from a deal

                    Copy link

                    Deletes a product attachment from a deal, using the product_attachment_id.

                    Cost

                    3

                    Request
                    DELETE

                    /api/v2/deals/{id}/products/{product_attachment_id}

                    Path parameters

                    id

                    integer

                    required

                    The ID of the deal

                    product_attachment_id

                    integer

                    required

                    The product attachment ID

                    Response
                    200

                    OK

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

                      Subscribe to Pipedrive’s Developer Newsletter