I want a data where I can see all stage changes and dates on pipeline basis in deals and contracts. I am working with Python. How do I get this information from the api?
@HGozcu - I believe you can get the property history by adding the query parameter “&propertyMode=value_and_history”. Each version of a property’s data contains the datestamp of when it was changed to that value.
hey @Hanna . i try get deals now.
I want createdate deals after June 2023, but all data comes from the beginning. How can I filter this? The head of my code is as follows;
token = “my_token”
# Set the API endpoint
url = “https://api.hubapi.com/crm/v3/objects/deals”
# Set the headers
headers = {
“Authorization”: f"Bearer {token}",
“Content-Type”: “application/json”
}
# Set the initial offset and limit
offset = 0
limit = 100 # Adjust the limit as per your requirements
# List to store all deal information
deal_stages = []
# Send API requests until all deals are fetched
while True:
# Set the query parameters
params = {
“limit”: limit,
“offset”: offset,
“properties”: “dealname,pipeline,hs_lastmodifieddate,dealstage,closedate,createdate”,
“filterGroups”: [
{
“filters”: [
{
“propertyName”: “createdate”,
“operator”: “GTE”,
“value”: “1685607600000”
}
]
}
]
}
# Send the GET request
response = requests.get(url, headers=headers, params=params)