Skip to content

Retrieve a recipe

GET
/api/v1/recipes/{id}
curl --request GET \
--url https://api.stocksmith.io/api/v1/recipes/1 \
--header 'Authorization: Bearer <token>'
id
required
integer

Recipe ID

Recipe details

Media type application/json
object
recipe
required
object
id
required
integer
product_id
required

ID of the associated product

integer
product_name
string
nullable
variation_id
integer
nullable
variation_name
string
nullable
name
required
string
manufacture_batch_quantity
required

Decimal string

string
manufacture_minutes
integer
nullable
notes
string
nullable
ingredients
required
Array<object>
object
id
integer
ingredient_type

Which endpoint resolves ingredient_id: materials for ‘material’, components for ‘component’

string
Allowed values: material component
ingredient_id

ID of the material or component. Null only when a component’s record is missing

integer
nullable
ingredient_name
string
nullable
material_id

Deprecated: use ingredient_id. Populated for materials only, null for components

integer
nullable
material_name

Deprecated: use ingredient_name

string
nullable
quantity

Decimal string

string
unit

Unit of measure name

string
nullable
total_cost

Total materials cost. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
unit_cost

Per-unit materials cost. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
total_labour_cost

Total estimated labour cost. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
unit_labour_cost

Per-unit estimated labour cost. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
total_cogs

Total cost of goods sold. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
unit_cogs

Per-unit cost of goods sold. Omitted for view-only users.

object
amount

Decimal string, e.g. ‘8.75’

string
currency_code

ISO 4217 code, e.g. ‘USD’

string
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"recipe": {
"ingredients": [
{
"ingredient_type": "material"
}
]
}
}

Missing or invalid Bearer token

Media type application/json
object
error
required

Error message

string
Example generated
{
"error": "example"
}

Recipe not found

Media type application/json
object
error
required

Error message

string
Example generated
{
"error": "example"
}