# Pipedrive

## TL;DR

This API proxy lets you do any operation on your Pipedrive data but removes from you all the complexity of setting up and using the classic Pipedrive API 🤩

**No need to worry** about ~~setting up a connected app~~, ~~rotating the security token~~, ~~using bulk API or not~~, ~~record formatting~~ and more! Everything is managed for you 💆‍♀️

Operations:

* [Pass Through](#pass-through)

### Regions  🌍

Depending on your region, you can use

🇪🇺 `https://eu.api-proxy.stacksync.com/`&#x20;

🇺🇸  `https://us.api-proxy.stacksync.com/`

## Pass Through

Make a request to any Pipedrive API which supports OAuth by providing the URL, Request Method and the Request Body.&#x20;

A request will be sent to the URL provided using the request method and request body. The request body can be empty.

```
curl -X [GET | POST | PUT | PATCH | DELETE] 
https://eu.api-proxy.stacksync.com/v1/proxy/INSERT_REQUEST_URL_HERE \
-H "Authorization: Bearer your_api_proxy_service_token" \
-d 'Optional'
```

Example request:

**Read Deal Object Data**

{% tabs %}
{% tab title="cURL" %}

```url
curl -X GET https://eu.api-proxy.stacksync.com/v1/proxy/https://api.pipedrive.com/api/v2/deals \
        -H "Authorization: Bearer your_api_proxy_service_token" \
```

{% endtab %}
{% endtabs %}

Example response:

```json
{
	"additional_data": {
		"next_cursor": null
	},
	"data": [
		{
			"add_time": "2023-07-28T15:01:14Z",
			"channel": null,
			"channel_id": "1",
			"close_time": null,
			"creator_user_id": 21725832,
			"currency": "USD",
			"custom_fields": {
				"602f3785a3745bd31ed7cfce2be32aeafa99ae92": null,
				"b7e99a09aa681bbf5e17e6275c2cac4df14b622d": null,
				"b9e386b59b4016c602a13078ce7bd355af7fa60a": null,
				"cb6aed1d25e684ecfaf7f7289a59ff4b5dbbc4f7": null,
				"f52877bbb7ada88b5c9e724d16e218f73de9c740": null
			},
			"expected_close_date": "2024-07-31",
			"id": 24,
			"is_deleted": false,
			"label_ids": [
				27,
				28
			],
			"local_close_date": null,
			"local_lost_date": null,
			"local_won_date": null,
			"lost_reason": null,
			"lost_time": null,
			"org_id": 2,
			"origin": "ManuallyCreated",
			"origin_id": null,
			"owner_id": 21725832,
			"person_id": 1,
			"pipeline_id": 1,
			"probability": null,
			"stage_change_time": "2024-07-31T18:24:43Z",
			"stage_id": 5,
			"status": "open",
			"title": "Demo Deal 1",
			"update_time": "2024-08-05T09:27:54Z",
			"value": 0.0,
			"visible_to": 3,
			"won_time": null
		},
		{
			"add_time": "2024-07-28T15:19:21Z",
			"channel": null,
			"channel_id": "1",
			"close_time": null,
			"creator_user_id": 21725832,
			"currency": "USD",
			"custom_fields": {
				"602f3785a3745bd31ed7cfce2be32aeafa99ae92": null,
				"b7e99a09aa681bbf5e17e6275c2cac4df14b622d": null,
				"b9e386b59b4016c602a13078ce7bd355af7fa60a": null,
				"cb6aed1d25e684ecfaf7f7289a59ff4b5dbbc4f7": null,
				"f52877bbb7ada88b5c9e724d16e218f73de9c740": null
			},
			"expected_close_date": "2024-07-25",
			"id": 25,
			"is_deleted": false,
			"label_ids": [
				27,
				28
			],
			"local_close_date": null,
			"local_lost_date": null,
			"local_won_date": null,
			"lost_reason": null,
			"lost_time": null,
			"org_id": 2,
			"origin": "ManuallyCreated",
			"origin_id": null,
			"owner_id": 21725832,
			"person_id": 1,
			"pipeline_id": 1,
			"probability": null,
			"stage_change_time": "2024-07-28T15:38:45Z",
			"stage_id": 2,
			"status": "open",
			"title": "Demo Deal 2",
			"update_time": "2024-08-05T09:27:54Z",
			"value": 4000.0,
			"visible_to": 3,
			"won_time": null
		}
	],
	"success": true
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stacksync.com/two-way-sync/api-proxy/pipedrive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
