BrewForge Docs

List orders or open one

Orders are the user's purchasing lists (what to buy from a shop, what is on the way, what arrived). Without order: lists orders, newest activity first, with status, item and arrival counts and costs; filter by status or name. With order (id or name): that order with all its lines (line ids, amounts, units, received, prices) and next_step. Costs are in the user's currency. Line ids are what edit_order_items and receive_order take. Needs the plan feature `orders`. Scope: `inventory:read` (or `read`).

POST
/api/v1/actions/get_orders

Orders are the user's purchasing lists (what to buy from a shop, what is on the way, what arrived). Without order: lists orders, newest activity first, with status, item and arrival counts and costs; filter by status or name. With order (id or name): that order with all its lines (line ids, amounts, units, received, prices) and next_step. Costs are in the user's currency. Line ids are what edit_order_items and receive_order take.

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

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:read

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 list orders.

status?array<>

List only orders in these statuses, e.g. ["ordered", "partial"] for what is on the way.

query?string

Text in the order name or supplier.

limit?integer

How many rows to return, 1-100 (default 20).

Range1 <= value <= 100
cursor?string

next_cursor from the previous page, to get the next page. Omit for the first page.

[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/get_orders" \  -H "Content-Type: application/json" \  -d '{}'
{
  "orders": [
    {
      "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"
      ]
    }
  ],
  "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"
      }
    ]
  },
  "next_cursor": "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": {}
  }
}