List recipes
const url = 'https://api.stocksmith.io/api/v1/recipes';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.stocksmith.io/api/v1/recipes \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Page number (default: 1)
Results per page (default: 25, max: 100)
Responses
Section titled “ Responses ”Paginated list of recipes
object
object
ID of the associated product
Decimal string
object
Which endpoint resolves ingredient_id: materials for ‘material’, components for ‘component’
ID of the material or component. Null only when a component’s record is missing
Deprecated: use ingredient_id. Populated for materials only, null for components
Deprecated: use ingredient_name
Decimal string
Unit of measure name
Total materials cost. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
Per-unit materials cost. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
Total estimated labour cost. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
Per-unit estimated labour cost. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
Total cost of goods sold. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
Per-unit cost of goods sold. Omitted for view-only users.
object
Decimal string, e.g. ‘8.75’
ISO 4217 code, e.g. ‘USD’
object
Example
{ "recipes": [ { "ingredients": [ { "ingredient_type": "material" } ] } ]}Missing or invalid Bearer token
object
Error message
Example generated
{ "error": "example"}