Bokio chart-of-accounts API

Operations for managing chart of accounts

OpenAPI Specification

bokio-chart-of-accounts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: '1.0'
  title: Company authorization chart-of-accounts API
  description: The Bokio Company API containing all resources for company tenant.
  termsOfService: https://docs.bokio.se/page/terms/
  contact:
    name: Bokio
    url: https://docs.bokio.se
    email: support@bokio.se
servers:
- url: https://api.bokio.se/v1
  description: Bokio API
  x-bokio-api: true
security:
- tokenAuth: []
tags:
- name: chart-of-accounts
  description: Operations for managing chart of accounts
paths:
  /companies/{companyId}/chart-of-accounts:
    parameters:
    - name: companyId
      in: path
      required: true
      description: Unique identifier of the company
      schema:
        type: string
        format: uuid
      example: ea9ee4dd-fae3-4aec-a7db-6fc9cc1f8135
    get:
      tags:
      - chart-of-accounts
      summary: Get chart of accounts
      description: 'Retrieves the complete chart of accounts for the company, merging bookkeeping accounts with their associated money account details.


        **Scope:** `chart-of-accounts:read`

        '
      operationId: get-chart-of-accounts
      parameters:
      - name: query
        in: query
        required: false
        description: 'Optional query to filter the data set with supported fields listed below and [available operations](filtering).


          | Field                | Type        |

          | -------------------- | ----------- |

          | account              | number      |

          | name                 | string      |

          | accountType          | string    |

          '
        schema:
          type: string
        example: account==3950
      responses:
        '200':
          description: Chart of accounts retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/account'
              examples:
                Chart of accounts:
                  value:
                  - account: 1930
                    name: Företagskonto / Affärskonto
                    accountType: basePlanAccount
                  - account: 3001
                    name: Försäljning varor, 25% moms
                    accountType: basePlanAccount
                  - account: 8001
                    name: Custom Account
                    accountType: customAccount
        '404':
          description: Company not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
      security:
      - tokenAuth: []
      - access_token:
        - chart-of-accounts:read
  /companies/{companyId}/chart-of-accounts/{account}:
    parameters:
    - name: companyId
      in: path
      required: true
      description: Unique identifier of the company
      schema:
        type: string
        format: uuid
      example: ea9ee4dd-fae3-4aec-a7db-6fc9cc1f8135
    - name: account
      in: path
      required: true
      description: The number of the account
      schema:
        type: integer
        format: int32
    get:
      tags:
      - chart-of-accounts
      summary: Get specific account
      description: 'Retrieves details of a specific account from the chart of accounts using the account number.


        **Scope:** `chart-of-accounts:read`

        '
      operationId: get-account-with-number
      responses:
        '200':
          description: Account retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountWithDetails'
              examples:
                Account:
                  value:
                    account: 1930
                    name: Företagskonto / Affärskonto
                    accountType: basePlanAccount
                    accountBalance: 15000.75
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
      security:
      - tokenAuth: []
      - access_token:
        - chart-of-accounts:read
components:
  schemas:
    apiError:
      type: object
      title: apiError
      properties:
        code:
          type: string
        message:
          type: string
        bokioErrorId:
          type: string
          format: uuid
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
    accountWithDetails:
      allOf:
      - $ref: '#/components/schemas/account'
      - type: object
        title: accountWithDetails
        properties:
          accountBalance:
            type: number
            format: double
            description: The current balance of the account
            nullable: true
        example:
          account: 1930
          name: Företagskonto / Affärskonto
          accountType: basePlanAccount
          accountBalance: 15000.75
    account:
      type: object
      title: account
      properties:
        account:
          type: integer
          format: int32
          description: The account number
        name:
          type: string
          description: The account name
        accountType:
          type: string
          enum:
          - customAccount
          - basePlanAccount
          description: The type of account (custom or base plan)
      example:
        account: 2610
        name: Företagskonto / Affärskonto
        accountType: basePlanAccount
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
    access_token:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /token
          scopes: {}
        authorizationCode:
          authorizationUrl: /authorize
          tokenUrl: /token
          scopes:
            bank-payments:read-limited: Read access to bank payments created by the integration
            bank-payments:write: Write access to bank payments
            chart-of-accounts:read: Read access to chart of accounts
            company-information:read: Read access to company information
            credit-notes:read: Read access to credit notes
            credit-notes:write: Write access to credit notes
            customers:read: Read access to customers
            customers:write: Write access to customers
            fiscal-years:read: Read access to fiscal years
            invoices:read: Read access to invoices
            invoices:write: Write access to invoices
            items:read: Read access to items
            items:write: Write access to items
            journal-entries:read: Read access to journal entries
            journal-entries:write: Write access to journal entries
            sie:read: Read access to SIE files
            supplier-invoices:read: Read access to supplier invoices
            supplier-invoices:write: Write access to supplier invoices
            suppliers:read: Read access to suppliers
            suppliers:write: Write access to suppliers
            tags:read: Read access to tag groups and tags
            tags:write: Write access to tag groups and tags
            uploads:read: Read access to uploads
            uploads:write: Write access to uploads
    client_auth:
      type: http
      scheme: basic
externalDocs:
  url: https://docs.bokio.se
  description: Read the API Documentation
x-readme:
  explorer-enabled: true
  proxy-enabled: false
  samples-languages:
  - shell
  - http
  - node
  - csharp
  - java