Apicbase Stock API

Stock items and inventory.

OpenAPI Specification

apicbase-stock-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Apicbase Ingredients Stock 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: Stock
  description: Stock items and inventory.
paths:
  /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'
components:
  schemas:
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message.
    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
    Pagination:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          nullable: true
        previous:
          type: string
          nullable: true
    PaginatedStockItemList:
      allOf:
      - $ref: '#/components/schemas/Pagination'
      - type: object
        properties:
          results:
            type: array
            items:
              $ref: '#/components/schemas/StockItem'
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    Ordering:
      name: ordering
      in: query
      description: Field to order results by.
      schema:
        type: string
    Page:
      name: page
      in: query
      description: Page number for paginated results.
      schema:
        type: integer
        format: int32
  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).