Skip to main content

Apply ingredient substitution from AI

1 min read
post/nutrition/profiles/{studioId}/ai/substitute-ingredient
Request example
Response
post/nutrition/profiles/{studioId}/ai/substitute-ingredient

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Path parameters

studioIdstringrequired#

Body

application/json
operationIdstringrequired#
leaseOwnerstringrequired#
fencingTokenintegerrequired#
recipeIdstringrequired#
ingredientIdstringrequired#
expectedRevisionintegerrequired#
expectedConstraintsRevisionintegerrequired#
sourceFingerprintstringrequired#
selectedCatalogIdstringrequired#

Responses

application/json
Substitution result.
dataobjectrequired#
Show child attributes
statusstringrequired#
changedCountintegerrequired#

Range: >= 0

skippedCountintegerrequired#

Range: >= 0

ingredientobject#
Show child attributes
idstringrequired#
recipeIdstringrequired#
namestringrequired#
quantitynumber#
unitstring#
positionintegerrequired#
Order within the recipe, starting at 0.
request_idstring#