Query Companies
Hi all,
I'm trying to understand how querying and creating Marketo companies works through the API. Here's what I'm struggling with specifically:
When I query companies like this from Postman:
{{base_url}}/rest/v1/companies.json?filterType=externalCompanyId&filterValues=1000244485
I get this result:
{
"requestId": "de8d#17bff2da213",
"result": [],
"success": true
}
I've tried various filterTypes like "id" or "company" and "externalCompanyId" as seen above, but the result was never not empty.
Here's what the description of the company object looks like: ({{base_url}}/rest/v1/companies/describe.json)
"result": [
{
"name": "Company",
"description": "Map for API company fields",
"createdAt": "2019-03-22T17:37:45Z",
"updatedAt": "2019-03-22T17:37:45Z",
"idField": "id",
"dedupeFields": [
"externalCompanyId"
],
"searchableFields": [
[
"externalCompanyId"
],
[
"id"
],
and some more lines. So I should be able to use "id" and "externalCompanyId" as filterTypes, right?
How would I see "id" and "externalCompanyID" in the UI? External Company ID is a hidden system field (???) and what's ID? Is that what I get if I run this CDV?

That creates a field value for "Flexfield 1" but if I use that in the query:
{{base_url}}/rest/v1/companies.json?filterType=id&filterValues=1837
I don't get anything either.
What am I missing here?
-----------
And question two is this: How would I proceed if I wanted to insert/update "contacts" through a non-native sync. Create companies first and then leads by linking them to "externalCompanyId". Or does this work in just one call?
Thanks!