go to pipedrive.com
Log inSign up
Contents

Changelog

UPDATE
Effective from:

May 19, 2023

Improved validation for products and deal-products endpoints

Announced: April 19, 2023

Effective from:
May 19, 2023

We have improved the validation for products and deal-products endpoints to ensure that the API behavior works as explained in our API Reference for a consistent and reliable experience.

We kindly ask you to review the documentation for Products API and deal-products endpoints and update your API consumption logic if necessary.

We will be providing a 30-day window for reviewing the following logic for products and deal-products endpoints:

1. Getting the list of products attached to a deal

For the GET /deals/{id}/products endpoint, the include_product_data query parameter only supports numerical values 1 and 0:

  • 1 – for retrieving the product data along with each attached product
  • 0 – for not retrieving the product data. This is the default value for the parameter

2. Adding and updating products

For the POST /products and PUT /products/{id} endpoints, the prices body parameter needs to be supplied as an array of objects containing:

  • currency (string) - a required field
  • price (number) – a required field
  • cost (number) – optional
  • overhead_cost (number) – optional

Please note that there can only be one price per product per currency. When the prices parameter is omitted altogether, a default price of 0 and a default currency based on the company’s currency will be assigned.

Here’s an example of a PUT payload where one product price ("id": 10) is being updated and another price is being created:

{ "name": "My product", "prices": [ { "id": 10, "currency": "EUR", "price": 20, "cost": 2 }, { "currency": "USD", "price": 15, "cost": 8 } ] }

3. Adding and updating deal-products

For the POST /deals/{id}/products and PUT /deals/{id}/products/{product_attachment_id} endpoints, the required body parameters and their data types are as follows:

  • product_id (integer)
  • item_price (number)
  • quantity (integer)

The optional body parameters and their data types are:

  • discount_percentage (number) – If omitted, the default value is 0
  • duration (number) – If omitted, the default value is 1

For the full list of optional parameters, please refer to the documentation of the POST and PUT endpoints.

If you have any questions or comments, let us know in the Developer’s Community.

Subscribe to our
Changelog

You may unsubscribe anytime using the unsubscribe link in our emails. For more information, please see our privacy notice.

Subscribe to our
Changelog

You may unsubscribe anytime using the unsubscribe link in our emails. For more information, please see our privacy notice.