Skip to content

List variants of a Shopify product

API v2 is in public beta: endpoints and fields can change before general availability.

GET/products/{shopify_product_id}/variants

Costs 1 rate-limit point · Rate limits

List a Shopify product's variants, read from Shopify, with what Filemonk delivers to a buyer of each: delivers_from is variant (the variant's own digital product), product (the one for every variant of the product), variant_and_product (both: the buyer gets both sets of files) or none. files_count is how many files that buyer gets. Up to per_page variants (default 50, max 200) by title; pass next_cursor back as cursor for the rest.

Read-only; asks Shopify. shopify_product_id is a Shopify Product gid or numeric id, from GET /digital_products or GET /digital_products/shopify_products_without_files. digital_products on a row names each digital product that applies, with its id for GET /digital_products/:id. 404 when Shopify has no such product; 502 when Shopify did not answer.

Also searched asproduct variantsvariants of a productlist variantswhich variants have fileswhich variants deliver filesfiles per variantwhat does each variant delivervariants without files

Path parameters

  • shopify_product_idstringRequired

Query parameters

  • cursorstring
  • per_pageinteger

    Rows per page, max 200.

    Default 50

Returns

  • shopify_product_idstring, nullable
    Example: gid://shopify/Product/9642107044135
  • product_titlestring, nullable
    Example: Watercolour Course
  • dataarray of objects
    Show 7 child attributesHide child attributes
    • shopify_variant_idstring, nullable
      Example: gid://shopify/ProductVariant/49231577301031
    • titlestring, nullable
      Example: Beginner
    • namestring, nullable
      Example: Watercolour Course — Beginner
    • skustring, nullable
      Example: WC-BEG
    • delivers_fromstring, nullable
      Example: variant_and_product
    • files_countinteger, nullable
      Example: 3
    • digital_productsarray of objects
      Show 3 child attributesHide child attributes
      • idstring, nullable
        Example: 3f1c2a9e-7b4d-4c1e-9a8f-2d6b5e4c3a21
      • scopestring, nullable
        Example: variant
      • files_countinteger, nullable
        Example: 1
  • total_countinteger, nullable
    Example: 2
  • next_cursorany
  • has_next_pageboolean, nullable
    Example: false

Errors

404

The resource does not exist for this shop, or the action path is not registered.

422

The request failed validation, or sent a key the action does not take (code: "unknown_parameters" with unknown and accepted). Nothing was saved.

502
shopify_error

Shopify (or the email service) did not complete the request. Nothing was changed; try again shortly.

Any request can also fail with rate_limited (429).

Every error has the same shape: see Errors.

GET/products/{shopify_product_id}/variants
curl "https://app.filemonk.io/api/v2/external/products/{shopify_product_id}/variants" \
  -H "X-Auth-Token: $FILEMONK_API_KEY"
Response
{
  "shopify_product_id": "gid://shopify/Product/9642107044135",
  "product_title": "Watercolour Course",
  "data": [
    {
      "shopify_variant_id": "gid://shopify/ProductVariant/49231577301031",
      "title": "Beginner",
      "name": "Watercolour Course — Beginner",
      "sku": "WC-BEG",
      "delivers_from": "variant_and_product",
      "files_count": 3,
      "digital_products": [
        {
          "id": "3f1c2a9e-7b4d-4c1e-9a8f-2d6b5e4c3a21",
          "scope": "variant",
          "files_count": 1
        },
        {
          "id": "8a2b4c6d-1e3f-4a5b-8c7d-9e0f1a2b3c4d",
          "scope": "product",
          "files_count": 2
        }
      ]
    },
    {
      "shopify_variant_id": "gid://shopify/ProductVariant/49231577333799",
      "title": "Advanced",
      "name": "Watercolour Course — Advanced",
      "sku": null,
      "delivers_from": "product",
      "files_count": 2,
      "digital_products": [
        {
          "id": "8a2b4c6d-1e3f-4a5b-8c7d-9e0f1a2b3c4d",
          "scope": "product",
          "files_count": 2
        }
      ]
    }
  ],
  "total_count": 2,
  "next_cursor": null,
  "has_next_page": false
}