Error 500 when sending an array of products to /api/v2/deals/{id}/products/bulk

Hi everyone,

I’m trying to add multiple products to a deal using the Pipedrive API endpoint:

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

I am sending a JSON body in the following format:

{
“data”: [
{
“product_id”: 123,
“item_price”: 100.50,
“quantity”: 2
},
{
“product_id”: 456,
“item_price”: 50.00,
“quantity”: 1
}
]
}

However, I consistently receive a 500 Internal Server Error. I’ve checked that:

  • The deal ID exists.
  • Each product ID is valid.
  • The body is a JSON object with a data array, as required by the documentation.

Does anyone know what could cause this error or how to properly structure the request to avoid it? Any guidance would be greatly appreciated.

Thank you!

Hey!

Could you please provide more specifics about the full URL you used?

What headers are you sending with the request? How are you sending the body?

This is through a curl library?