@LanceG.
You are making a webhook POST request, this would send data not receive it. This hook would be better implemented inside HYROS but I have a feeling that there would not be a triggering event to fire it. Do see their documentation.
Webhooks are typically used to send data to a specified URL, where it is caught and processed by the receiving system. In your case, you wish to make an API call, which involves sending a request to an endpoint and receiving data back as a response
Zapier does not appear to have an API request action set-up for HYROS. This may mean you will need to code one to ensure authorisation is correctly handled. AI should be able to help with this. I personally would use python as I find it easier to understand and ChatGPT is very helpful and with trial and error you can achieve significant results.
Do read their API documentation here https://hyros.docs.apiary.io/# and webhook documentation https://docs.hyros.com/hyros-webhooks/
An example API CALL code block
import requests
# HYROS API configuration
API_KEY = 'your_api_key_here' # Replace with your HYROS API key
ENDPOINT_URL = 'https://api.hyros.com/v1/attribution' # Replace with the HYROS endpoint you need
# Define headers for the API request
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json',
}
# Define parameters for the API request (modify as needed)
params = {
'start_date': '2023-01-01', # Example parameter
'end_date': '2023-12-31', # Example parameter
}
try:
# Make the GET request to the HYROS API
response = requests.get(ENDPOINT_URL, headers=headers, params=params)
# Check if the request was successful
if response.status_code == 200:
data = response.json() # Parse JSON response
# Use the data as needed
return {'status': 'success', 'data': data}
else:
# Handle API errors
return {
'status': 'error',
'code': response.status_code,
'message': response.text
}
except Exception as e:
# Handle other errors (e.g., network issues)
return {
'status': 'error',
'message': str(e)
}
Hope this helps.
I appreciate this. It does makes sense now. I'll definitely try this and let you know how it goes. Thanks!