Restore Recipe to Version
Restore a recipe to the state it had at a prior version (non-destructive).
Creates a new commit whose content matches target_version_id; the existing
history is never rewritten. The new version_id is returned in the response
body and ETag header — pass it as If-Match on subsequent mutations.
Returns 404 if the recipe or target version does not exist; 412 on
If-Match mismatch.
Path Parameters
Header Parameters
Optimistic-concurrency token. Pass the version_id returned by the previous mutation (or by GET /recipes/{id}/versions) so the server can reject the request when another writer has advanced the recipe in the meantime. A mismatch surfaces HTTP 412 with the current version_id in the response body so the client can decide whether to retry, merge, or surface the conflict to the user. Only consumed on API versions that declare the recipe_versioning capability — older versions ignore the header.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/studio/recipes/string/restore" \ -H "Content-Type: application/json" \ -d '{ "target_version_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV" }'{
"data": {
"id": "string",
"name": "string",
"country": "US",
"regulatory_authority": "US_FDA",
"demographic": "adults_and_children_over_4",
"status": "active",
"created_at": "string",
"updated_at": "string"
},
"meta": {
"version": "string",
"request_id": "string",
"timestamp": "string"
},
"version_id": "string"
}{
"type": "https://api.bettermenu.com/errors/recipe_not_found",
"title": "Recipe Not Found",
"status": 400,
"detail": "Recipe rcpe_abc123 does not exist",
"code": "recipe_not_found",
"retryable": true,
"instance": "/api/v1/recipes/rcpe_abc123",
"trace_id": "req_xyz789",
"errors": [
{}
],
"invalid_ids": [
"f_abc123",
"f_xyz789"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}{
"type": "https://api.bettermenu.com/errors/recipe_not_found",
"title": "Recipe Not Found",
"status": 400,
"detail": "Recipe rcpe_abc123 does not exist",
"code": "recipe_not_found",
"retryable": true,
"instance": "/api/v1/recipes/rcpe_abc123",
"trace_id": "req_xyz789",
"errors": [
{}
],
"invalid_ids": [
"f_abc123",
"f_xyz789"
]
}