Accounto Public API v2 (2.0.0)

Download OpenAPI specification:

Public API for accessing Accounto data

List accounts for a tenant

Returns a paginated list of accounts.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/accounts

# Get specific page
GET /v2/{tenant_id}/accounts?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/accounts?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List addresses for a tenant

Returns a list of addresses for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new address

Creates a new address for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
address_type
required
string
Enum: "company" "person"

Type of address (company or person)

company_name
string

Company name (required for company type)

contact_person_name
string

Contact person name

email
string <email>

Email address

phone
string

Phone number

street
string

Street name

house_number
string

House number

postal_code
string

Postal code

city_name
string

City name

country_code
string

Country code (e.g., CH, DE, AT)

first_name
string

First name (for person type)

last_name
string

Last name (for person type)

salutation
string

Salutation

apartment
string

Apartment number

post_office_box
string

Post office box

vat_id
string

VAT ID

uid
string

UID (Swiss business identifier)

external_identifier
string

External identifier

language_default
string
Enum: "de" "en" "fr" "it"

Default language

Responses

Request samples

Content type
application/json
{
  • "address_type": "company",
  • "company_name": "Example Company Ltd.",
  • "contact_person_name": "John Smith",
  • "email": "contact@example.com",
  • "phone": "+41 123 456 78 90",
  • "street": "Example Street",
  • "house_number": "123",
  • "postal_code": "1234",
  • "city_name": "Zurich",
  • "country_code": "CH",
  • "language_default": "de"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "address_type": "company",
  • "company_name": "Example Company Ltd.",
  • "contact_person_name": "John Smith",
  • "email": "contact@example.com",
  • "phone": "+41 123 456 78 90",
  • "street": "Example Street",
  • "house_number": "123",
  • "postal_code": "1234",
  • "city_name": "Zurich",
  • "country_code": "CH",
  • "language_default": "de",
  • "address_number": 10001,
  • "address_number_text": "C10001",
  • "tenant_id": 1,
  • "created_at": "2024-01-01T12:00:00Z",
  • "updated_at": "2024-01-01T12:00:00Z"
}

Update an address

Updates an existing address for the specified tenant. Only provided fields will be updated (partial update).

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

address_id
required
integer <int64>

ID of the address to update

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "address_number": 0,
  • "address_number_text": "string",
  • "address_position": "string",
  • "address_type": "string",
  • "apartment": "string",
  • "budget_gross_cents": 0,
  • "canton_code": "string",
  • "city_name": "string",
  • "company_name": "string",
  • "company_type": "string",
  • "contact_person_name": "string",
  • "country_code": "string",
  • "creditor_due_gross_cents": 0,
  • "creditor_open_gross_cents": 0,
  • "debtor_due_gross_cents": 0,
  • "debtor_open_gross_cents": 0,
  • "email": "string",
  • "external_identifier": "string",
  • "first_name": "string",
  • "flags": [
    ],
  • "house_number": "string",
  • "invoiced_gross_cents": 0,
  • "language_default": "string",
  • "last_activity": "2019-08-24T14:15:22Z",
  • "last_name": "string",
  • "legal_type": "string",
  • "municipality_number": "string",
  • "open_gross_cents": 0,
  • "phone": "string",
  • "post_office_box": "string",
  • "postal_code": "string",
  • "salutation": "string",
  • "street": "string",
  • "uid": "string",
  • "vat_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "tenant_id": 0
}

Delete an address

Deletes an address for the specified tenant. This is a hard delete - the address is permanently removed from the database if it has no associated records.

Example request:

DELETE /v2/{tenant_id}/addresses/{address_id}
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

address_id
required
integer <int64>

ID of the address to delete

Responses

Response samples

Content type
application/json
{
  • "error": "Address not found"
}

List bank transactions for a tenant

Returns a paginated list of bank transactions.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/bank_transactions

# Get specific page
GET /v2/{tenant_id}/bank_transactions?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/bank_transactions?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new bank transaction

Creates a new bank transaction for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
required
object

Responses

Request samples

Content type
application/json
{
  • "bank_transaction": {
    }
}

Response samples

Content type
application/json
{
  • "id": 789,
  • "bank_account_id": 123,
  • "external_id": "txn_abc123",
  • "amount_cents": 10000,
  • "transaction_date": "2024-01-01",
  • "booking_date": "2024-01-01",
  • "purpose": "Office supplies",
  • "creditor_name": "Supplier AG",
  • "debit": true,
  • "credit": false,
  • "tenant_id": 1,
  • "created_at": "2024-01-01T12:00:00Z",
  • "updated_at": "2024-01-01T12:00:00Z"
}

Book a document

Performs the complete booking process for a document in a single API call. This endpoint can either update an existing document or create a new one, then updates multiple related models (Document, AccountingDocument, PaymentDetails, and Bookings) in a single transaction and executes the booking process.

The operation is atomic - either all changes succeed or all changes are rolled back.

Usage:

  • To book an existing document: Include the id field in the documents object
  • To create and book a new document: Omit the id field and provide document creation parameters
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
required
object
object
object
Array of objects

Responses

Request samples

Content type
application/json
{
  • "documents": {
    },
  • "accounting_document": {
    },
  • "payment_details": {
    },
  • "bookings": [
    ]
}

Response samples

Content type
application/json
{
  • "bookings": [
    ]
}

List bookings for a tenant

Returns a paginated list of bookings.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/bookings

# Get specific page with date filters
GET /v2/{tenant_id}/bookings?page=2&start_date=2024-01-01&end_date=2024-12-31

# Get specific page with custom page size
GET /v2/{tenant_id}/bookings?page=2&items=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
start_date
string <date>

Start date for filtering (YYYY-MM-DD)

end_date
string <date>

End date for filtering (YYYY-MM-DD)

page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new booking

Creates a new booking for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
booking_date
required
string <date>

Date of the booking

booking_text
required
string

Description of the booking

booking_type
required
string
Enum: "none" "debtor_invoice" "debitor_invoice" "creditor_invoice" "credit_card" "debit_card" "cash_register" "expense" "cash" "private" "other" "manual_booking" "billing_module" "banking_module" "personal" "opening_balance" "payroll_run" "inventory" "asset" "closing" "accrual" "reversible" "balancing"

Type of booking

booking_number
integer

Booking number

address_id
integer

ID of the associated address

document_id
integer

ID of the associated document

expense_account_id
integer

ID of the expense account

revenue_account_id
integer

ID of the revenue account

expense_vat_code_id
integer

ID of the expense VAT code

revenue_vat_code_id
integer

ID of the revenue VAT code

debit_account_id
integer

ID of the debit account

credit_account_id
integer

ID of the credit account

debit_vat_code_id
integer

ID of the debit VAT code

credit_vat_code_id
integer

ID of the credit VAT code

currency_id
required
integer

ID of the currency

total_currency
required
number <decimal>

Total amount in the specified currency

including_tax
boolean

Whether the amount includes tax

payment_date
string <date>

Payment date

tag_id
integer

ID of the associated tag

original_gross_amount_cents
integer <int64>

Gross amount in booking currency cents (e.g., 10050 for CHF 100.50)

original_net_amount_cents
integer <int64>

Net amount in booking currency cents (excluding VAT)

original_tax_amount_cents
integer <int64>

Tax/VAT amount in booking currency cents

chf_gross_amount_cents
integer <int64>

Gross amount in CHF cents (for multi-currency bookings)

chf_net_amount_cents
integer <int64>

Net amount in CHF cents (for multi-currency bookings)

chf_tax_amount_cents
integer <int64>

Tax amount in CHF cents (for multi-currency bookings)

tax_rate
number <decimal>

Tax rate percentage (e.g., 7.7 for 7.7% VAT)

reporting_method
string
Enum: "effective_reporting_method" "net_tax_rate_method" "flat_tax_rate_method"

VAT reporting method

Responses

Request samples

Content type
application/json
{
  • "booking_date": "2024-01-01",
  • "booking_text": "Office supplies purchase",
  • "booking_type": "expense",
  • "currency_id": 1,
  • "total_currency": 150,
  • "expense_account_id": 330688,
  • "expense_vat_code_id": 76429,
  • "revenue_account_id": 330639,
  • "revenue_vat_code_id": null,
  • "debit_account_id": 330688,
  • "credit_account_id": 330639,
  • "credit_vat_code_id": null,
  • "debit_vat_code_id": 76429,
  • "including_tax": true,
  • "original_gross_amount_cents": 10050,
  • "original_net_amount_cents": 9300,
  • "original_tax_amount_cents": 750,
  • "chf_gross_amount_cents": 10050,
  • "chf_net_amount_cents": 9300,
  • "chf_tax_amount_cents": 750,
  • "tax_rate": 7.7,
  • "reporting_method": "effective_reporting_method"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "booking_date": "2024-01-01",
  • "booking_text": "Office supplies purchase",
  • "booking_type": "expense",
  • "currency_id": 1,
  • "total_currency": "150.00",
  • "expense_account_id": 330688,
  • "expense_vat_code_id": 76429,
  • "revenue_account_id": 330639,
  • "revenue_vat_code_id": null,
  • "debit_account_id": 330688,
  • "credit_account_id": 330639,
  • "credit_vat_code_id": null,
  • "debit_vat_code_id": 76429,
  • "including_tax": true,
  • "original_gross_amount_cents": 10050,
  • "original_net_amount_cents": 9300,
  • "original_tax_amount_cents": 750,
  • "chf_gross_amount_cents": 10050,
  • "chf_net_amount_cents": 9300,
  • "chf_tax_amount_cents": 750,
  • "tax_rate": 7.7,
  • "reporting_method": "effective_reporting_method",
  • "tenant_id": 1,
  • "created_at": "2024-01-01T12:00:00Z",
  • "updated_at": "2024-01-01T12:00:00Z"
}

Delete a booking

Soft deletes a booking for the specified tenant. The booking is marked as discarded but not permanently removed from the database.

Example request:

DELETE /v2/{tenant_id}/bookings/{booking_id}
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

booking_id
required
integer <int64>

ID of the booking to delete

Responses

Response samples

Content type
application/json
{
  • "error": "Booking not found"
}

List categories for a tenant

Returns a list of categories for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List documents for a tenant

Returns a paginated list of documents.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/documents

# Get specific page
GET /v2/{tenant_id}/documents?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/documents?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new document

Creates a new document for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
document_type
string
Enum: "accounting_document" "account_statement" "balance_sheet" "banking" "contract" "correspondence" "credit_card_statement" "credit_note" "delivery_statement" "dunning" "dunning_fees" "human_resources" "insurance" "insurance_policy" "none" "order" "other" "order_confirmation" "order_delivery" "profit_and_loss_statement" "proforma_invoice" "receipt" "tax"

Type of document

document_date
string <date>

Date of the document

payment_type
string
Enum: "cash" "creditor_invoice" "debtor_invoice" "debitor_invoice" "private" "expense" "credit_card" "debit_card" "cash_register" "other"

Payment type

payment_status
string
Enum: "pending" "approved" "rejected" "paid" "reconciled"

Payment status

booking_status
string
Enum: "none" "pending" "review" "assigned" "rejected" "done"

Booking status

status
string
Enum: "pending" "processing" "waiting" "done" "archived" "failed" "invalid"

Document status

custom_title
string

Custom title for the document

address_id
integer

ID of the associated address

employee_id
integer

ID of the associated employee

due_date
string <date>

Due date for the document

note
string

Additional notes

uploader_email
string <email>

Email of the person who uploaded the document

inbound_source
string
Enum: "annex" "cash_register_module" "documents_module" "email" "expenses_module" "inbound-api" "insurances_module" "mobile-app" "peax"

Source of the document

source_file_signed_id
string

Signed ID of the uploaded file (obtained from POST /v2/{tenant_id}/uploads)

extraction_status
string
Enum: "pending" "previews_in_progress" "extraction_in_progress" "awaiting_validation" "failed" "done"

Extraction status of the document

extraction_verify_status
boolean

Extraction verification status of the document

Responses

Request samples

Content type
application/json
{
  • "document_type": "receipt",
  • "document_date": "2024-01-01",
  • "payment_type": "expense",
  • "payment_status": "pending",
  • "booking_status": "none",
  • "status": "pending",
  • "custom_title": "Office supplies receipt",
  • "inbound_source": "documents_module",
  • "source_file_signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWxqWmpJME5qVXhMV1F3TkRjdE5EWXhOaTA1Tmpaa0xUZzJZbVF3TmpjMk1qVXhOQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
  • "extraction_status": "pending"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "document_type": "receipt",
  • "document_date": "2024-01-01",
  • "payment_type": "expense",
  • "payment_status": "pending",
  • "booking_status": "none",
  • "status": "pending",
  • "custom_title": "Office supplies receipt",
  • "inbound_source": "documents_module",
  • "source_file_signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWxqWmpJME5qVXhMV1F3TkRjdE5EWXhOaTA1Tmpaa0xUZzJZbVF3TmpjMk1qVXhOQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
  • "extraction_status": "pending",
  • "extraction_verify_status": false,
  • "tenant_id": 1,
  • "created_at": "2024-01-01T12:00:00Z",
  • "updated_at": "2024-01-01T12:00:00Z"
}

Delete a document

Soft deletes a document for the specified tenant. The document is marked as discarded but not permanently removed from the database.

Example request:

DELETE /v2/{tenant_id}/documents/{document_id}
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

document_id
required
integer <int64>

ID of the document to delete

Responses

Response samples

Content type
application/json
{
  • "error": "Document not found"
}

List invoices for a tenant

Returns a list of invoices for the specified tenant.

Example requests:

# Get all invoices
GET /v2/{tenant_id}/invoices

# Filter by status
GET /v2/{tenant_id}/invoices?filter[status]=draft

# Filter by invoice type
GET /v2/{tenant_id}/invoices?filter[invoice_type]=invoice
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
filter[status]
string
Enum: "draft" "sent" "paid" "cancelled"

Filter by invoice status

filter[invoice_type]
string
Enum: "invoice" "credit_note" "offer" "order" "delivery_note"

Filter by invoice type

filter[address_id]
integer <int64>

Filter by address ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new invoice

Creates a new invoice for the specified tenant.

Example request:

{
  "invoice": {
    "address_id": 100,
    "issuer_address_id": 101,
    "invoice_date": "2024-01-01",
    "due_date": "2024-01-31",
    "currency": "CHF",
    "status": "draft",
    "invoice_type": "invoice",
    "total_gross_cents": 10770,
    "total_net_cents": 10000,
    "total_tax_cents": 770,
    "vat_included": true
  }
}
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: application/json
required
required
object

Responses

Request samples

Content type
application/json
{
  • "invoice": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "tenant_id": 1,
  • "address_id": 100,
  • "issuer_address_id": 101,
  • "status": "draft",
  • "invoice_type": "invoice",
  • "currency": "CHF",
  • "invoice_date": "2024-01-01",
  • "due_date": "2024-01-31",
  • "total_gross_cents": 10770,
  • "total_net_cents": 10000,
  • "total_tax_cents": 770,
  • "vat_included": true,
  • "created_at": "2024-01-01T12:00:00Z",
  • "updated_at": "2024-01-01T12:00:00Z"
}

Get OpenAPI specification

Returns the OpenAPI specification for the API v2

Responses

List postings for a tenant

Returns a paginated list of postings.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/postings

# Get specific page with date filters
GET /v2/{tenant_id}/postings?page=2&start_date=2024-01-01&end_date=2024-12-31

# Get specific page with custom page size
GET /v2/{tenant_id}/postings?page=2&items=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
start_date
string <date>

Start date for filtering (YYYY-MM-DD)

end_date
string <date>

End date for filtering (YYYY-MM-DD)

page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List tags for a tenant

Returns a paginated list of tags.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/tags

# Get specific page
GET /v2/{tenant_id}/tags?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/tags?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List tasks for a tenant

Returns a paginated list of tasks.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/tasks

# Get specific page
GET /v2/{tenant_id}/tasks?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/tasks?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get tenant details

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "online": true,
  • "status": "active",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "client_ids": [
    ]
}

List subtotals for a tenant

Returns a paginated list of subtotals.

Example requests:

# Get first page (default 100 items)
GET /v2/{tenant_id}/subtotals

# Get specific page
GET /v2/{tenant_id}/subtotals?page=2

# Get specific page with custom page size
GET /v2/{tenant_id}/subtotals?page=2&limit=50
Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Upload a file

Uploads a file and returns a signed ID that can be used to attach the file to a document. The signed ID should be used in the source_file_signed_id parameter when creating a document.

Supported file types: PDF, JPEG, PNG, TIFF, GIF, CSV Maximum file size: 25 MB

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

Request Body schema: multipart/form-data
required
file
required
string <binary>

The file to upload

Responses

Response samples

Content type
application/json
{
  • "signed_id": "eyJfcmFpbHMi...",
  • "filename": "receipt.pdf",
  • "content_type": "application/pdf",
  • "byte_size": 245760
}

List VAT codes for a tenant

Returns a list of VAT codes for the specified tenant.

Authorizations:
BearerAuth
path Parameters
tenant_id
required
integer

ID of the tenant

query Parameters
page
integer
Default: 1

Page number for pagination

limit
integer <= 1000
Default: 100

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]