SOLVED

Re: Get all company id's from your instance

Go to solution
Franky_Ruyssch2
Level 4

Get all company id's from your instance

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.

Franky Ruysschaert
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Get all company id's from your instance

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. 

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Get all company id's from your instance

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

Franky_Ruyssch2
Level 4

Re: Get all company id's from your instance

Yes, all the companies in my Marketo instance

Franky Ruysschaert
SanfordWhiteman
Level 10 - Community Moderator

Re: Get all company id's from your instance

Franky_Ruyssch2
Level 4

Re: Get all company id's from your instance

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.

Franky Ruysschaert
SanfordWhiteman
Level 10 - Community Moderator

Re: Get all company id's from your instance

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. 

Tony_Mayse
Level 3

Re: Get all company id's from your instance

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... 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.