Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/viet2811/ocipe/llms.txt

Use this file to discover all available pages before exploring further.

The fridge API manages a user’s ingredient inventory. Each user has exactly one fridge, provisioned automatically. Ingredients are organized into named groups of your choosing (e.g. “Proteins”, “Vegetables”, “Pantry”). The grocery planner cross-references fridge contents when generating a shopping list — ingredients already in the fridge are separated into an others list so you know what you already have on hand.

Get fridge contents


GET /api/fridge/ Returns the authenticated user’s fridge with all ingredients organized by group. Groups are returned in reverse alphabetical order; ingredients within each group are ordered by insertion ID. Authentication: Required — Authorization: Bearer <access_token>

Response

ingredient_list
object
A dictionary keyed by group name. Each value is an array of ingredient objects containing id (integer — the FridgeIngredient row ID) and name (string).
curl https://ocipe.onrender.com/api/fridge/ \
  -H "Authorization: Bearer <access_token>"
Example response:
{
  "ingredient_list": {
    "Proteins": [
      { "id": 3, "name": "chicken" },
      { "id": 7, "name": "eggs" }
    ],
    "Vegetables": [
      { "id": 1, "name": "garlic" },
      { "id": 4, "name": "onion" }
    ],
    "Pantry": [
      { "id": 2, "name": "soy sauce" }
    ]
  }
}

Add an ingredient


POST /api/fridge/ingredient/ Adds a new ingredient to the authenticated user’s fridge. If an ingredient with the same name does not yet exist for this user in the recipes ingredient pool, it is created automatically. Authentication: Required — Authorization: Bearer <access_token>

Request body

name
string
required
The ingredient name to add.
group
string
required
The group to place the ingredient in. Use an existing group name to add to that group, or supply a new name to create a group on the fly.

Response

Returns the created FridgeIngredient object.
id
integer
The FridgeIngredient row ID (used for update and delete operations).
group
string
The group the ingredient was placed in.
curl -X POST https://ocipe.onrender.com/api/fridge/ingredient/ \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "broccoli", "group": "Vegetables"}'
Example response:
{
  "id": 12,
  "group": "Vegetables"
}

Update an ingredient


PUT /api/fridge/ingredient/{id}/ Updates the name or group of an existing fridge ingredient. Both fields must be supplied. To move an ingredient to a different group, keep the same name and change group. Authentication: Required — Authorization: Bearer <access_token>

Path parameters

id
integer
required
The FridgeIngredient ID (from the id field returned by the list or create endpoints).

Request body

name
string
required
The new ingredient name. If unchanged, pass the existing name.
group
string
required
The new group name. If unchanged, pass the existing group.

Response

Returns the updated FridgeIngredient object.
curl -X PUT https://ocipe.onrender.com/api/fridge/ingredient/12/ \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "broccoli", "group": "Greens"}'
Example response:
{
  "id": 12,
  "group": "Greens"
}

Delete an ingredient


DELETE /api/fridge/ingredient/{id}/ Removes a single ingredient from the fridge. Authentication: Required — Authorization: Bearer <access_token>

Path parameters

id
integer
required
The FridgeIngredient ID to delete.

Response

Returns 204 No Content on success with an empty body.
curl -X DELETE https://ocipe.onrender.com/api/fridge/ingredient/12/ \
  -H "Authorization: Bearer <access_token>"

Rename a group


PUT /api/fridge/ingredient/group/{group_name} Renames a group by updating the group field on every ingredient that belongs to it. All ingredients in the group move to the new name atomically. Authentication: Required — Authorization: Bearer <access_token>

Path parameters

group_name
string
required
The current name of the group to rename.

Request body

new_group
string
required
The new name for the group. Returns 400 Bad Request if this field is missing.

Response

Returns 200 OK with an empty body on success.
curl -X PUT https://ocipe.onrender.com/api/fridge/ingredient/group/Vegetables \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"new_group": "Greens & Vegetables"}'

Delete a group


DELETE /api/fridge/ingredient/group/{group_name} Deletes all ingredients that belong to the specified group. Authentication: Required — Authorization: Bearer <access_token>
This permanently deletes every ingredient assigned to the group, not just the group label. All individual ingredient rows within that group are removed. This action cannot be undone.

Path parameters

group_name
string
required
The name of the group whose ingredients should be deleted.

Response

Returns 200 OK with an empty body on success.
curl -X DELETE https://ocipe.onrender.com/api/fridge/ingredient/group/Pantry \
  -H "Authorization: Bearer <access_token>"

Build docs developers (and LLMs) love