Measura API documentation · v1
Read the current production capacity for a kit at one Shopify location.
GET /api/v1/kits/{id}/availability
Headers:
Authorization: Bearer <api-key>Scroll horizontally to see all columns.
| Parameter | Type | Description |
|---|---|---|
id | string | Required. Kit ID, 24 hexadecimal characters. |
Scroll horizontally to see all columns.
| Parameter | Type | Description |
|---|---|---|
locationId | string | Required. Positive Shopify legacy numeric location ID string. The location must exist and be active. |
{
"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
}Scroll horizontally to see all columns.
| Field | Type | Description |
|---|---|---|
data.kitId / revision | string | Kit ID and the recipe revision used for the calculation. |
data.assembledStockUnits | number | null | Current exact available stock of the kit output variant. Null when its inventory is untracked. |
data.maxAssemblable | integer | null | Minimum whole-kit capacity across tracked components. Null when every component is untracked. |
data.limitingVariantIds | string[] | Component variant IDs tied for the smallest capacity; empty when capacity is null. |
data.components | array | Component stock requirements merged by variant, in Shopify stock units. |
components[].variantId / productId / displayName | string | Component identity and Shopify display name. |
components[].tracked | boolean | Whether Shopify tracks this component’s inventory. |
components[].availableStockUnits | number | null | Shopify integer available stock plus Measura’s fractional stock, or null when untracked. |
components[].requiredStockUnitsPerKit | number | Positive component stock-unit consumption for one kit, after measurement conversion. |
components[].assemblyCapacity | integer | null | Whole kits supported by this tracked component, clamped to at least zero. Untracked components return null and do not constrain capacity. |
data.locationId / observedAt | string | Requested location and the ISO observation timestamp. |
Scroll horizontally to see all columns.
| Status code | Description |
|---|---|
| 401 / 403 | Invalid credentials, unavailable Public API access, or inactive/unavailable Kit Builder add-on tier. |
| 404 | Kit not found in the authenticated shop. |
| 422 | Invalid kit/location ID, inactive location, variant not stocked, unavailable inventory, ineligible variant, or invalid recipe/measurement/fractional-stock configuration. |
| 500 | Unexpected 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: