Get all company id's from your instance | Community
Skip to main content
Franky_Ruyssch2
New Participant
December 14, 2019
Solved

Get all company id's from your instance

  • December 14, 2019
  • 2 replies
  • 5825 views

Is there a way to get all company id's from your instance?

I ca not find a proper solution for this in the API documentation.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Hi Sanford,

thanks for your reply. I looked at this already, the problem here is that you need to use a filterType and filterValue.

At start of using Marketo a had uploaded 30.000 records from a csv file, and I was wondering if it would be possible to get all companies at once ( I am interested in the id's to use in custom objects... ) by using the API.


Mmm, this rings a bell now as something that can't be done -- haven't used the standalone Company in a long time -- if you don't know the IDs in advance.

Essentially the same restriction as trying to get all COs if you didn't record their unique IDs upon creation. 

2 replies

Tony_Mayse
New Participant
December 16, 2019

There's no single API call to retrieve all companies at-once. In all cases, you'll need some a priori information.

For example: If you know all of your sales person's email addresses, you can get their IDs using https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Sales_Persons/getSalesPer… and then query using these IDs to filter on using the endpoint @Sanford Whiteman‌ linked above.

In each case, you can query multiple filter values at once by separating them with commas up to the URI length limit of about 4K characters. Depending on the number of sales persons, you may be able to do it all in two calls.

SanfordWhiteman
New Participant
December 14, 2019

Are you talking about Marketo (non-CRM) Companies?

Franky_Ruyssch2
New Participant
December 15, 2019

Yes, all the companies in my Marketo instance

Franky Ruysschaert