OpenVibe.Food API

Generated at from openvibe-contracts v0.127.0 and openvibe-sdk v0.37.0.

Server https://openvibe.food. 5 routes performing 4 capabilities. OpenAPI 3.1 document.

GET /api/v1/pantry

Read a caller's pantry with the suggestions matched against it: GET /api/v1/pantry → { items, foods, suggestions: { can_make, almost }, note }.

Capabilities
food.pantry.read
Visibility
public
Response
application/json food.pantry-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>food.pantry.read</strong> (public): Read a caller&#39;s pantry with the suggestions matched against it: GET /api/v1/pantry → { items, foods, suggestions: { can_make, almost }, note }. The suggestions are deterministic matches against basic recipes, not dietary advice.</p>

PUT /api/v1/pantry

Replace a caller's pantry with exactly this list: PUT /api/v1/pantry with { items: [food slug, …] } (at most 200, each one in the food list; GET /api/v1/foods lists them).

Capabilities
food.pantry.write
Visibility
public
Request body
application/json food.pantry-request@1
Response
application/json food.pantry-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>food.pantry.write</strong> (public): Replace a caller&#39;s pantry with exactly this list: PUT /api/v1/pantry with { items: [food slug, …] } (at most 200, each one in the food list; GET /api/v1/foods lists them). Answers like a read.</p>

GET /api/v1/plans

Read the plans a caller saved: GET /api/v1/plans (newest first, ?limit to 50) → { plans }, and GET /api/v1/plans/:id → one plan.

Capabilities
food.plan.read
Visibility
public
Response
application/json food.plan-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>food.plan.read</strong> (public): Read the plans a caller saved: GET /api/v1/plans (newest first, ?limit to 50) → { plans }, and GET /api/v1/plans/:id → one plan. Only the person who saved a plan (or their tokens) can read it.</p>

POST /api/v1/plans

Plan a shop for a household and a budget and save it: POST /api/v1/plans with { people, days, budget?, title?

Capabilities
food.plan.write
Visibility
public
Request body
application/json food.plan-create-request@1
Response
application/json food.plan-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>food.plan.write</strong> (public): Plan a shop for a household and a budget and save it: POST /api/v1/plans with { people, days, budget?, title? }. Food picks budget items from its food list to cover each food group for every person and day, splits them by the cheapest store and lays out a menu; the saved plan (201, Location /api/v1/plans/:id) is the caller&#39;s own.</p>

GET /api/v1/plans/{id}

Read the plans a caller saved: GET /api/v1/plans (newest first, ?limit to 50) → { plans }, and GET /api/v1/plans/:id → one plan.

Capabilities
food.plan.read
Visibility
public
Parameters
  • id (path, required)
Response
application/json food.plan-result@1
Errors
errors.problem@1 (application/problem+json)
Description<p><strong>food.plan.read</strong> (public): Read the plans a caller saved: GET /api/v1/plans (newest first, ?limit to 50) → { plans }, and GET /api/v1/plans/:id → one plan. Only the person who saved a plan (or their tokens) can read it.</p>