Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Marketing events API failure

Marketing events API failure

leonkats
Shopify Partner
3 0 3

Dear community,

Trying to read email campaigns store data with Shopify GQL and REST APIs.

REST API call getting empty response although data available in store.

GQL API fails with internal server error.

 

Is there an API to read Shopify email campaigns ?

Is the Shopify marketing events API the correct one for this ? is it working ?

 

Created a validation store with emails campaign run in store.

Added an app with read_marketing_events and write_marketing_events scopes.

API calls still fail.

As a trouble shooting added almost all available Shopify API scopes to app. (https://shopify.dev/api/usage/access-scopes)

Still API calls fail in same manner.

 

Shopify store with email campaign:

Capture3.PNG

Failing GQL API call:

Capture.PNG

Empty REST API response:

Capture2.PNG

Empty marketing activities GQL API response:

leonkats_0-1675264391980.png 

Saw a couple of community posts around this issue  , all without resolution 😞

 

Thanks,

Leon

 

Replies 2 (2)

camLux
Shopify Partner
3 0 0

@leonkats did you ever find a resolution to this issue? I’m literally dealing with the same issue. 

ShopifyDevSup
Shopify Staff
1453 238 518

Hello all - Al from Developer Support here - thank you for reaching out. I've taken a look into this on our end and was able to replicate the issue using a custom app in my testing environment. I've reached out to our developers on this and while I can't guarantee a turnaround time when it comes to a fix regarding the marketing events query issue, I can confirm that our developers are aware of the issue. 

Right now, the issue only affects external applications leveraging our APIs. I was able to retrieve marketing event data (including for Shopify Email campaigns) using the Shopify GraphiQL app and this query (just as an example):

 {
 marketingEvents (first:10) {
   edges {
     node {
       id
       type
       startedAt
     }
   }
 }
}

 

At the moment, Marketing Activities are intended to be tracked for activities created by marketing app extensions (more information here), so we wouldn't be able to query campaigns created through the Shopify Email app this way, for example. I'm also going to forward that note on this as feedback to our developers, since I definitely understand how being able to surface those campaigns and email activities via the API is important. 

I will monitor the issue on my end here and provide updates when possible - thanks again for reaching out, let me know if I can clarify anything on our end.

Best, 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog