Get Emails REST API endpoint does not return preHeader and status data | Community
Skip to main content
New Participant
December 20, 2022
Solved

Get Emails REST API endpoint does not return preHeader and status data

  • December 20, 2022
  • 1 reply
  • 3379 views

When using the Get Emails endpoint, the NULL value is returned for the preHeader field and empty string for status field, but at the same time, when using the Get Email By Id endpoint not NULL nor empty values for the preHeader and status fields are present. I would like to know why the Get Emails endpoint returns NULL and empty values for the preHeader and status fields and can this be fixed somehow?

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 Darshil_Shah1

@darshil_shah1 maybe you know how to contact the Marketo's product team to find out if the behavior I described is expected or changes are required and then when they can make them?


Sure, but as an immediate step I’d recommend you to raise this issue with the Marketo support team.  

1 reply

Darshil_Shah1
Community Manager
December 20, 2022

Get Email by Name and Id endpoint do return the correct data for the status and preHeader parameters. However, the browse endpoint does not return the preHeader value, and it is set to NULL even for the email assets that have a pre-header set, status parameter, however, does return the correct value (approved/draft) depending on the email's status for all the endpoints. If I'm not missing anything here, this could probably be a bug where-in the get emails endpoint returns preHeader = null even when the email has got one.

 

Also FYR, an approved email with an unapproved draft version would still be returned as approved in the status parameter as the email has got an approved version already. Emails without any approved versions would be returned as status = draft.

 

New Participant
December 21, 2022

Sorry, I made a mistake in my question. instead of the field status should be subject.

For email, data for preHeader and subject are set. When viewing the email record with the Get Email By Id endpoint, I see the values which I set, but when using the Get Emails endpoint, I see empty values. @darshil_shah1 perhaps as you wrote in your answer that this is a bug for the Get Emails endpoint, I would like to know if this can be fixed?

SanfordWhiteman
New Participant
December 21, 2022

Debatably a bug but bear in mind there are many other “browse” API endpoints that don’t return full details, forcing you to do a “seek” call (or more than one) to get all data.