Skip to main content
Level 2
Aug 13, 2021 3:51 PM UTC
Question

API - Unable to get Emails by Program Id

Hi, I have the following folder structure.

|- Folder (id: 1123)

    |- Program (id: 3705)

       |-Folder (id: unknown)

          |- Email

 

When I call the endpoint: `https://{{munchkin}}.mktorest.com/rest/asset/v1/emails.json?maxReturn=60&folder={"id":3705,"type":"program"}` I get the following response:

{"success":true,"errors":[],"requestId":"565d#17b4032e97d","warnings":["No assets found for the given search criteria."]}

And when I run it by the parent folder (https://{{munchkin}}.mktorest.com/rest/asset/v1/emails.json?maxReturn=60&folder={"id":1123,"type":"Folder"}) I get the following response:

{"requestId":"17580#17b4033bc63","success":false,"warnings":[],"errors":[{"code":"711","message":"Invalid folder type for email"}]}

 

 My question is how can I get the emails that are part of the program? I have the program id but it does not return the data.

 

 

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

4 replies

SanfordWhiteman
User Group Leader
User Group Leader
Aug 15, 2021 6:58 AM UTC

As I’d think is self-evident from your question itself, you need to get the ID of the folder, since that’s the actual parent of the email assets.

Translate
HZ23Author
Level 2
Aug 19, 2021 3:23 PM UTC

yes, that's what I thought but the id of the folder inside of a program is nowhere to be found. Even on the Marketo platform, that folder is not clickable.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Aug 20, 2021 4:02 AM UTC

Even on the Marketo platform, that folder is not clickable.

Certainly they’re clickable (that’s how you open/close them). Maybe what you mean is they don’t change the URL in the UI, which is true.

 

They’re absolutely queryable via REST API, you need to browse the parent Program.

Translate