Companies/Search API to get records with empty property

Hello

I have to integrate Hubspot and I would like to get companies records from Hubspot which have a specific poperty empty (meaning that the users did not fill it properly) for instance ‘Phone’ property

When using below filter in https://api.hubapi.com/crm/v3/objects/companies/search

{

“filterGroups”: [

{

  "filters": \[

    {

      "highValue": "string",

      "value": "+33 4 76 51 85 34",

      "propertyName": "phone",

      "operator": "EQ"

    }

  ]

}

],

“limit”: 10,

“after”: 0

}

it works perfectly fine. I get the item
But with

{

“filterGroups”: [

{

  "filters": \[

    {

      "highValue": "string",

      "value": "",

      "propertyName": "phone",

      "operator": "EQ"

    }

  ]

}

],

“limit”: 10,

“after”: 0

}

it give me the error

“message”: “Invalid input JSON on line 10, column 9: value must be non-empty and non-blank, if specified”
Does anybody able to help?

Thanks in advance.

@PBREC

Hi.

How about this?

{
 "filterGroups": [
 {
 "filters": [
 {
 "propertyName": "phone",
 "operator": "NOT_HAS_PROPERTY"
 }
 ]
 }
 ],
 "limit": 10,
 "after": 0
}

NOT_HAS_PROPERTY → Doesn’t have a value for the specified property

Thanks.

Thanks Skimura

This is perfect

my mistake was to not have used the NOT_HAS_PROPERTY value and to have kept the “value” parameter

Thanks again