Contents
On this page

Create List from Recipe - Plugixa Recipe

POST /plugixa-recipe/v1/shopping-lists/from-recipe/{id}

Create a shopping list for the caller from one recipe’s ingredients.

Needs the plugixa_recipe_edit capability, or WordPress’s edit_posts (Contributor and up). Needs Plugixa Recipe Pro with the Shopping Lists app on.

Request

POST https://your-site.example/wp-json/plugixa-recipe/v1/shopping-lists/from-recipe/12

Path parameters

Name Type Description
id integer The recipe’s id, in any status

Request body

Content type: application/json. Optional.

Field Type Required Description
name string No The list name. Defaults to Shopping List - followed by the recipe title.

Every ingredient becomes one unticked line, in recipe order, with its quantity and unit as written.

{
  "name": "Pancake morning"
}

Responses

200 OK. data is the new list with its items.

{
  "success": true,
  "message": "",
  "data": {
    "id": "10",
    "user_id": "1",
    "name": "Shopping List - Lemon Pancakes",
    "status": "active",
    "created_at": "2026-11-12 09:30:00",
    "modified_at": null,
    "items": [
      {
        "id": "58",
        "shopping_list_id": "10",
        "recipe_id": "12",
        "ingredient_name": "flour",
        "quantity": "2",
        "unit": "cups",
        "is_checked": false,
        "sort_order": "0",
        "added_at": "2026-11-12 09:30:00"
      },
      {
        "id": "59",
        "shopping_list_id": "10",
        "recipe_id": "12",
        "ingredient_name": "milk",
        "quantity": "1 1/2",
        "unit": "cups",
        "is_checked": false,
        "sort_order": "1",
        "added_at": "2026-11-12 09:30:00"
      }
    ]
  }
}
Field Type Meaning
data.id string The list’s id
data.user_id string The owner: always the caller
data.status string active unless you set something else; personal marks the list the front end keeps
data.items[] object[] In the order stored
data.items[].ingredient_name, quantity, unit string The line
data.items[].recipe_id string|null The recipe it came from
data.items[].is_checked boolean Ticked off

Errors

Status Code When
404 rest_error No recipe with that id.
400 rest_error The recipe has no ingredients.
500 rest_error The list could not be written.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-recipe/v1/shopping-lists/from-recipe/12" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-recipe/v1/shopping-lists/from-recipe/12');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$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/shopping-lists/from-recipe/12', {
  method: 'POST',
  headers: {
    'Authorization': auth,
  },
});
const { data } = await response.json();

Quick Links

Share