BrewForge Docs

Create or edit an order

Create an order (a purchasing list for one shop) or change one: name, supplier, status, shipping cost, expected delivery date, notes. Create: leave out order and send name (plus optional items to put on it right away). Edit: send order (id or name) and only what changes. Status: "draft" (still to order), "ordered" (placed; its items count as on order in the planner), "partial" (some items arrived), "received" (everything arrived). Setting "ordered" stamps the order date. Setting "received" does NOT book anything into stock: to put arrived items into the inventory use receive_order. To add, change or remove lines later use edit_order_items. To build an order from what the planned brews are short of, use create_order_from_shortages. Needs the plan feature `orders`. Scope: `inventory:write` (or `write`).

POST
/api/v1/actions/save_order

Create an order (a purchasing list for one shop) or change one: name, supplier, status, shipping cost, expected delivery date, notes. Create: leave out order and send name (plus optional items to put on it right away). Edit: send order (id or name) and only what changes. Status: "draft" (still to order), "ordered" (placed; its items count as on order in the planner), "partial" (some items arrived), "received" (everything arrived). Setting "ordered" stamps the order date. Setting "received" does NOT book anything into stock: to put arrived items into the inventory use receive_order. To add, change or remove lines later use edit_order_items. To build an order from what the planned brews are short of, use create_order_from_shortages.

Needs the plan feature orders. Scope: inventory:write (or write).

AuthorizationBearer <token>

API token in format: bfk_. Each operation lists the token scope it requires (the scopes are listed below).

  • read: Read everything (all areas)
  • write: Create, change and delete everything (all areas)
  • brews:read: List and view brews
  • brews:write: Create, update, delete brews and notes
  • inventory:read: List inventory items
  • inventory:write: Create, update, delete inventory items
  • equipment:read: List equipment profiles
  • equipment:write: Create, update, delete equipment profiles
  • styles:read: List style profiles
  • styles:write: Create, update, delete style profiles
  • profiles:read: List mash, fermentation, and water profiles
  • custom-fields:read: List custom field definitions
  • custom-fields:write: Create, update, delete custom field definitions
  • profiles:write: Create, update, delete mash, fermentation, and water profiles
  • cellar:read: View cellar, packaged stock, tap lists, and labels
  • cellar:write: Manage cellar, packaging, stock, tap lists, and labels
  • settings:read: View preferences, imports, calculators, and your data export
  • settings:write: Change preferences and undo imports
  • community:read: View community, feedback, tickets, inbox, and account overview
  • community:write: Post, vote, and reply in community, feedback, and tickets

In: header

Scope: inventory:write

Request Body

application/json

order?string

The order: its id (from get_orders) or its exact name (e.g. "Hopfen der Welt November"). Case does not matter. Leave out to create a new order.

name?string

Order name (required to create), e.g. "Hopfen der Welt November".

Length1 <= length <= 200
supplier?string

Shop or supplier (e.g. "Hopfen der Welt"); "" clears it. Becomes the stock rows' supplier when receiving.

Lengthlength <= 200
status?string

"draft" (still to order), "ordered" (placed; its items count as on order in the planner), "partial" (some items arrived), "received" (everything arrived). New orders start as "draft".

Value in"draft" | "ordered" | "partial" | "received"
shipping_cost?|

Shipping for the whole order in the user's currency (split over the line prices when receiving); null clears it.

expected_date?|

Expected delivery date, YYYY-MM-DD (e.g. "2026-11-20"); YYYY-MM means the last day of that month.

notes?string

Free text; "" clears it.

Lengthlength <= 1000
items?array<>

Create only: lines for the new order. Each: {ingredient (name or id), amount, unit?, type?, form?, alpha_acid_pct?, harvest_year?, estimated_cost?, price_paid?, notes?}, e.g. [{"ingredient": "Pale Ale Malt", "amount": 1, "unit": "kg"}].

Itemsitems <= 100
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://brewforge.sh/api/v1/actions/save_order" \  -H "Content-Type: application/json" \  -d '{}'
{
  "order": {
    "id": "string",
    "name": "string",
    "supplier": "string",
    "status": "draft",
    "ordered_date": "string",
    "expected_date": "string",
    "received_date": "string",
    "shipping_cost": 0,
    "notes": "string",
    "item_count": 0,
    "arrived_count": 0,
    "items_cost": 0,
    "total_cost": 0,
    "next_step": "add_items",
    "free_text_items": [
      "string"
    ],
    "items": [
      {
        "id": "string",
        "type": "fermentable",
        "name": "string",
        "ingredient_id": "string",
        "form": "string",
        "alpha_acid_pct": 0,
        "harvest_year": 0,
        "amount": 0,
        "ordered_amount": 0,
        "unit": "string",
        "received": 0,
        "remaining": 0,
        "arrival": "pending",
        "estimated_cost": 0,
        "price_paid": 0,
        "notes": "string"
      }
    ]
  },
  "created": true,
  "note": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string",
    "candidates": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "details": {}
  }
}