API Error 404 Not found - PUT/deals/1

Hi All,

firstly apologies as this post probably will not have all the required information as this is my first time and I am acting as a gopher between this community and the integration team (the joys of working in a large corporation),

We are using the workato platform (only platform we are allowed to) to create and manage our integrations between Pipedrive and SharePoint. Yesterday when testing api calls were working fine. But today we get:

404 Not Found:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"> <title>Error</title>
</head>
<body>
<pre>Cannot PUT /deals/1</pre> </body>
</html

Can anyone help me understand what this message means in practical terms and what information etc I should be asking the integration team to provide to troubleshoot this?

Appreciated.

I have investigate further using insomnia, and get a similar error. When I make a PUT request using Insomnia tool using the following URL:

https://company-domain.pipedrive.com/api/v1/deals/1?api_token=api_token_here&stage_id=4

It fails and I get the response:

400 Bad Request

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

GET requests function fine everytime.

Hi Pete,
Are you writing to one of the built in fields, or a custom field?

In built fields.

Want this to work before we toy with custom fields

Hello, @PeteWallace :wave:

The stage_id field is a body parameter and therefore shouldn’t be added into the URL as a query parameter.

Here’s a CURL example of updating a deal with stage_id set to 4:

curl --location --request PUT 'https://api.pipedrive.com/v1/deals/my_deal_ID?api_token=my_api_token' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "stage_id": 4
}'

Sincerely,
Helena

1 Like

Thanks @Helena_Sul

I get the concept but am having trouble implementing. I am using insomnia to test the api calls. I have the URL set as:

https://company-domain.pipedrive.com/api/v1/deals/1?api_token=api_token_here
and then a json body:

{
    "stage_id" : 4
}

But it fails with 400 Bad Request:

{
	"status": false,
	"error": "Content-Type:  not supported"
}

I am not sure what is wrong…any ideas?

Solved the last issue. I need to add:

  • Content-Type: application/json
  • Accept: application/json

to the insomnia header:

1 Like

Nice to hear it’s solved, @PeteWallace! :tada: