Measura API documentation · v1

Kit availability

Read the current production capacity for a kit at one Shopify location.

Code example
GET /api/v1/kits/{id}/availability

Headers:
  Authorization: Bearer <api-key>

Path parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
idstringRequired. Kit ID, 24 hexadecimal characters.

Query parameters

Scroll horizontally to see all columns.

ParameterTypeDescription
locationIdstringRequired. Positive Shopify legacy numeric location ID string. The location must exist and be active.

Response example (200 success)

Code example
{
  "success": true,
  "data": {
    "kitId": "507f1f77bcf86cd799439011",
    "revision": "2026-10-17T08:00:00.000Z",
    "assembledStockUnits": 12,
    "maxAssemblable": 20,
    "limitingVariantIds": [
      "201"
    ],
    "components": [
      {
        "variantId": "201",
        "productId": "200",
        "displayName": "Coffee - Original",
        "tracked": true,
        "availableStockUnits": 10,
        "requiredStockUnitsPerKit": 0.5,
        "assemblyCapacity": 20
      }
    ],
    "locationId": "123456",
    "observedAt": "2026-10-17T08:30:00.000Z"
  },
  "error": null
}

Response fields

Scroll horizontally to see all columns.

FieldTypeDescription
data.kitId / revisionstringKit ID and the recipe revision used for the calculation.
data.assembledStockUnitsnumber | nullCurrent exact available stock of the kit output variant. Null when its inventory is untracked.
data.maxAssemblableinteger | nullMinimum whole-kit capacity across tracked components. Null when every component is untracked.
data.limitingVariantIdsstring[]Component variant IDs tied for the smallest capacity; empty when capacity is null.
data.componentsarrayComponent stock requirements merged by variant, in Shopify stock units.
components[].variantId / productId / displayNamestringComponent identity and Shopify display name.
components[].trackedbooleanWhether Shopify tracks this component’s inventory.
components[].availableStockUnitsnumber | nullShopify integer available stock plus Measura’s fractional stock, or null when untracked.
components[].requiredStockUnitsPerKitnumberPositive component stock-unit consumption for one kit, after measurement conversion.
components[].assemblyCapacityinteger | nullWhole kits supported by this tracked component, clamped to at least zero. Untracked components return null and do not constrain capacity.
data.locationId / observedAtstringRequested location and the ISO observation timestamp.

Error responses

Scroll horizontally to see all columns.

Status codeDescription
401 / 403Invalid credentials, unavailable Public API access, or inactive/unavailable Kit Builder add-on tier.
404Kit not found in the authenticated shop.
422Invalid kit/location ID, inactive location, variant not stocked, unavailable inventory, ineligible variant, or invalid recipe/measurement/fractional-stock configuration.
500Unexpected server or upstream failure.

Note

Requires Public API access and an active Kit Builder add-on tier. The response uses Cache-Control: no-store. Availability is an observation, with no reservation: inventory may change before assembly. Pass its revision as expectedRevision when assembling if you need to detect recipe changes; inventory is checked again during the write.

Related:

Kit recipes define the components; Kit assemblies consume them and produce the linked output variant.