Headless commerce and custom storefronts with Shopify APIs and SDKs
Hi friends,
I'm building an app that will get the Shops Articles via the Storefront API. The user will then be able to update articles (via the Admin REST API)
It seems the ID field for Articles in the Storefront API and the Admin REST API are different.
For a particular article I have the ID coming from the Admin REST API has a value of 198840589 whereas if I use the Storefront API the value is "Z2lkOi8vc2hvcGlmeS9BcnRpY2xlLzE5ODg0MDU4OQ==".
How do I reconcile these two values? Using the Storefront API ID, how do I get the Article from the Admin REST API?
Many thanks in advance
Faris
Solved! Go to the solution
This is an accepted solution.
Hey @Hewrin
The Storefront API is a base64 encoded version of the gid - you can encode / decode these values to share IDs between the two.
Vix | 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
This is an accepted solution.
Hey @Hewrin
The Storefront API is a base64 encoded version of the gid - you can encode / decode these values to share IDs between the two.
Vix | 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
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By