SOLVED

Get all company id's from your instance

Go to solution
Highlighted

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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
Highlighted
Level 10 - Community Moderator

Re: Get all company id's from your instance

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

Highlighted

Re: Get all company id's from your instance

Yes, all the companies in my Marketo instance

Highlighted
Level 10 - Community Moderator

Re: Get all company id's from your instance

Highlighted

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.

Highlighted
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

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