Feature: REST API for Grocery Module with JSON-LD #13

Closed
opened 2026-07-04 21:32:10 +00:00 by psycodepath · 0 comments
Owner

Motivation

Expose Grocery lists, items, and catalog products to external consumers.

Description

Create REST API endpoints under /api/v1/grocery/* for grocery lists, items, and pantry control with pagination and JSON-LD contexts.

User Story

As an API consumer, I want to manage grocery lists and catalog products programmatically so that I can build custom mobile/smart-home lists.

Gherkin Feature

Feature: Grocery REST API
  As an API consumer
  I want to read and write grocery resources
  So that my home automation system can query and update lists

Acceptance Criteria

  • GET /api/v1/grocery/lists (paginated collection of grocery lists).
  • GET /api/v1/grocery/lists/{id} (item view of a grocery list containing its items).
  • POST /api/v1/grocery/lists (create a new list).
  • POST /api/v1/grocery/lists/{id}/add (add an item).
  • POST /api/v1/grocery/lists/{listId}/toggle/{id} (toggle item bought status).
  • GET /api/v1/grocery/catalog (paginated list of catalog products).
  • Integration tests for all endpoints.
### Motivation Expose Grocery lists, items, and catalog products to external consumers. ### Description Create REST API endpoints under `/api/v1/grocery/*` for grocery lists, items, and pantry control with pagination and JSON-LD contexts. ### User Story As an API consumer, I want to manage grocery lists and catalog products programmatically so that I can build custom mobile/smart-home lists. ### Gherkin Feature ```gherkin Feature: Grocery REST API As an API consumer I want to read and write grocery resources So that my home automation system can query and update lists ``` ### Acceptance Criteria - [ ] `GET /api/v1/grocery/lists` (paginated collection of grocery lists). - [ ] `GET /api/v1/grocery/lists/{id}` (item view of a grocery list containing its items). - [ ] `POST /api/v1/grocery/lists` (create a new list). - [ ] `POST /api/v1/grocery/lists/{id}/add` (add an item). - [ ] `POST /api/v1/grocery/lists/{listId}/toggle/{id}` (toggle item bought status). - [ ] `GET /api/v1/grocery/catalog` (paginated list of catalog products). - [ ] Integration tests for all endpoints.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psycodepath/hrp#13
No description provided.