- import requests
- # URL for the "Create a new report" action
- create_report_url = 'https://toolkit.tesco.com/partner/reports/create'
- # Parameters and headers, if needed
- params = {'report_type': 'new', 'format': 'csv'}
- headers = {'Authorization': 'Bearer your_access_token'}
- # Perform POST request to create a new report
- response = requests.post(create_report_url, params=params, headers=headers)
- # Check if request was successful
- if response.status_code == 200:
- # Process the response content if needed
- # For example, you can parse JSON content using response.json()
- # json_data = response.json()
- print("Successfully created a new report.")
- else:
- print("Failed to create a new report. Status code:", response.status_code)
[text] K
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: