I’m working on getting the Housecall Pro API integrated into my Zapier Zaps and I’ve been mostly successful, except when it comes to passing an array in a URL parameter. Here’s what my Zapier code looks like:
const options = {
url: 'https://api.housecallpro.com/estimates',
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${bundle.authData.api_key}`
},
params: {
'page': 1,
'page_size': 3,
'work_status': >"scheduled","unscheduled","in_progress","completed"]
}
}
return z.request(options)
.then((response) => {
response.throwForStatus();
const results = response.json;
// You can do any parsing you need for results here before returning them
return results.estimates;
});
Here’s the error message the API returns:
The app returned "work_status filter must be an array".