POST /transactions

Headers

  • Authorization string Required

    Authorization header

application/json

Body Required

  • transactionTypeNumber integer Required

    Type of transaction (as defined by the accounting system). Only types with number > 0 are allowed (negative numbers are reserved for system transaction types). TransactionType controls which number-series is used for the transaction.

    Minimum value is 1.

  • date string(date) Required

    Date of the transaction in ISO 8601 format - NB there must be a financial period open for this date. This may be overridden by individual transaction lines.

  • comment string

    General comment of the transaction. Will be applied to all lines unless overridden at line level.

    Maximum length is 75.

  • documentId integer

    Optional identifier (Document number) for a document/attachment associated with this transaction.

  • lines array[object] Required

    List of transaction lines. Each line must have an account number and an amount. All lines must balance to zero per date.

    Not more than 1000 elements.

    Hide lines attributes Show lines attributes object
    • accountNumber integer Required

      General ledger account number

    • amount number Required

      Total amount for this line (in stated currency, usually inclusive tax). Positive for debit, negative for credit. When tax-codes 81-89 are used, the amount is typically exclusive of tax (as the tax-amount is to be paid separately).

    • comment string

      Comment for this transaction line. If omitted, the comment from the parent transaction will be used.

      Maximum length is 75.

    • date string(date)

      Date of the transaction line in ISO 8601 format if different from the parent transaction - NB there must be a financial period open for this date. If omitted, the date from the parent transaction will be used.

    • periodDate string(date)

      Tax-Period date for the transaction line in ISO 8601 format, if different from date (usually not)

    • currency object

      Optional currency information for the transaction line. If not set, the system default currency is used.

      Hide currency attributes Show currency attributes object
      • code string Required

        ISO 4217 currency code (e.g. 'USD', 'EUR', 'SEK').

        Format should match the following pattern: ^[A-Z]{3}$.

      • rate number Required

        Exchange rate to the system base currency. (Example: System Currency is NOK, line is in USD, rate is 10.50 means 1 USD = 10.50 NOK).

    • tax object Required

      Tax information for a transaction line. The tax code number must correspond to a valid tax code in the system (see GET /taxes). Use {"code":0} to indicate that no tax.

      Hide tax attributes Show tax attributes object
      • number integer Required

        Tax code number as defined in the accounting system (see GET /taxes).

        Minimum value is 0.

      • amount number

        Tax amount for this line. Positive for debit, negative for credit. If not set, the amount will be inferred based on the tax type.

      • baseRate integer

        Base rate for the tax calculation. Applicable for partial deduction ("forholdsmessig fradrag"), otherwise don't set.

        Minimum value is 0, maximum value is 100.

      • specificationNumber integer

        Optional specification number for the tax type, if applicable.

    • dimensions array[object]

      Optional dimensions for the entry. Each dimension must match a predefined key in the system.

      Not more than 10 elements.

      Hide dimensions attributes Show dimensions attributes object
      • dimensionType integer Required

        The identifier for the dimension within 24SevenOffice ERP modules.

      • value string Required

        Value of the dimension

    • invoice object

      Details of the invoice associated with the transaction, if applicable.

      Hide invoice attributes Show invoice attributes object
      • dueDate string(date)

        Due date for the invoice related to the transaction line in ISO 8601 format, if applicable.

      • number string

        Invoice number for the invoice associated with the transaction line, if applicable.

        Maximum length is 50.

      • remittanceReference string

        The remittance reference (OCR number) for the invoice associated with the transaction line, if applicable.

        Maximum length is 32.

      • bankAccount string

        Bank account number for the invoice associated with the transaction line, if applicable.

        Maximum length is 50.

Responses

  • 201 application/json

    The transaction has been posted

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string
    • Access-Control-Allow-Credentials string
    • X-Trace-Id string
    Hide response attribute Show response attribute object
    • transactionId string Required

      Unique identifier assigned to the posted transaction

  • 400

    The input provided was invalid

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string
    • Access-Control-Allow-Credentials string
    • X-Trace-Id string
  • 401

    Unauthorized - Bearer token missing or invalid

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string
    • Access-Control-Allow-Credentials string
    • X-Trace-Id string
  • 403

    Forbidden - User does not have access to post transactions

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string
    • Access-Control-Allow-Credentials string
    • X-Trace-Id string
POST /transactions
curl \
 --request POST 'https://rest.api.24sevenoffice.com/v1/transactions' \
 --header "Content-Type: application/json" \
 --header "Authorization: string" \
 --data '{"transactionTypeNumber":1,"date":"2025-04-09","comment":"Invoice #12345","documentId":12345,"lines":[{"accountNumber":1920,"amount":1500,"comment":"Payment for services rendered","date":"2025-04-09","periodDate":"2025-04-01","currency":{"code":"USD","rate":10.5},"tax":{"number":1,"amount":300},"dimensions":[{"dimensionType":1,"value":"13"}],"invoice":{"dueDate":"2025-05-05","number":"INV-12345","remittanceReference":"1234567890","bankAccount":"1234.56.78901"}}]}'
Request examples
# Headers
Authorization: string

# Payload
{
  "transactionTypeNumber": 1,
  "date": "2025-04-09",
  "comment": "Invoice #12345",
  "documentId": 12345,
  "lines": [
    {
      "accountNumber": 1920,
      "amount": 1500,
      "comment": "Payment for services rendered",
      "date": "2025-04-09",
      "periodDate": "2025-04-01",
      "currency": {
        "code": "USD",
        "rate": 10.5
      },
      "tax": {
        "number": 1,
        "amount": 300
      },
      "dimensions": [
        {
          "dimensionType": 1,
          "value": "13"
        }
      ],
      "invoice": {
        "dueDate": "2025-05-05",
        "number": "INV-12345",
        "remittanceReference": "1234567890",
        "bankAccount": "1234.56.78901"
      }
    }
  ]
}
Response examples (201)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string

# Payload
{
  "transactionId": "abc123"
}