Contents
On this page
Create Shopping List - Plugixa Recipe
POST /plugixa-recipe/v1/shopping-lists
Create a shopping list owned by the caller, optionally with its first items.
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
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | Must not be blank. |
status |
string |
No | Defaults to active. Stored as sent. |
items |
object[] |
No | First lines, in this order, unticked. |
items[].ingredient_name |
string |
No | The line. |
items[].quantity, items[].unit |
string |
No | As they should read. |
items[].recipe_id |
integer |
No | The recipe it belongs to. |
{
"name": "Saturday shop",
"items": [
{
"ingredient_name": "flour",
"quantity": "2",
"unit": "cups",
"recipe_id": 12
},
{
"ingredient_name": "milk",
"quantity": "1 1/2",
"unit": "cups",
"recipe_id": 12
}
]
}
Responses
200 OK. data is the new list with its items.
{
"success": true,
"message": "",
"data": {
"id": "9",
"user_id": "1",
"name": "Saturday shop",
"status": "active",
"created_at": "2026-11-12 09:30:00",
"modified_at": null,
"items": [
{
"id": "55",
"shopping_list_id": "9",
"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": "56",
"shopping_list_id": "9",
"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 |
The status is 200, not 201.
Errors
| Status | Code | When |
|---|---|---|
400 |
rest_error |
name is missing or blank. |
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" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"name":"Saturday shop","items":[{"ingredient_name":"flour","quantity":"2","unit":"cups"}]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-recipe/v1/shopping-lists');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Saturday shop',
'items' => [
[
'ingredient_name' => 'flour',
'quantity' => '2',
'unit' => 'cups',
],
],
]),
]);
$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', {
method: 'POST',
headers: {
'Authorization': auth,
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Saturday shop", "items": [{"ingredient_name": "flour", "quantity": "2", "unit": "cups"}]}),
});
const { data } = await response.json();
Quick Links
Share