---
title: "Ingest transactions"
method: POST
path: "/connector/users/{externalUserId}/transactions"
tags: ["ENTERPRISE", "Connector.Transaction", "MULTI_TENANT"]
---

# Ingest transactions

`POST /connector/users/{externalUserId}/transactions`

Takes historical or real time transactions together with an account.

## Path parameters

- `externalUserId` string, required

## Request body

- CreateTransactionAccountContainer — Container of account and transactions.
  - `autoBook` boolean — (DEPRECATED) This feature try to automatically match stored pending transactions to booked transactions in the incoming batch. This feature is disabled by default and deprecated
  - `overridePending` boolean — When enabled, all stored pending transactions will be replaced by the pending transactions in the batch. Stored pending transaction present in batch will be kept but not updated and new pending transactions will be stored. Already stored pending transactions not existing in batch will be removed, hence make sure all pending transaction already stored and to be kept are sent in the batch. It is a requirement to set EXPIRE date on pending transactions to maximum 30 days(pending transactions older than 30 days have no guarantee to be replaced). This feature should only be used when no known external-id relation between the pending and booked transactions exists. Please contact your Technical Project Manager to enable this option.
  - `transactionAccounts` CreateTransactionAccountEntity[], required — The transaction accounts. All accounts accumulated may contain a maximum of 2500 transactions per request.
    - `balance` number, double, required — The balance of the account at the time of the last transaction in the list.If a reserved amount is supplied will the accounts balance be set to the here supplied balance minus the reserved amount.
    - `externalId` string, required — External identifier for the account the transaction belongs to.
    - `payload` object — This property is deprecated and disabled as default. For customers where it is still enabled observe that the payload may not exceed 200 chars. Please contact your Technical Project Manager if your use case depend on this property.
    - `reservedAmount` number, double — The reserved amount of the account at the time of the last transaction in the list.The reserved amount is optional. If a reserved amount is supplied will the accounts balance be set to the supplied `balance` minus the supplied reserved amount.
    - `transactions` CreateTransactionEntity[], required — The transaction list.
      - `amount` number, double, required — The debited/credited amount in the currency of the account.
      - `counterparties` ConnectorCounterparties
        - `payee` ConnectorCounterpartyInformation
          - `identifiers` ConnectorIdentifiers
            - `financialInstitution` FinancialInstitution
              - …
          - `name` string — [BETA] Name of a transaction counterparty.
        - `payer` ConnectorCounterpartyInformation
          - `identifiers` ConnectorIdentifiers
            - `financialInstitution` FinancialInstitution
              - …
          - `name` string — [BETA] Name of a transaction counterparty.
      - `date` string, date-time, required — Date is when the transaction was executed, not when it was settled (except for scheduled transfers/payments, where the settling date is to be interpreted as the execution date). The date cannot be older than 10 years.
      - `description` string, required — A merchant name if possible. If such value is not available, the description that is shown in the transaction list.
      - `externalId` string, required — External identifier for the transaction. Must be unique per user and account.
      - `merchantCategoryCode` string — [BETA] Merchant category code (MCC) specified as ISO-18245 4-digit string.
      - `merchantName` string — Merchant name of the transaction.
      - `payload` object — The payload property is a key-value map. Maximum total size of payload data is 1000 chars. The key must be one the following supported ones:<br/><code>PENDING_IDS</code>: A list of pending transaction external IDs for which this transaction is a booking of. If the user has changed any of the pending transactions, this transaction will get the category of the pending transaction with the largest amount if it constitutes at least half of this transactions amount.<br/><code>PENDING_TRANSACTION_EXPIRATION_DATE</code>: A UNIX timestamp for when this transaction should be automatically removed from the database. The removal will happen when other transactions are sent in. Can only be set on transactions marked as pending.<br/> <code>TAGS</code>: An array of strings that will be set as tags within the notes field of the transaction. Each tag must be alphanumeric without whitespace.
      - `pending` boolean — If the transaction is pending (reserved) or not (booked).
      - `tinkId` string — Ignored for new objects. Used to specify the id as given by Tink on when updating objects without an existing external ID.
      - `type` 'DEFAULT, CREDIT_CARD, TRANSFER, PAYMENT, WITHDRAWAL', required — The type of the transaction.
  - `type` 'REAL_TIME' | 'HISTORICAL' | 'BATCH', required — Defines the priority of the ingestion request: `BATCH`: is recommended for non time critical ingestion requests in daily running batch jobs. Note: Should be used for backfilling users transaction history. `REAL_TIME`: is recommended for ingestion requests where it is time critical to minimize lag before transactions are available on the api. Note: This request type is designed for reflecting the most recent updates on a user's account, like ingesting or updating recently booked transactions. It is not intended for fulfilling larger requests such as backfilling a user's entire transaction history. `HISTORICAL`: is deprecated. Requests of type HISTORICAL are processed with same priority as BATCH but account balance will be ignored if this option is used.

## Response `204`

Transactions ingested.

## Other responses

- `400` — The payload does not pass validation, or the specified account does not exist.
- `401` — Unauthorized.
- `404` — User with the given external id not found.
- `409` — Transaction already exists.
- `410` — Transaction has already been deleted.
- `412` — Could not find any accounts for the user.

---

[API](https://skmtc.net/tink/apis/tink-api.md) · [All operations](https://skmtc.net/tink/apis/tink-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tink/tink-api/revisions/23d8982b533d/schema)
