Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Anonymous
Not applicable

Get Opportunities REST API requires filterType, even if doc says it's optional?

Documentation at Get Opportunities » Marketo Developers  states that filterType is optional; but when I try using that API without specifying any filterType, I get:

{

    "requestId": "352d#14e2c4952c5",

    "success": false,

    "errors": [

        {

            "code": "1003",

            "message": "filterType not specified"

        }

    ]

}

Documentation or code issue? It would seem quite limiting not being able to retrieve Opportunity records unless you enumerate their Marketo or external ID (which are the only searchable fields returned by Opportunity Describe)...

6 REPLIES 6
Anonymous
Not applicable

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Unfortunately the same seems to be true also for other objects, like opportunity roles and custom objects...

John_M
Marketo Employee

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Hi Carlo

What other examples have you found? I'll follow up with the documentation team and get back to you on this. Thank you for noticing and posting on this!

Anonymous
Not applicable

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Opportunities, Opportunity Roles and all Custom Objects.

If filterType is mandatory, and the filter can't be based on creation/update timestamps (as it doesn't seem to be possible to do), this makes the REST APIs for access to those objects *extremely* limiting...

John_M
Marketo Employee

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Carlo - For opportunity, filterType is *required*. The docs have been updated. Can you tell me what other specific doc pages and I'll look into those as well?

John_M
Marketo Employee

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

Get Opportunity Roles, Company, and Custom Object have been updated as well.

Anonymous
Not applicable

Re: Get Opportunities REST API requires filterType, even if doc says it's optional?

BTW, if filterType is required, then of course also filterValues is...

I understand that's not available today, but in general, it would be great if I could specify an initial nextPageToken equivalent to what's returned by the activities/pagingtoken API in the context of the Activity object, and then iterate through the objects mentioned above without any further filter information.