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

Subject: Issue with Updating Person - “Bad Request” Error

Hello,

I hope this message finds you well. I’m reaching out because I’ve encountered an issue while trying to update a person in Pipedrive, and I’m seeking assistance from the community.

Here’s the error message I received:

{
  "success": false,
  "error": "Bad request",
  "error_info": "Visit developers.pipedrive.com for more information about the Pipedrive API.",
  "data": null,
  "additional_data": null
}

I’ve checked the error details, and it directs me to the Pipedrive API documentation for more information. However, I wanted to reach out to the community to see if anyone has experienced a similar issue and could provide some guidance on how to resolve it.

I’m attempting to update a person, and this “Bad request” error is preventing the operation from being successful. If anyone has insights or suggestions on how to troubleshoot and overcome this issue, I would greatly appreciate your assistance.

Thank you in advance for your help, and I look forward to any feedback or advice you can provide.

Best regards,