BanQu Asset Categories API

The Asset Categories API from BanQu — 2 operation(s) for asset categories.

OpenAPI Specification

banqu-asset-categories-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BanQu Asset Categories API
  version: 3.3.4
  description: The BanQu API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP verbs, which can be understood by off-the-shelf HTTP clients, and [JSON](http://www.json.org) for input and output.
servers:
- url: https://banqu.app:443/api/v1
security:
- Bearer: []
tags:
- name: Asset Categories
paths:
  /assets/categories:
    get:
      description: List asset categories
      tags:
      - Asset Categories
      responses:
        '200':
          description: List of asset categories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetCategory'
        '401':
          $ref: '#/components/responses/401'
    post:
      description: Create asset category
      tags:
      - Asset Categories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetCategory'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: string
                description: Created category ID
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
  /assets/categories/{categoryId}:
    delete:
      description: Delete asset category
      tags:
      - Asset Categories
      parameters:
      - in: path
        name: categoryId
        schema:
          type: string
        required: true
      responses:
        '204':
          $ref: '#/components/responses/204'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
components:
  responses:
    '404':
      description: "HTTP 404 - Not Found \nRequested resource could not be found"
    '204':
      description: "HTTP 204 - No Content \nThe request has been processed, but no content will be provided in response"
    '400':
      description: "HTTP 400 - Bad Request \nThe request is formatted incorrectly, most likely some of the required parameters are missed"
    '401':
      description: "HTTP 401 - Unauthorized \nUser is not authenticated or session has expired"
  schemas:
    AssetDescription:
      type: string
      minLength: 0
      maxLength: 200
    AssetUom:
      title: Asset Unit of Measurement
      type: string
      enum:
      - BR
      - BO
      - BX
      - BU
      - CN
      - CA
      - CH
      - DO
      - EA
      - FO
      - FT
      - GA
      - GR
      - HR
      - JA
      - KG
      - KK
      - LT
      - Q3
      - MR
      - MG
      - M4
      - OZ
      - PK
      - PR
      - PC
      - LB
      - SJ
      - VS
      - YD
      example: KG
    AssetCategory:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/AssetCode'
        description:
          $ref: '#/components/schemas/AssetDescription'
        uom:
          $ref: '#/components/schemas/AssetUom'
      required:
      - code
    AssetCode:
      type: string
      minLength: 2
      maxLength: 32
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Your authentication token