Hello, I am trying to fetch the daily revenue for a project through API Call in python. I have the API key and the project ID. However, I am unable to locate the endpoint to get the daily revenue for a specified date range. All I can get is a snapshot of their dashboard (containing the last 28 day revenue) with the following code:
url = f"https://api.revenuecat.com/v2/projects/{project_id}/metrics/overview"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
response.raise_for_status()
metrics = response.json().get('metrics', [])
df = pd.DataFrame(metrics).rename(columns={'id': 'metric', 'value': 'value'})
print(df)
Can someone please help me with the code, that will take date range as input in parameters and give me a breakdown of daily revenue for the date range?
