Create a new bank transaction

POST /banktransactions

The bankAccount.id is a required property. Before creating bank transaction, a bank account must exists. See POST /bankaccounts

When creating a bank transaction, the backend system loads the existing bank account record using bankAccount.id. Information from the bank account is then appended to the bank transaction based on the transaction's direction type (inbound or outbound).

  • For outbound transactions, the fromBankAccount field is automatically populated from the specified bank account.
  • For inbound transactions, the toBankAccount field is automatically populated from the specified bank account.

Note: When these fields are automatically set, any input provided in these properties will be ignored.

Headers

application/json

Body Required

Request Body for creating a new bank transaction

  • Unique identifier for the bank transaction supplied by the bank that manages the bank account. It must be globally unique across all bank accounts for the client. A duplication warning is returned if this is not the case.

  • type string Required

    Direction of the payment. "Inbound" stands for an incoming payment. E.g. a payment of an invoice by a customer. "Outbound" is a payment originating from this bank account. E.g a debet card transaction, when paid for goods and services.

    Values are inbound or outbound.

  • bankAccount object Required

    Details of the bank account involved in the transaction.

    Hide bankAccount attribute Show bankAccount attribute object
    • id string Required

      A unique identifier for the bank account within 24SevenOffice.

  • paymentReference object Required

    The payment reference must be one of the following types: text, ocr, invoiceRef.

    • text: The value is a free text reference.
    • ocr: The value is an structured OCR reference. KID number in Norway.
    • invoiceRef: The value is an invoice number.

    The actual value of the reference is set in the value property.

    Hide paymentReference attributes Show paymentReference attributes object
    • type string Required

      Values are text, ocr, or invoiceRef.

    • value string Required

      This must be a string of max 1000 characters.

  • amount object Required

    Amount of the bank transaction.

    Hide amount attributes Show amount attributes object
    • value number Required

      The amount in the currency specified. Must be a positive number.

    • currency object Required

      The currency of the balance.

      Hide currency attribute Show currency attribute object
      • code string Required

        The currency code of the balance.

  • date string Required

    Date of the transaction.

  • The originating bank account for transactions. This is automatically set for outbound transactions, i.e. the property is always returned in the API responses for outbound transactions.

    Hide fromBankAccount attributes Show fromBankAccount attributes object
    • number string | null

      Number of the originating bank account for outbound transactions.

    • type string | null

      Type of the originating bank account for outbound transactions.

      Values are bban or iban. Default value is bban.

  • The receiving bank account for transactions. This is automatically set for inbound transactions, i.e. the property is always returned in the API responses for inbound transactions.

    Hide toBankAccount attributes Show toBankAccount attributes object
    • number string | null

      Number of the receiving bank account for inbound transactions.

    • type string | null

      Type of the receiving bank account for inbound transactions.

      Values are bban or iban. Default value is bban.

  • The bank transaction code is a structured code that identifies the type of a transaction. The code is structured in three levels: domain, family and subfamily.

    • The domain code is the highest level and is used to group the transaction codes into different domains.
    • The family code is used to group the transaction codes within a domain.
    • The subfamily code is used to group the transaction codes within a family.
    Hide bankTransactionCode attributes Show bankTransactionCode attributes object

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object

    A single bank transaction

    • Unique identifier for the bank transaction supplied by the bank that manages the bank account. It must be globally unique across all bank accounts for the client. A duplication warning is returned if this is not the case.

    • type string Required

      Direction of the payment. "Inbound" stands for an incoming payment. E.g. a payment of an invoice by a customer. "Outbound" is a payment originating from this bank account. E.g a debet card transaction, when paid for goods and services.

      Values are inbound or outbound.

    • bankAccount object Required

      Details of the bank account involved in the transaction.

      Hide bankAccount attribute Show bankAccount attribute object
      • id string Required

        A unique identifier for the bank account within 24SevenOffice.

    • paymentReference object Required

      The payment reference must be one of the following types: text, ocr, invoiceRef.

      • text: The value is a free text reference.
      • ocr: The value is an structured OCR reference. KID number in Norway.
      • invoiceRef: The value is an invoice number.

      The actual value of the reference is set in the value property.

      Hide paymentReference attributes Show paymentReference attributes object
      • type string Required

        Values are text, ocr, or invoiceRef.

      • value string Required

        This must be a string of max 1000 characters.

    • amount object Required

      Amount of the bank transaction.

      Hide amount attributes Show amount attributes object
      • value number Required

        The amount in the currency specified. Must be a positive number.

      • currency object Required

        The currency of the balance.

        Hide currency attribute Show currency attribute object
        • code string Required

          The currency code of the balance.

    • date string Required

      Date of the transaction.

    • The originating bank account for transactions. This is automatically set for outbound transactions, i.e. the property is always returned in the API responses for outbound transactions.

      Hide fromBankAccount attributes Show fromBankAccount attributes object
      • number string | null

        Number of the originating bank account for outbound transactions.

      • type string | null

        Type of the originating bank account for outbound transactions.

        Values are bban or iban. Default value is bban.

    • The receiving bank account for transactions. This is automatically set for inbound transactions, i.e. the property is always returned in the API responses for inbound transactions.

      Hide toBankAccount attributes Show toBankAccount attributes object
      • number string | null

        Number of the receiving bank account for inbound transactions.

      • type string | null

        Type of the receiving bank account for inbound transactions.

        Values are bban or iban. Default value is bban.

    • The bank transaction code is a structured code that identifies the type of a transaction. The code is structured in three levels: domain, family and subfamily.

      • The domain code is the highest level and is used to group the transaction codes into different domains.
      • The family code is used to group the transaction codes within a domain.
      • The subfamily code is used to group the transaction codes within a family.
      Hide bankTransactionCode attributes Show bankTransactionCode attributes object
    • status string Required

      Status of the bank transaction, controlled by the backend and always returned in the API-responses. Possible values are the following:

      • created: The transaction has been created.
      • closed: The transaction has been closed in the bank reconciliation module.

      Values are created or closed.

    • createdAt string(date-time) Required

      A timestamp for when a record was created, in ISO 8601 format.

    • modifiedAt string(date-time) Required

      A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.

POST /banktransactions
curl \
 -X POST https://rest.api.24sevenoffice.com/v1/banktransactions \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"bankTransactionReference":"10001-987-654-321","type":"outbound","bankAccount":{"id":"123-456-789"},"paymentReference":{"type":"text","value":"Payment for shipment AA-001."},"amount":{"value":1200,"currency":{"code":"NOK"}},"date":"2024-06-01","fromBankAccount":{"number":"123456789","type":"bban"},"toBankAccount":{"number":"987654321","type":"bban"},"bankTransactionCode":{"domainCode":"D001","familyCode":"F002","subFamilyCode":"SF003"}}'
Request examples
# Headers
Authorization: string

# Payload
{
  "bankTransactionReference": "10001-987-654-321",
  "type": "outbound",
  "bankAccount": {
    "id": "123-456-789"
  },
  "paymentReference": {
    "type": "text",
    "value": "Payment for shipment AA-001."
  },
  "amount": {
    "value": 1200,
    "currency": {
      "code": "NOK"
    }
  },
  "date": "2024-06-01",
  "fromBankAccount": {
    "number": "123456789",
    "type": "bban"
  },
  "toBankAccount": {
    "number": "987654321",
    "type": "bban"
  },
  "bankTransactionCode": {
    "domainCode": "D001",
    "familyCode": "F002",
    "subFamilyCode": "SF003"
  }
}
Response examples (201)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string

# Payload
{
  "bankTransactionReference": "10001-987-654-321",
  "type": "outbound",
  "bankAccount": {
    "id": "123-456-789"
  },
  "paymentReference": {
    "type": "text",
    "value": "Payment for shipment AA-001."
  },
  "amount": {
    "value": 1200,
    "currency": {
      "code": "NOK"
    }
  },
  "date": "2024-06-01",
  "fromBankAccount": {
    "number": "123456789",
    "type": "bban"
  },
  "toBankAccount": {
    "number": "987654321",
    "type": "bban"
  },
  "bankTransactionCode": {
    "domainCode": "D001",
    "familyCode": "F002",
    "subFamilyCode": "SF003"
  },
  "status": "created",
  "createdAt": "2024-06-01T18:00:00Z",
  "modifiedAt": "2024-06-31T18:00:00Z"
}