Add groceries atomically
const url = 'http://127.0.0.1:8080/api/v1/shopping/lists/example/items';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"items":[{"buy":"example","category":"example","id":"example","name":"example","note":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/api/v1/shopping/lists/example/items \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "items": [ { "buy": "example", "category": "example", "id": "example", "name": "example", "note": "example" } ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Examplegenerated
{ "items": [ { "buy": "example", "category": "example", "id": "example", "name": "example", "note": "example" } ]}Responses
Section titled “Responses”OK
object
object
object
object
object
object
object
object
object
object
Examplegenerated
{ "applied_revision": 1, "id": "example", "items": [ { "arranged": true, "bought": true, "buy": "example", "category": "example", "deleted": true, "fields": { "additionalProperty": 1 }, "id": "example", "merged_into": "example", "name": "example", "needed": "example", "note": "example", "revision": 1, "sources": [ { "again": "example", "amount": "example", "dish_id": "example", "id": "example", "ingredient_id": "example", "label": "example", "meal_date": "2026-04-15", "meal_id": "example", "name": "example", "note": "example", "quantity": "example", "recipe_id": "example", "recipe_revision": 1, "unit": "example" } ] } ], "name": "example", "requirements": { "additionalProperty": { "choice_id": "example", "choices": [ { "amount": "example", "id": "example", "name": "example", "note": "example", "quantity": "example", "unit": "example" } ], "id": "example", "previous_name": "example", "previous_quantity": "example", "selected": true, "source": { "again": "example", "amount": "example", "dish_id": "example", "id": "example", "ingredient_id": "example", "label": "example", "meal_date": "2026-04-15", "meal_id": "example", "name": "example", "note": "example", "quantity": "example", "recipe_id": "example", "recipe_revision": 1, "unit": "example" } } }, "revision": 1, "selections": { "additionalProperty": { "choice_id": "example", "id": "example", "selected": true } }}No valid session or API token (authentication-required), or the credential sent is invalid (invalid-credentials).
object
Examplegenerated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}Conflict
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Unprocessable Entity
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Internal Server Error
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}