Apicbase Suppliers API

Suppliers and their packages.

OpenAPI Specification

apicbase-suppliers-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Apicbase Ingredients Suppliers 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: Suppliers
  description: Suppliers and their packages.
paths:
  /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'
components:
  schemas:
    PaginatedSupplierList:
      allOf:
      - $ref: '#/components/schemas/Pagination'
      - type: object
        properties:
          results:
            type: array
            items:
              $ref: '#/components/schemas/Supplier'
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message.
    Supplier:
      type: object
      properties:
        id:
          type: string
        company_name:
          type: string
        email:
          type: string
        vat_number:
          type: string
    Pagination:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          nullable: true
        previous:
          type: string
          nullable: true
  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).