API add Product

Hello,

I don’t know the pattern of the “prices” attribute of an Add Product Request. I tried everything but I couldn’t create a Product with prices through the API Reference.
I am also using the https://github.com/amoniacou/pipedrive.rb gem in my application but I am facing the same issue.

I already tried:

[{"price": 10, "currency": "EUR"}]

or

[[10, "EUR"]]

But I always get status 400 and error

{ "success": false, "error": "Prices must be given as array of objects.", "error_info": "Acesse developers.pipedrive.com para mais informações sobre a API do Pipedrive.", "data": null, "additional_data": null }

Someone could help me, please?

Kind regards,

Tomás

It seems the API ref is broken for that endpoint as it’s only accepting "application/x-www-form-urlencoded"

I would recommend to try adding the product with the content_type being application/json and use something else to do that e.g. Postman

1 Like