APIs & Integrations

NicolasM
Member

Filter Quote

Hi,

 

I'm trying to get all the approved quotes from the actual day. I use Make. The filters parameters doesn't works and I don't understand why I get all the Quotes.

NicolasM_0-1680181092365.png

Here is values in filters

 

[{"filters":[{"propertyName":"hs_status","operator":"EQ","value":"APPROVED"},{"propertyName":"hs_lastmodifieddate","operator":"GTE","value":"2023-03-30T00:00:00.000Z"},{"propertyName":"hs_lastmodifieddate","operator":"LTE","value":"2023-03-30T23:59:59.999Z"}]}]

 

0 Upvotes
3 Replies 3
Jaycee_Lewis
Community Manager
Community Manager

Filter Quote

Hey, @NicolasM 👋 It looks like you are using the Quotes API endpoint to GET all Quotes. This endpoint doesn't use a request body for specifying properties, it adds them as a query parameter (in the request URL) It also doesn't offer the ability to use search operators.

 

Have you tried using the Search API instead? It allows for properties and filters in the request body. 

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
NicolasM
Member

Filter Quote

Thanks for reply @Jaycee_Lewis . Indeed I found that the issue was from the endpoint and I finaly use endpoint with search fonction.

 

I face a new issue with this endpoint. I want to get all the quote accepted, with last modified on today. 


Here is the body of my request, and it doesn't work (error 400)

 

Do you have an idea of what's wrong?

____

{
"filterGroups": [
{
"filters": [
{
"propertyName": "hs_status",
"operator": "EQ",
"value": "APPROVED"
},
{
"propertyName": "hs_lastmodifieddate",
"operator": "GTE",
"value": "2023-03-31T00:00:00.000Z"
},
{
"propertyName": "hs_lastmodifieddate",
"operator": "LTE",
"value": "2023-03-31T23:59:59.999Z"
}
]
}
],
"properties": [
"hs_status",
"hs_lastmodifieddate"
],
"limit": 100
}

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Filter Quote

Hey, @NicolasM 👋 Have you tried using the BETWEEN operator for “hs_lastmodifieddate”?

Similar to the example (but using your timestamps) —

"propertyName":"hs_lastmodifieddate",
     "operator":"BETWEEN",
     "highValue": "1642672800000",
      "value":"1579514400000"

 

Best,

Jaycee

 

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes