Pantry

The pantry endpoints let you manage your bakery's ingredients and supplies inventory.

The pantry item model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the pantry item.

  • Name
    type
    Type
    string
    Description

    Item type: ingredient or supply.

  • Name
    name
    Type
    string
    Description

    Item name.

  • Name
    description
    Type
    string
    Description

    Item description.

  • Name
    category
    Type
    string
    Description

    Category (e.g., "Dry Goods", "Dairy", "Packaging").

  • Name
    groupings
    Type
    array
    Description

    Array of groupings for organization.

  • Name
    unit
    Type
    string
    Description

    Default unit of measurement.

  • Name
    status
    Type
    string
    Description

    Status: active or inactive.

  • Name
    cost_per_unit
    Type
    number
    Description

    Cost per unit.

  • Name
    supplier
    Type
    object
    Description

    Supplier details with id, name, order_link, lead_time_days.

  • Name
    barcodes
    Type
    array
    Description

    Array of barcodes with code, quantity, unit, label.

  • Name
    allergens
    Type
    array
    Description

    Array of allergens with allergen and level (contains/may_contain/processed_in).

  • Name
    stock_tracking
    Type
    object
    Description

    Stock tracking settings with enabled, current_stock, min_threshold, max_threshold, location.


GET/api/v1/pantry

List all pantry items

Retrieve a paginated list of pantry items.

Query parameters

  • Name
    limit
    Type
    integer
    Description

    Number of items to return (default: 50, max: 100).

  • Name
    type
    Type
    string
    Description

    Filter by type: ingredient or supply.

  • Name
    category
    Type
    string
    Description

    Filter by category.

  • Name
    grouping
    Type
    string
    Description

    Filter by grouping.

  • Name
    status
    Type
    string
    Description

    Filter by status: active or inactive.

  • Name
    low_stock
    Type
    boolean
    Description

    Filter items with low stock (true).

  • Name
    search
    Type
    string
    Description

    Search by name.

  • Name
    sort
    Type
    string
    Description

    Sort field: name, created_at, cost_per_unit.

Request

GET
/api/v1/pantry
curl -G https://api.ibakepro.com/api/v1/pantry \
  -H "Authorization: Bearer {api_key}" \
  -d type=ingredient \
  -d low_stock=true

Response

{
  "success": true,
  "data": [
    {
      "id": "ing_flour01",
      "type": "ingredient",
      "name": "All-Purpose Flour",
      "category": "Dry Goods",
      "groupings": ["Baking Basics"],
      "status": "active",
      "unit": "kg",
      "cost_per_unit": 2.50,
      "currency": "AUD",
      "supplier_name": "Flour Mill Co",
      "stock_tracking_enabled": true,
      "current_stock": 8,
      "stock_unit": "kg",
      "is_low_stock": true,
      "barcodes_count": 2,
      "allergens_count": 1,
      "has_variants": false,
      "sku": "FLR-AP-001"
    }
  ],
  "pagination": { "limit": 50, "has_more": false }
}

POST/api/v1/pantry

Create a pantry item

Create a new ingredient or supply.

Required attributes

  • Name
    name
    Type
    string
    Description

    Item name.

Optional attributes

  • Name
    type
    Type
    string
    Description

    ingredient (default) or supply.

  • Name
    category
    Type
    string
    Description

    Item category.

  • Name
    groupings
    Type
    array
    Description

    Array of grouping names.

  • Name
    unit
    Type
    string
    Description

    Default unit (e.g., "kg", "each", "L").

  • Name
    cost_per_unit
    Type
    number
    Description

    Cost per unit.

  • Name
    supplier
    Type
    object
    Description

    Supplier details.

  • Name
    barcodes
    Type
    array
    Description

    Array of barcode objects.

  • Name
    allergens
    Type
    array
    Description

    Array of allergen objects with allergen and level.

  • Name
    stock_tracking
    Type
    object
    Description

    Stock tracking configuration.

Request

POST
/api/v1/pantry
curl -X POST https://api.ibakepro.com/api/v1/pantry \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Unsalted Butter",
    "type": "ingredient",
    "category": "Dairy",
    "groupings": ["Baking Basics", "Refrigerated"],
    "unit": "kg",
    "cost_per_unit": 12.00,
    "supplier": {
      "name": "Dairy Direct",
      "lead_time_days": 2
    },
    "allergens": [
      { "allergen": "Dairy", "level": "contains" }
    ],
    "stock_tracking": {
      "enabled": true,
      "unit": "kg",
      "current_stock": 10,
      "min_threshold": 5,
      "max_threshold": 50,
      "location": "walk_in_fridge"
    },
    "barcodes": [
      { "code": "9312345678901", "quantity": 1, "unit": "kg", "label": "1kg block" },
      { "code": "9312345678902", "quantity": 5, "unit": "kg", "label": "5kg bulk" }
    ]
  }'

GET/api/v1/pantry/:id

Retrieve a pantry item

Get a single pantry item by ID.

Request

GET
/api/v1/pantry/ing_flour01
curl https://api.ibakepro.com/api/v1/pantry/ing_flour01 \
  -H "Authorization: Bearer {api_key}"

Response

{
  "success": true,
  "data": {
    "id": "ing_flour01",
    "type": "ingredient",
    "name": "All-Purpose Flour",
    "description": "General purpose baking flour",
    "category": "Dry Goods",
    "groupings": ["Baking Basics"],
    "unit": "kg",
    "status": "active",
    "cost_per_unit": 2.50,
    "currency": "AUD",
    "supplier": {
      "id": null,
      "name": "Flour Mill Co",
      "order_link": "https://flourmill.com/order",
      "lead_time_days": 5
    },
    "barcodes": [
      { "code": "9312345678901", "quantity": 5, "unit": "kg", "label": "5kg bag" }
    ],
    "allergens": [
      { "allergen": "Gluten", "level": "contains" }
    ],
    "stock_tracking": {
      "enabled": true,
      "unit": "kg",
      "current_stock": 25,
      "min_threshold": 10,
      "max_threshold": 100,
      "last_updated": "2025-01-15T08:00:00Z",
      "location": "dry_storage"
    },
    "has_variants": false,
    "variant_options": [],
    "sku": "FLR-AP-001",
    "created_at": "2024-01-10T08:00:00Z"
  }
}

PATCH/api/v1/pantry/:id

Update a pantry item

Update an existing pantry item. Use this to update stock levels, pricing, or other details.

Request

PATCH
/api/v1/pantry/ing_flour01
curl -X PATCH https://api.ibakepro.com/api/v1/pantry/ing_flour01 \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "cost_per_unit": 2.75,
    "stock_tracking": {
      "current_stock": 50
    }
  }'

Was this page helpful?