Obtaining variant id on storefront api

Solved
pd3
Tourist
5 2 1

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

 

 

 

 

0 Likes
c10s
Shopify Partner
23 6 5

This is an accepted solution.

Base64 decode or encode.

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

0 Likes