Shopify Get Product Variant Details by SKU

Inputs

NameTypeDescription
Shopify TokenSensitiveStringShopify Admin API token.
Shopify DomainStringShopify store subdomain (e.g., my-shop).
SKUStringThe SKU of the product variant to fetch details for.

Outputs

NameTypeDescription
SuccessBooleanIndicates if the operation was successful.
Response DataObjectProduct Variant's response data

Example Output:

{ "success": true, "body": { "id": "gid://shopify/ProductVariant/43556099260655", "sku": "PE-MAG-G-180", "title": "180 caps", "inventoryQuantity": 1315, "price": "36.49", "compareAtPrice": "50.49", "weight": 0.0, "weightUnit": "KILOGRAMS", "barcode": "884913766518", "availableForSale": true, "createdAt": "2022-11-03T02:51:00Z", "updatedAt": "2024-12-27T12:55:55Z", "image": { "src": "https://cdn.shopify.com/s/files/1/0405/7291/1765/products/Frame521.jpg?v=1716287759" }, "product": { "id": "gid://shopify/Product/7910573277423", "title": "Magnesium (glycinate)", "handle": "pure-encapsulations-magnesium-glycinate", "onlineStoreUrl": "https://healf.com/products/pure-encapsulations-magnesium-glycinate" } } }

References
Shopify Admin GraphQL API