Contents
On this page
Update Recipe - Plugixa Recipe
PUT /plugixa-recipe/v1/recipes/{id}
Change the fields you send and leave the rest as they are.
Needs the plugixa_recipe_edit capability, or WordPress’s edit_posts (Contributor and up). When the request moves the recipe into or out of published, it also needs plugixa_recipe_publish or WordPress’s publish_posts (Author and up). Moving between draft, pending and archived does not.
Note. Fields are merged, but lists are replaced. Sending
ingredients,instructions,category_ids,cuisine_ids,course_ids,tagsorcustom_fieldsreplaces the whole stored list with the one you send. Sendingnutrition: nulldeletes the nutrition row.
Note. A required field you send must not be empty:
ingredients: []orimage_id: 0is refused. Fields you leave out are not checked, so a recipe without an image can still be edited.
Request
PUT https://your-site.example/wp-json/plugixa-recipe/v1/recipes/12
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The recipe’s id |
Request body
Content type: application/json
Any field of Create Recipe, none of them required. An empty slug is made again from the title. Moving the recipe to published sets published_at to now. modified_at and modified_by are set for you.
When the Pro Permissions app says a person’s edits must be reviewed, saving a published recipe that stays published moves it to pending instead.
{
"title": "Lemon Ricotta Pancakes",
"servings": 6,
"tags": [
"breakfast",
"brunch",
"ricotta"
]
}
Responses
200 OK. data is the updated recipe, read back in full.
{
"success": true,
"message": "",
"data": {
"id": "12",
"language_code": "",
"translation_group": "",
"title": "Lemon Ricotta Pancakes",
"slug": "lemon-pancakes",
"description": "<p>Light, fluffy pancakes with lemon zest.</p>",
"excerpt": "",
"notes": "",
"tips": "",
"image_id": "345",
"gallery": null,
"tags": [
"breakfast",
"brunch"
],
"equipment": [
"Frying pan"
],
"video_url": "",
"servings": "6",
"servings_unit": "servings",
"yield_amount": "",
"yield_unit": "",
"prep_time": "10",
"cook_time": "15",
"rest_time": null,
"total_time": "25",
"difficulty": "easy",
"cost": "budget",
"season": "",
"status": "published",
"is_featured": "0",
"is_editor_pick": "0",
"display_order": "0",
"source": "",
"source_url": "",
"author_name": "",
"view_count": "0",
"rating_average": "0.00",
"rating_count": "0",
"like_count": "0",
"enable_schema": "1",
"canonical_post_id": null,
"seo_score": null,
"seo_title": null,
"seo_description": null,
"seo_keywords": null,
"focus_keyword": null,
"is_vegetarian": "1",
"is_vegan": "0",
"is_gluten_free": "0",
"is_dairy_free": "0",
"is_keto": "0",
"is_low_carb": "0",
"is_nut_free": "0",
"is_paleo": "0",
"is_sugar_free": "0",
"is_halal": "0",
"is_kosher": "0",
"published_at": "2026-11-12 09:30:00",
"created_at": "2026-11-12 09:30:00",
"created_by": "1",
"submission_ip": null,
"modified_at": "2026-11-12 10:15:00",
"modified_by": "1",
"image_url": "https://your-site.example/wp-content/uploads/2026/11/lemon-pancakes-1024x683.jpg",
"image_thumbnail": "https://your-site.example/wp-content/uploads/2026/11/lemon-pancakes-150x150.jpg",
"equipment_items": [
{
"name": "Frying pan",
"link_url": ""
}
],
"categories": [
{
"id": "3",
"language_code": "",
"translation_group": "",
"name": "Breakfast",
"slug": "breakfast",
"description": "",
"image_id": null,
"display_order": "0",
"created_at": "2026-11-01 08:00:00"
}
],
"cuisines": [],
"courses": [
{
"id": "8",
"name": "Breakfast",
"slug": "breakfast",
"description": null,
"display_order": "7"
}
],
"category_id": 3,
"category_ids": [
3
],
"cuisine_id": 0,
"course_id": 8,
"ingredients": [
{
"id": "101",
"recipe_id": "12",
"group_name": "",
"group_order": "0",
"sort_order": "0",
"quantity": "2",
"unit": "cups",
"name": "flour",
"notes": "",
"link_url": "",
"amount": "2.000",
"amount_max": null,
"is_optional": "0",
"substitution": ""
},
{
"id": "102",
"recipe_id": "12",
"group_name": "",
"group_order": "0",
"sort_order": "1",
"quantity": "1 1/2",
"unit": "cups",
"name": "milk",
"notes": "",
"link_url": "",
"amount": "1.500",
"amount_max": null,
"is_optional": "0",
"substitution": "oat milk"
}
],
"instructions": [
{
"id": "201",
"recipe_id": "12",
"group_name": "",
"group_order": "0",
"sort_order": "0",
"title": "",
"instruction_text": "Whisk the flour, milk and lemon zest.",
"image_id": null,
"video_url": "",
"duration": null,
"timer_seconds": null,
"tip": "",
"text": "Whisk the flour, milk and lemon zest."
},
{
"id": "202",
"recipe_id": "12",
"group_name": "",
"group_order": "0",
"sort_order": "1",
"title": "",
"instruction_text": "Cook each pancake for 2 minutes a side.",
"image_id": null,
"video_url": "",
"duration": "4",
"timer_seconds": "240",
"tip": "",
"text": "Cook each pancake for 2 minutes a side."
}
],
"nutrition": null
}
}
| Field | Type | Meaning |
|---|---|---|
data.modified_at |
string |
Site-time datetime of this change |
data.status |
string |
The status after the save |
data.published_at |
string|null |
Set when the recipe first went live |
Every field is the same as in Get Recipe.
Errors
| Status | Code | When |
|---|---|---|
404 |
rest_error |
No recipe with that id. |
400 |
rest_error |
A required field is missing or empty. Checked in this order, and the first failure is reported: title, description, image, category, difficulty, servings, prep time, cook time, ingredient, instruction. data.errors names the field. |
400 |
rest_error |
difficulty, cost, season or status is not one of the allowed values. |
400 |
rest_error |
PRO A required custom field is empty, or page_layout names no layout. |
403 |
rest_forbidden |
The request would publish the recipe or take it down, and you lack the publish capability. |
Plus the errors every endpoint can return.
Examples
curl -s -X PUT "https://your-site.example/wp-json/plugixa-recipe/v1/recipes/12" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"title":"Lemon Ricotta Pancakes","servings":6}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-recipe/v1/recipes/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Lemon Ricotta Pancakes',
'servings' => 6,
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-recipe/v1/recipes/12', {
method: 'PUT',
headers: {
'Authorization': auth,
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Lemon Ricotta Pancakes", "servings": 6}),
});
const { data } = await response.json();
Quick Links
Share