Create recipe

POST/api/v1/inventory/production/recipes

Create a new production recipe with materials, output variants, and processing steps.

Operation ID: create_recipe_api_v1_inventory_production_recipes_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

namestringrequired
descriptionstring
output_unit_namestring
output_unit_weightnumber
output_unit_weight_unitstring
conversion_paramsobject
materialsarray · RecipeMaterialBaseRecipeMaterialBase
12 fields
categorystring

Grouping label: raw_material, inclusion, packaging, or other.

namestringrequired

Material name.

quantity_typestringrequired

pct_of_weight | fixed_per_unit | per_n_units | fixed_per_run

quantity_valuenumberrequired

Numeric quantity parameter.

quantity_unitstring

Unit of the quantity value (g, oz, ml, units …).

yield_factornumber

Decimal yield 0-1.

cost_per_unitinteger

Cost in cents (or whole-currency units for bulk like $/MT).

cost_unitstring

Denominator: per_lb, per_kg, per_mt, per_unit, per_oz, per_gal.

positioninteger

Display ordering.

output_variant_idstring

Scope to a specific output variant (for inclusions).

variant_idstring

Optional link to an inventory Variant.

vendor_idstring

Optional link to a Vendor.

output_variantsarray · RecipeOutputVariantBaseRecipeOutputVariantBase
5 fields
namestringrequired

Variant/SKU name.

allocation_pctnumber

Percentage of the run.

is_remainderboolean

Auto-calc as 100% minus others.

positioninteger
variant_idstring

Optional link to inventory Variant.

processing_stepsarray · RecipeProcessingStepBaseRecipeProcessingStepBase
9 fields
namestringrequired

Step / vendor name.

step_typestring

Label: Conversion, Co-Packing, Assembly …

allocation_typestringrequired

pct_of_total | by_output_variant | all_units

allocation_pctnumber

Percentage if pct_of_total.

cost_per_unitinteger

Cost in cents.

cost_unitstring

per_lb, per_unit, per_kg …

output_variant_idsarray · string

Output variant IDs for by_output_variant.

positioninteger
vendor_idstring

Optional link to Vendor.

Responses

201Successful Response

successboolean
messagestring
codestring
dataRecipeResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error - Invalid data format