APIs & Integrations

OMirzayev
Member

BETWEEEN operator in search API

Hello. I have been trying to use between operator as described in docs.   But hubspot api client library is not compatible with what is said in docs.

OMirzayev_0-1678964108613.png

OMirzayev_4-1678964314695.png

When I ignore and send it. I am getting a error "operator BETWEEN requires a highValue".  

OMirzayev_5-1678964411634.png

Help with this please. I am using 

@hubspot/api-client version 8.8.0
8.8.0 version

 

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

BETWEEEN operator in search API

Hi, @OMirzayev 👋 One request and one question.

 

The request — For issues related to a specific client library, the fastest path to reporting issues is to post in the repo itself. Here's link for the repository for the Node.js library https://github.com/HubSpot/hubspot-api-nodejs/issues

 

My question — Have you tried simplifying a bit and making the same call using Postman, for example?

 

Here's a quick test using Postman and your example for meetings in my test portal.

  • Request
    POST https://api.hubapi.com/crm/v3/objects/meetings/search​

    Body

    {
        "filterGroups": [
            {
                "filters": [
                    {
                        "highValue": "1678961094796",
                        "value": "1579514400000",
                        "propertyName": "hs_lastmodifieddate",
                        "operator": "BETWEEN"
                    }
                ]
            }
        ]
    }​
  • Response
    {
        "total": 3,
        "results": [
            {
                "id": "24633009808",
                "properties": {
                    "hs_createdate": "2022-08-15T14:40:24.805Z",
                    "hs_lastmodifieddate": "2022-10-24T20:09:43.941Z",
                    "hs_object_id": "24633009808"
                },
                "createdAt": "2022-08-15T14:40:24.805Z",
                "updatedAt": "2022-10-24T20:09:43.941Z",
                "archived": false
            },
            {
                "id": "26719531820",
                "properties": {
                    "hs_createdate": "2022-10-13T20:18:39.257Z",
                    "hs_lastmodifieddate": "2022-10-24T20:09:43.096Z",
                    "hs_object_id": "26719531820"
                },
                "createdAt": "2022-10-13T20:18:39.257Z",
                "updatedAt": "2022-10-24T20:09:43.096Z",
                "archived": false
            },
            {
                "id": "27458983710",
                "properties": {
                    "hs_createdate": "2022-11-02T21:53:59.548Z",
                    "hs_lastmodifieddate": "2022-11-02T21:54:00.021Z",
                    "hs_object_id": "27458983710"
                },
                "createdAt": "2022-11-02T21:53:59.548Z",
                "updatedAt": "2022-11-02T21:54:00.021Z",
                "archived": false
            }
        ]
    }​

I can be helpful to include the results of your test in Postman when you post your issue to the repository.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes