# VibePOS Open API v2 > 釋出日期:2026-11-28|VibePOS 企業級 POS 與 ERP 開放串接介面(支援門市、商品、庫存、採購調撥盤點、訂單退貨、會員、營收對帳、交接班現金流與出勤)。 ## Base URL & Documentation - Production Base URL (v2): `https://api.vibepos.org/open/v2` - Sandbox Base URL (v2): `https://sandbox-api.vibepos.org/open/v2` - OpenAPI 3.0 JSON (v2): `https://api.vibepos.org/open/v2/schema.json` - Interactive Docs (Swagger UI): `https://api.vibepos.org/open/v2/docs/` - Developer Portal: `https://www.vibepos.org/developers` ## Authentication Every request MUST include: - `X-Api-Key`: `` - `X-Api-Secret`: `` (Alternative: `Authorization: Bearer :`) Security rules: - Requests are strictly restricted to registered IP Whitelists (CIDR supported). - ChainGroup credentials dynamically cover all active stores/counters in the group; pass `X-Business-ID: ` to target a specific store. - Rate limit defaults to 60 requests/min per credential (returns HTTP `429` when exceeded). ## Scopes (Read / Write Separation) - `stores:read` — List authorized stores - `products:read` / `products:write` — Read or create/update categories, products, and variants - `inventory:read` / `inventory:write` — Read stock/warehouses/adjustments or atomically adjust stock - `procurement:read` — Read suppliers, stock entries, transfers, and stock counts - `orders:read` — Read orders, payments, and refunds - `customers:read` / `customers:write` — Read or create/update store members - `reports:read` — Read daily revenue, refunds, and payment-method reconciliation summary - `cash_flow:read` — Read shift closings, cash counts, and petty cash logs - `attendance:read` — Read staff attendance records ## Standard Query Parameters (List Endpoints) - `created_at_from` / `created_at_to` (ISO 8601 or `YYYY-MM-DD`) - `updated_at_from` / `updated_at_to` (ISO 8601 or `YYYY-MM-DD`) - `page` (default `1`), `page_size` (default `50`, max `200`) ## v2 Endpoints - `GET /open/v2/stores/` (`stores:read`) - `GET /open/v2/warehouses/` (`inventory:read`) - `GET, POST /open/v2/categories/` (`products:read` / `products:write`) - `GET, POST /open/v2/products/` (`products:read` / `products:write`) - `GET, PATCH /open/v2/products/{id}/` (`products:read` / `products:write`) - `PATCH /open/v2/products/{product_id}/variants/{variant_id}/` (`products:write`) - `GET /open/v2/inventory/` (`inventory:read`) - `GET /open/v2/inventory/logs/` (`inventory:read`) - `POST /open/v2/inventory/adjust/` (`inventory:write`, body: `{"variant_id": int, "delta": int, "note": str}`) - `GET /open/v2/stock-adjustments/` (`inventory:read`) - `GET /open/v2/suppliers/` (`procurement:read`) - `GET /open/v2/stock-entries/` (`procurement:read`) - `GET /open/v2/stock-transfers/` (`procurement:read`) - `GET /open/v2/stock-counts/` (`procurement:read`) - `GET /open/v2/orders/` (`orders:read`) - `GET /open/v2/orders/{id}/` (`orders:read`) - `GET /open/v2/refunds/` (`orders:read`) - `GET /open/v2/discounts/` (`orders:read`) - `GET /open/v2/coupons/usages/` (`orders:read`) - `GET /open/v2/shipments/` (`orders:read`, requires `official_website_module_enabled`) - `GET, POST /open/v2/customers/` (`customers:read` / `customers:write`) - `GET, PATCH /open/v2/customers/{id}/` (`customers:read` / `customers:write`) - `GET /open/v2/reports/revenue/` (`reports:read`) - `GET /open/v2/shifts/` (`cash_flow:read`) - `GET /open/v2/cash-counts/` (`cash_flow:read`) - `GET /open/v2/petty-cash/` (`cash_flow:read`) - `GET /open/v2/attendance/` (`attendance:read`) - `GET /open/v2/schedules/` (`attendance:read`)