Apicbase Outlets API
List, create, and edit outlets (locations) in the library, with name and custom-field filtering for multi-site operations.
List, create, and edit outlets (locations) in the library, with name and custom-field filtering for multi-site operations.
openapi: 3.0.1
info:
title: Apicbase API
description: >-
REST API for the Apicbase food & beverage back-of-house management platform.
Exposes the product library (ingredients, recipes, stock items), inventory,
procurement (purchase orders, suppliers), and outlets (accounts) over HTTPS
with OAuth 2.0 bearer-token authentication. Endpoint paths, methods, and
parameters in this document reflect the public developer documentation at
https://developers.apicbase.com.
termsOfService: https://www.apicbase.com/terms-of-service
contact:
name: Apicbase API Support
url: https://developers.apicbase.com/docs/welcome
version: '2.0'
servers:
- url: https://api.apicbase.com
description: Apicbase production API
security:
- oauth2: []
tags:
- name: Ingredients
description: Ingredient library entities.
- name: Recipes
description: Recipes and menu engineering entities.
- name: Stock
description: Stock items and inventory.
- name: Procurement
description: Purchase orders.
- name: Suppliers
description: Suppliers and their packages.
- name: Outlets
description: Outlets (locations / accounts).
paths:
/api/v2/products/ingredients/:
get:
operationId: listIngredients
tags:
- Ingredients
summary: Get ingredients
description: Returns a paginated list of ingredients in the active library.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: name
in: query
description: Filter by ingredient name in the library's native language.
schema:
type: string
- name: category
in: query
description: Filter by category.
schema:
type: string
- name: supplier
in: query
description: Filter by supplier ID.
schema:
type: string
- name: allergen_verified
in: query
description: Filter by allergen verification status.
schema:
type: boolean
- name: internal_uid
in: query
description: Filter by internal reference number.
schema:
type: string
responses:
'200':
description: A paginated list of ingredients.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedIngredientList'
'401':
$ref: '#/components/responses/Unauthorized'
post:
operationId: createIngredient
tags:
- Ingredients
summary: Create an ingredient
description: Creates a new ingredient from a JSON-serialized object in the request body.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/IngredientWrite'
responses:
'201':
description: The created ingredient.
content:
application/json:
schema:
$ref: '#/components/schemas/Ingredient'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/api/v2/products/ingredients/{id}/:
get:
operationId: getIngredient
tags:
- Ingredients
summary: Get ingredient details
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: The requested ingredient.
content:
application/json:
schema:
$ref: '#/components/schemas/Ingredient'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/api/v2/products/recipes/:
get:
operationId: listRecipes
tags:
- Recipes
summary: Get recipes
description: Returns a paginated list of recipes in the active library.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: uid
in: query
description: Filter by recipe UID.
schema:
type: string
- name: name
in: query
schema:
type: string
responses:
'200':
description: A paginated list of recipes.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedRecipeList'
'401':
$ref: '#/components/responses/Unauthorized'
post:
operationId: createRecipe
tags:
- Recipes
summary: Create a recipe
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecipeWrite'
responses:
'201':
description: The created recipe.
content:
application/json:
schema:
$ref: '#/components/schemas/Recipe'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/api/v2/products/stock_items/:
get:
operationId: listStockItems
tags:
- Stock
summary: Get stock items
description: Returns a paginated list of stock items.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: name
in: query
schema:
type: string
- name: ingredient
in: query
description: Filter by ingredient ID.
schema:
type: string
- name: stockable
in: query
schema:
type: boolean
- name: gtin
in: query
description: Filter by GTIN / EAN code.
schema:
type: string
responses:
'200':
description: A paginated list of stock items.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedStockItemList'
'401':
$ref: '#/components/responses/Unauthorized'
/api/v2/procurement/purchase_orders/:
get:
operationId: listPurchaseOrders
tags:
- Procurement
summary: Get purchase orders
description: Returns a paginated list of all purchase orders in the library.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: supplier
in: query
description: Filter by supplier ID.
schema:
type: string
- name: outlet
in: query
description: Filter by outlet ID.
schema:
type: string
- name: order_number
in: query
schema:
type: string
- name: status
in: query
schema:
type: string
enum:
- IN_PROGRESS
- ORDERED
- DELIVERED
responses:
'200':
description: A paginated list of purchase orders.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedPurchaseOrderList'
'401':
$ref: '#/components/responses/Unauthorized'
post:
operationId: createPurchaseOrder
tags:
- Procurement
summary: Create a purchase order
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseOrderWrite'
responses:
'201':
description: The created purchase order.
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseOrder'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/api/v2/suppliers/:
get:
operationId: listSuppliers
tags:
- Suppliers
summary: Get suppliers
description: Returns a paginated list of suppliers in the library.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: company_name
in: query
schema:
type: string
- name: email
in: query
schema:
type: string
- name: vat_number
in: query
schema:
type: string
responses:
'200':
description: A paginated list of suppliers.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedSupplierList'
'401':
$ref: '#/components/responses/Unauthorized'
/api/v2/accounts/outlets/:
get:
operationId: listOutlets
tags:
- Outlets
summary: Get outlets
description: Returns a list of outlets in the library, complete with information about them.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Ordering'
- name: name
in: query
schema:
type: string
responses:
'200':
description: A paginated list of outlets.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedOutletList'
'401':
$ref: '#/components/responses/Unauthorized'
components:
securitySchemes:
oauth2:
type: oauth2
description: >-
OAuth 2.0 authorization code flow. Access tokens are bearer tokens
valid for 7 days; refresh tokens obtain new access tokens. Include the
token in the Authorization header as "Bearer ACCESS_TOKEN".
flows:
authorizationCode:
authorizationUrl: https://app.apicbase.com/oauth/authorize/
tokenUrl: https://api.apicbase.com/oauth/token/
refreshUrl: https://api.apicbase.com/oauth/token/
scopes:
accounts: Access account and outlet data.
library: Access library data (ingredients, recipes, stock).
parameters:
Page:
name: page
in: query
description: Page number for paginated results.
schema:
type: integer
format: int32
Ordering:
name: ordering
in: query
description: Field to order results by.
schema:
type: string
IdPath:
name: id
in: path
required: true
description: Resource identifier.
schema:
type: string
responses:
BadRequest:
description: The request was malformed or failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing or invalid access token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: The requested resource was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
detail:
type: string
description: Human-readable error message.
Pagination:
type: object
properties:
count:
type: integer
next:
type: string
nullable: true
previous:
type: string
nullable: true
Ingredient:
type: object
properties:
id:
type: string
name:
type: string
short_name:
type: string
internal_uid:
type: string
category:
type: string
subcategory:
type: string
allergen_verified:
type: boolean
conversion_ratio:
type: number
format: float
shelf_life:
type: integer
approved:
type: boolean
in_use:
type: boolean
created_date:
type: string
format: date-time
modified_date:
type: string
format: date-time
IngredientWrite:
type: object
required:
- name
properties:
name:
type: string
internal_uid:
type: string
category:
type: string
PaginatedIngredientList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Ingredient'
Recipe:
type: object
properties:
id:
type: string
uid:
type: string
name:
type: string
category:
type: string
sell_price:
type: number
format: float
created_date:
type: string
format: date-time
RecipeWrite:
type: object
required:
- name
properties:
name:
type: string
uid:
type: string
category:
type: string
sell_price:
type: number
format: float
PaginatedRecipeList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Recipe'
StockItem:
type: object
properties:
id:
type: string
name:
type: string
ingredient:
type: string
stockable:
type: boolean
weighted:
type: boolean
gtin:
type: string
modified_date:
type: string
format: date-time
PaginatedStockItemList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/StockItem'
PurchaseOrder:
type: object
properties:
id:
type: string
order_number:
type: string
supplier:
type: string
outlet:
type: string
status:
type: string
enum:
- IN_PROGRESS
- ORDERED
- DELIVERED
ordered_on:
type: string
format: date-time
expected_delivery_date:
type: string
format: date
discount:
type: number
format: float
PurchaseOrderWrite:
type: object
required:
- supplier
- outlet
properties:
supplier:
type: string
outlet:
type: string
expected_delivery_date:
type: string
format: date
PaginatedPurchaseOrderList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/PurchaseOrder'
Supplier:
type: object
properties:
id:
type: string
company_name:
type: string
email:
type: string
vat_number:
type: string
PaginatedSupplierList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Supplier'
Outlet:
type: object
properties:
id:
type: string
name:
type: string
custom_fields:
type: object
additionalProperties: true
PaginatedOutletList:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/Outlet'