Introduction
This article is part of a broader series covering the Pipedrive API in depth. It focuses specifically on retrieving open tickets from Pipedrive using its API.
If you're looking for a complete breakdown of authentication, rate limits, and other capabilities, refer to the full guide here.
At a practical level, this guide shows how to extract open tickets (deals) both at a customer level and across your entire account, using a structured, repeatable approach.
Pre-requisites
Before you start, ensure the following are in place:
- Access to a Pipedrive account with API permissions
- A valid API token for authentication
- Python environment set up with required libraries (e.g.,
requests)
API Endpoints
- Get Deals
GET https://api.pipedrive.com/v1/deals - Get Deal Details
GET https://api.pipedrive.com/v1/deals/{id}
Step-by-Step Process
1. Authenticate with Pipedrive API
import requests
api_token = 'your_api_token'
base_url = 'https://api.pipedrive.com/v1/'
headers = {'Authorization': f'Bearer {api_token}'}2. Retrieve All Open Deals
Use the deals endpoint and filter by status to fetch open tickets.
response = requests.get(f'{base_url}deals', headers=headers, params={'status': 'open'})
deals = response.json().get('data', [])3. Filter Deals for a Specific Customer
If you need customer-level visibility, filter using the customer identifier.
customer_id = 'specific_customer_id'
customer_deals = [deal for deal in deals if deal['person_id'] == customer_id]4. Retrieve Deal Details
Fetch granular details for each deal where deeper context is required.
for deal in customer_deals:
deal_id = deal['id']
deal_details = requests.get(f'{base_url}deals/{deal_id}', headers=headers).json()Common Pitfalls
- Ignoring rate limits
Pipedrive enforces request caps. Without throttling, your integration will break under scale. - Skipping pagination handling
The API does not return all records in one call. Missing pagination means incomplete data. - Using invalid or expired tokens
Authentication failures are silent productivity killers. Always validate upfront. - Assuming consistent data structure
Not all deals will have aperson_id. Build for variability, not ideal cases. - Not validating API responses
Blind parsing leads to runtime failures. Always check for null or malformed responses. - No retry or error handling
Network instability is real. Production-grade integrations must include retries. - Hardcoding logic against static endpoints
APIs evolve. Build with flexibility to accommodate parameter and structure changes.
Frequently Asked Questions
1. How do I get my API token?
You can find your API token in your Pipedrive account settings under the API section.
2. What is the rate limit for Pipedrive API?
Typically, 100 requests per 10 seconds. Design your integration to stay within limits.
3. Can I filter deals beyond status?
Yes. The API supports multiple query parameters for granular filtering.
4. What happens if the API token is invalid?
You will receive a 401 Unauthorized response.
5. How do I handle pagination effectively?
Use the start and limit parameters to iterate through all results systematically.
6. How should I test API requests before production use?
Use tools like Postman to validate endpoints and responses before coding.
7. Can deal data be updated via API?
Yes. Use the PUT /deals/{id} endpoint to update deal information.
Knit for Pipedrive API Integration
If your goal is speed and reliability, building and maintaining direct integrations is not the best use of engineering bandwidth.
Knit API abstracts the complexity. A single integration gives you standardized access to Pipedrive while handling:
- Authentication and authorization
- Data normalization
- Ongoing API maintenance
Net result: faster implementation, lower operational overhead, and fewer points of failure.
.png)

.png)
.webp)

