Development discussions around Shopify APIs
I have a question regarding response data for customers and orders endpoints.
In customers response there are two columns: accepts_marketing and accepts_marketing_updated_at
In orders response there is one column: buyer_accepts_marketing (and apparently not a timestamp)
In the customer response, accepts_marketing may be False, although buyer_accepts_marketing is True in the orders response.
My question what is the difference between accepts_marketing in the customers response and the buyer_accepts_marketing in the orders response?
Hey @dcteam ,
Those two fields represent the same thing, however one represents a historical value and the other represents a real-time value. If you query the "customer" endpoint, you will receive the information about that customer as it is in our database right now. If you query an Order, you will receiver the information about the customer as it was at the time of order, which can be a completely different set of values than the current data, including their marketing status.
So to clarify, your customer currently does not accept marketing, however at the time of that specific order, they did, which is why that data is stored in the order.
Best,
Graham S | API 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
User | RANK |
---|---|
46 | |
16 | |
9 | |
9 | |
7 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023