How to get the UTM parameters associated with the order through rest admin API

謝紹壯
New Member
4 0 0

Hello, community developers.

I have been searching for rest admin API document for a long time, but I haven't found the appropriate interface to get the UTM parameters associated with the order.

How to get the UTM parameters associated with the order through rest admin API?

4.png

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hey @謝紹壯,

The UTM parameters you see in the admin are part of the Order.customerJourney connection, which is currently only exposed through the GraphQL API. Using REST the referring_site field will usually contain the UTM params as well, but the most reliable way to get this info is through the GraphQL object.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes

@_JB Any plans to make this available in the REST Order API (or through another REST endpoint) in the future?

In most cases, parsing the query parameters from the `landing_site` field works fine for our customers but would certainly be nice to be able to retrieve those additional Session Details data.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
0 Likes