Hello, I need to send a POST request with the intercom API and I'm not sure how to do it.
In particular, I need the contact id of the contact that has a specific company id (plus some other identifier that will help me pick the specific contact of the many that can exist in the company).
I'm using this: https://developers.intercom.com/intercom-api-reference/reference/search-for-contacts/p>
The question, therefore, is how do I do a POST query that queries not for a scalar as you would do to search eg for Minessota ("field": "location.region") but rather for a scalar within an array (as is the id within companies).
Here's a typical (truncate) response I need to process:
{
"type": "list",
"data": t
{
"type": "contact",
"id": "60a3b30b980bf6b7f155eb99",
"browser_language": "en",
"os": "OS X 10.15.7",
"location": {
"type": "location",
"country": "United States",
"region": "Minnesota",
"city": "Buffalo"
},
"android_app_name": null,
"android_app_version": null,
"companies": {
"type": "list",
"data": ;
{
"id": "60a3baef1bffeb8a67d42b6a",
"type": "company",
"url": "/companies/60a3baef1bffeb8a67d42b6a"
}
],
"url": "/contacts/60a3b30b980bf6b7f155eb99/companies",
"total_count": 1,
"has_more": false
},
"opted_out_subscription_types": {
"type": "list",
"data": 1],
"url": "/contacts/60a3b30b980bf6b7f155eb99/subscriptions",
"total_count": 0,
"has_more": false
}
},
],
"total_count": 1,
"pages": {
"type": "pages",
"page": 1,
"per_page": 50,
"total_pages": 1
}
}
Is this supported? If not, is there a workaround?
Thank you!