Sage Bank Accounts API

Bank account and transaction management

OpenAPI Specification

sage-bank-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sage Accounting Bank Accounts API
  description: 'Sage Accounting API (v3.1) is a RESTful web service that connects software to Sage''s cloud accounting platform. Supports Sage Business Cloud Accounting and Sage Business Cloud Start products. Covers contacts, sales and purchase invoices, payments, bank accounts, ledger accounts, products/services, and financial reporting. Uses OAuth 2.0 for authentication. Rate limits apply: 1,296,000 daily requests, 150 concurrent, 100 per minute per company.'
  version: 3.1.0
  contact:
    name: Sage Developer Support
    url: https://developer.sage.com/support/
  license:
    name: Sage Developer Agreement
    url: https://developer.sage.com/
servers:
- url: https://api.accounting.sage.com/v3.1
  description: Sage Accounting API v3.1
security:
- OAuth2: []
tags:
- name: Bank Accounts
  description: Bank account and transaction management
paths:
  /bank_accounts:
    get:
      operationId: listBankAccounts
      summary: List Bank Accounts
      description: Returns a list of bank accounts connected to the business.
      tags:
      - Bank Accounts
      responses:
        '200':
          description: Bank account list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountList'
    post:
      operationId: createBankAccount
      summary: Create Bank Account
      description: Creates a new bank account record.
      tags:
      - Bank Accounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountRequest'
      responses:
        '201':
          description: Bank account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
  /bank_accounts/{key}:
    get:
      operationId: getBankAccount
      summary: Get Bank Account
      description: Returns details of a specific bank account.
      tags:
      - Bank Accounts
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Bank account details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
components:
  schemas:
    CurrencyRef:
      type: object
      properties:
        id:
          type: string
        displayed_as:
          type: string
    CreateBankAccountRequest:
      type: object
      properties:
        bank_account:
          type: object
          required:
          - name
          - bank_account_type_id
          properties:
            name:
              type: string
            bank_account_type_id:
              type: string
              enum:
              - BANK
              - CREDIT_CARD
              - CASH
              - SAVINGS
              - OTHER
            nominal_code:
              type: string
    BankAccount:
      type: object
      properties:
        id:
          type: string
        displayed_as:
          type: string
        name:
          type: string
        nominal_code:
          type: string
        balance:
          type: number
        bank_account_type:
          $ref: '#/components/schemas/TypeRef'
        currency:
          $ref: '#/components/schemas/CurrencyRef'
    BankAccountList:
      type: object
      properties:
        $items:
          type: array
          items:
            $ref: '#/components/schemas/BankAccount'
    TypeRef:
      type: object
      properties:
        id:
          type: string
        displayed_as:
          type: string
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.sageone.com/oauth2/auth
          tokenUrl: https://oauth.accounting.sage.com/token
          scopes:
            full_access: Full read/write access to all accounting data
            readonly: Read-only access to accounting data