Measura API documentation · v1

Get product with variants

Retrieve a product and its variants with pagination support.

Code example
GET /api/v1/products/{productId}

Headers:
  Authorization: Bearer <api-key>
  Content-Type: application/json

Path parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
productIdstringRequired - The Shopify product REST ID

Query parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
limitintegerOptional - Number of variants per page. Positive integer; capped at 100. Default: 50
cursorstringOptional - Pagination cursor from a previous response to fetch the next page

Response example (200 success)

Code example
{
  "success": true,
  "data": {
    "product": {
      "id": "123",
      "measurementType": "weight",
      "variants": [
        {
          "id": "456",
          "isMeasuraEligible": true,
          "fractionalInventory": { "123456": { "quantity": 0.25 } },
          "unitMeasurement": {
            "unit": "kg",
            "value": 1
          },
          "settings": {
            "onlineStore": {
              "displayStyle": "number",
              "rules": {
                "min": 0.5,
                "increment": 0.5,
                "defaultValue": 1
              }
            }
          }
        }
      ]
    }
  },
  "error": null,
  "meta": {
    "nextCursor": "eyJ...",
    "prevCursor": null,
    "hasMore": true
  }
}

Response fields

Scroll horizontally to see all columns.

FieldTypeDescription
successbooleanIndicates whether the request was successful
dataobjectResponse data object
errornullNull for a successful request
data.productProductThe product object with nested variants
metaPaginationMetaPagination metadata for cursor-based navigation

Error responses

Scroll horizontally to see all columns.

Status codeDescription
400Bad Request - Missing product ID or invalid limit parameter
401Unauthorized - Missing or invalid API key
403Forbidden - Public API access is unavailable for this shop
404Not Found - Product not found
422Unprocessable Entity - Product is not configured for sell-by-measurement
429Too Many Requests - API rate limit exceeded
500Internal Server Error - Server error while processing the request

Note

  • Responses are cached for 5 minutes server-side
  • Excluded variants remain in the response with isMeasuraEligible: false; check eligibility before treating a variant as measured.
  • Products with zero variants will return an empty array with proper pagination metadata
  • Check meta.hasMore, then use meta.nextCursor to fetch the next page. The returned meta.prevCursor is the page start cursor; this endpoint only supports forward pagination
  • The limit parameter controls the page size; values above 100 are capped at 100

Related:

See the Variant object and PaginationMeta documentation for response structure details.