FROM CACHE - en_header

Obtaining variant id on storefront api

Solved
pd3
Tourist
7 2 2

Hi,

Wondering how the variant id of the form mentioned in the FAQ can be obtained via the Storefront API.
https://help.shopify.com/en/manual/products/variants/find-variant-id

--> 

36485954240671

By the looks of it I am getting something of the form

Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zNzk4NTc2MjgzNjY2Mw==

Wondering

1. Is there a way to translate between the 2.

OR 

2. Obtain the variant id as mentioned on the FAQ via the Storefront API(I am using the Buy IOS SDK).

 

thanks

 

 

 

 

Accepted Solution (1)

Accepted Solutions
c10s
Shopify Partner
67 12 16

This is an accepted solution.

Base64 decode or encode.

Decoding Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zNzk4NTc2MjgzNjY2Mw== will give you gid://shopify/ProductVariant/37985762836663

View solution in original post

Reply 1 (1)
c10s
Shopify Partner
67 12 16

This is an accepted solution.

Base64 decode or encode.

Decoding Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zNzk4NTc2MjgzNjY2Mw== will give you gid://shopify/ProductVariant/37985762836663