AUTOMATE NOW

Shopify API 2026 – Retrieve All Variants For A Product Using Postman

Table of Contents

The term “variant” refers to a new version of a product. For example, color or size, if you do not create a new variation, shirts in three colors (yellow, blue, and green) will be treated as three separate goods. Using Product Variations, you can think of yellow, blue, and green shirts as three different types of the same shirt.

Each product can have up to 100 variations. At Shopify, almost every business creates new variants of a product. You can read Shopify API: Create A New Product Variant to know more about creating product variants. After creating, the owner sometimes needs to get all variants for a product to make adjustments. This is why I’m going to show you how to retrieve all variants for a product using Postman in Shopify API. 

Remember with Postman in Shopify API. Results will be returned by default with 50 variants per page.

Now let’s explore the article!

If this is the first time you make a call in the Postman, you must generate API credentials from the Shopify admin. 

Generate API Credentials From Shopify Admin

Follow the process of How to build a custom app for Shopify in 2022? To know how to access Shopify API. 

 

Before retrieving all the variants for a product, we need to determine the product_id of those variants. Because the command requires all variants for a product that contains product_id.

 

Retrieve All Variants For A Product Using Postman

https://{API_key}:{admin_API_access_token}@{shop}.myshopify.com/admin/api/{api-version}/{resource}

Or you can copy this example, remember change {resource} to {products/product_id/variants}:

https://{API_key}:{admin_API_access_token}@{shop}.myshopify.com/admin/api/{api-version}/{resource}

After that, paste the URL above.

Then clicks on send

Response: The API will return all variants of a product. 

{
    "variants": [
        {
            "id": 33375530221631,
            "product_id": 4958434295871,
            "title": "Default Title",
            "price": "100000.00",
            "sku": "BT002",
            "position": 1,
            "inventory_policy": "deny",
            "compare_at_price": null,
            "fulfillment_service": "manual",
            "inventory_management": "shopify",
            "option1": "Default Title",
            "option2": null,
            "option3": null,
            "created_at": "2021-02-19T16:59:14+09:00",
            "updated_at": "2021-02-19T16:59:50+09:00",
            "taxable": true,
            "barcode": null,
            "grams": 0,
            "image_id": null,
            "weight": 0.0,
            "weight_unit": "kg",
            "inventory_item_id": 35539582746687,
            "inventory_quantity": 100,
            "old_inventory_quantity": 100,
            "requires_shipping": true,
            "admin_graphql_api_id": "gid://shopify/ProductVariant/33375530221631"
        },
        {
            "id": 39627489050687,
            "product_id": 4958434295871,
            "title": "Yellow",
            "price": "1.00",
            "sku": "",
            "position": 2,
            "inventory_policy": "deny",
            "compare_at_price": null,
            "fulfillment_service": "manual",
            "inventory_management": "shopify",
            "option1": "Yellow",
            "option2": null,
            "option3": null,
            "created_at": "2022-03-17T17:37:48+09:00",
            "updated_at": "2022-03-17T17:37:48+09:00",
            "taxable": true,
            "barcode": null,
            "grams": 0,
            "image_id": null,
            "weight": 0.0,
            "weight_unit": "kg",
            "inventory_item_id": 41722938818623,
            "inventory_quantity": 0,
            "old_inventory_quantity": 0,
            "requires_shipping": true,
            "admin_graphql_api_id": "gid://shopify/ProductVariant/39627489050687"
        },
        {
            "id": 39627489148991,
            "product_id": 4958434295871,
            "title": "Red",
            "price": "1.00",
            "sku": "",
            "position": 3,
            "inventory_policy": "deny",
            "compare_at_price": null,
            "fulfillment_service": "manual",
            "inventory_management": "shopify",
            "option1": "Red",
            "option2": null,
            "option3": null,
            "created_at": "2022-03-17T17:38:09+09:00",
            "updated_at": "2022-03-17T17:38:09+09:00",
            "taxable": true,
            "barcode": null,
            "grams": 0,
            "image_id": null,
            "weight": 0.0,
            "weight_unit": "kg",
            "inventory_item_id": 41722938916927,
            "inventory_quantity": 0,
            "old_inventory_quantity": 0,
            "requires_shipping": true,
            "admin_graphql_api_id": "gid://shopify/ProductVariant/39627489148991"
        }
    ]
}

he above are all steps to retrieve all variants for a product using Postman with Shopify API. If you have any questions, please comment below or refer to our Shopify API documentation.

If you still do not understand the tutorial’s content, you can watch the video below for a more overview.

Shopify API – Retrieve all variants for a product

Hopefully, you can do it!

Last updated: