Filtering on phone number

79 views
Skip to first unread message

Jason van Belzen

unread,
Feb 11, 2022, 7:49:22 AM2/11/22
to CATS API v3
Hi there,

I am new to CatsOne and trying to make a phone integration.
When my phone rings, I want to search for the contact details via the API.
I have one candidate in the list:
     {
                "id": 9320017,
                "first_name": "Jason",
                "middle_name": "",
                "last_name": "",
                "title": null,
                "emails": {
                    "primary": "em...@info.com",
                    "secondary": null
                },
                "address": {
                    "street": "",
                    "city": "",
                    "state": "",
                    "postal_code": null
                },
                "country_code": null,
                "social_media_urls": [],
                "website": null,
                "phones": {
                    "home": null,
                    "cell": "31612345678",
                    "work": null
                },
                "best_time_to_call": null,
                "current_employer": null,
                "date_available": null,
                "current_pay": null,
                "desired_pay": null,
                "is_willing_to_relocate": null,
                "key_skills": null,
                "notes": null,
                "is_hot": false,
                "is_active": true,
                "contact_id": null,
                "owner_id": 25606,
                "entered_by_id": 25606,
                "source": null,
                "is_registered": false,
                "consent_status": null,
                "date_created": "2022-02-11T08:56:50+00:00",
                "date_modified": "2022-02-11T09:28:54+00:00",
                "_links": {
                    "self": {
                        "href": "/candidates/9320017"
                    },
                    "custom_fields": {
                        "href": "/candidates/9320017/custom_fields"
                    },
                    "attachments": {
                        "href": "/candidates/9320017/attachments"
                    },
                    "activities": {
                        "href": "/candidates/9320017/activities"
                    },
                    "work_history": {
                        "href": "/candidates/9320017/work_history"
                    },
                    "pipelines": {
                        "href": "/candidates/9320017/pipelines"
                    },
                    "tags": {
                        "href": "/candidates/9320017/tags"
                    },
                    "thumbnail": {
                        "href": "/candidates/9320017/thumbnail"
                    },
                    "phones": {
                        "href": "/candidates/9320017/phones"
                    },
                    "emails": {
                        "href": "/candidates/9320017/emails"
                    },
                    "owner": {
                        "href": "/users/25606"
                    },
                    "entered_by": {
                        "href": "/users/25606"
                    }
                }

When I do a POST request to
Body:
{
    "or": [
        {"field": "phones.cell", "filter": "contains", "value": "+31 6 12345678"},
        {"field": "phones.cell", "filter": "contains", "value": "31612345678"}
    ]
}

I expect the candidate in the result, but the result is always empty.

Is there anything wrong with my request?
Best Regards,
Jason

Anthony Allan

unread,
Feb 18, 2022, 12:36:36 PM2/18/22
to CATS API v3
`phones.cell`, `phones.home`, etc. unfortunately only filter on our old phone fields. We were missing a filter for the new phone fields, so I added that today. Now you can do the following:

{"field": "phones", "filter": "contains", "value": "31612345678"}

Let me know if you have any issues with that new filter field.

Jason van Belzen

unread,
Feb 21, 2022, 4:22:58 AM2/21/22
to CATS API v3
Thanks, seems to work now! :)

Op vrijdag 18 februari 2022 om 18:36:36 UTC+1 schreef Anthony Allan:

Jason van Belzen

unread,
Apr 13, 2022, 8:33:19 AM4/13/22
to CATS API v3
Our customer is reporting slow results for the search query above.
Approx. 5 seconds. For a call notification application (CTI) this is not fast enough.
Is there something we can do to improve this?

Op maandag 21 februari 2022 om 10:22:58 UTC+1 schreef Jason van Belzen:

Anthony Allan

unread,
May 3, 2022, 11:55:38 AM5/3/22
to CATS API v3
Easiest way to speed up the query is to pass `embedded=false` as one of the query params in the url. This will return just the base candidate data with no additional embedded data.

Reply all
Reply to author
Forward
0 new messages