Development discussions around Shopify APIs
Is it possible to discern the Order ID from an email receipt from a Shopify merchant? I'm trying to work out how to use the API if I only have the email receipt.
Thanks,
M
Hey there,
I wouldn't use the email receipt to retrieve an order ID since the notification can be customized to not include an order ID, or order name for that matter. Your best bet would be to subscribe to order/create webhooks to ensure order data integrity.
However, if you can trust that the email receipt will not be customized, you can use the {{ id }} liquid variable as the identifier for order ID.
- Jordan
Jordan | 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
Hi Jordan,
Thank you very much! If I understand correctly this allows me to see/retrieve the order if I am the merchant. If I am the client how do I use the order ID and the merchant URL to view my order through the API?
Thanks,
M
Hey M,
That's right. If you're the api client, you can use the order ID in a GET request like:
GET /admin/orders/#{order_id}.json
You can read more about it here.
- Jordan
Jordan | 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
Hi Jordan,
But in this scenario I am the consumer / buyer, am I able to view the order then using the Shopify API?
Thanks,
M
Hey M,
Customers don't have access to the Shopify API. They would need be registered as an api_client (i.e an app installed on the merchants shop) in order to make authenticated requests to the Shopify API.
- Jordan
Jordan | 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
Thanks Jordan.
M
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023