---
title: "Streaming Transaction Enrichment"
method: POST
path: "/cleanup/streaming"
tags: ["Enrichment"]
---

# Streaming Transaction Enrichment

`POST /cleanup/streaming`

FinGoal's streaming transaction enrichment endpoint is designed for enriching daily user transactions or other smaller transaction batches. 

Unlike the historical transaction enrichment endpoint, the streaming transaction enrichment endpoint does not require any user segmentation. Requests that include many users (by uid) will not deteriorate the endpoint's performance.

This endpoint is asynchronous. A webhook will be sent to the provided URL when a batch of transactions has been enriched. For larger transaction sets, such as historical data, user the historical enrichment endpoint.

To maximize throughput for this endpoint, follow these guidelines: 
  - Group transactions by "uid" and include all transactions for a single user in the same payload.
  - Limit each request to a total of approximately 1,000 transactions. 
  - Transactions can be distributed among any number of users as long as the total number of transactions does not exceed 1,000.

## Request body

- CleanupPostRequest
  - `transactions` object[], required
    - `accountType` 'checking' | 'savings' | 'creditCard', required — The type of account associated with the transaction. For transactions from loan accounts, use 'savings'.
    - `amountnum` number, required — The transaction amount in USD. Negative amounts are automatically converted to positive amounts. Use the 'settlement' field to indicate whether the transaction was a 'debit' or 'credit'. The string representation of amount must be fewer than 11 characters.
    - `date` string, date, required — The date of the transaction. Must be in the format 'YYYY-MM-DD'.
    - `identifiers` object — A JSON representation of alternative user IDs. This field is designed exclusively for users with Banno, Salesforce, or other CRM integrations. Valid identifiers are currently limited to [`sfmc_contact_id`, `banno_end_user_id`].
      - `sfmc_contact_id` string
      - `banno_end_user_id` string
    - `original_description` string, required — The transaction's description. Must be between 3 and 198 characters. Descriptions longer than 198 characters are automatically truncated. For transactions from loan accounts, prepend `LOANTRANS-` to this field.
    - `transactionid` string, required — A unique identifier for the transaction. Do not use PII or other information-rich data in this field. We strongly recommend using UUID or a similar identification system.
    - `settlement` 'debit' | 'credit', required — Indicates whether the transaction was a 'debit' or 'credit' to the account.
    - `uid` string, required — The ID of the user associated with the transaction. User IDs must be unique. Do not use PII or other information-rich data in this field. We strongly recommend using UUID or a similar identification system.
    - `accountid` string — The account ID associated with the transaction. This field is optional and will not affect enrichment results. Do not use the actual account number. We strongly recommend using UUID or a similar identification system.

## Response `200`

Success

- CleanupPost200Response
  - `transactions_received` boolean — Denotes whether FinSight API has successfully received the transactions.
  - `transactions_validated` boolean — Denotes whether or not the transaction payload successfully passed FinSight API validation.
  - `processing` boolean — Denotes whether the asynchronous enrichment process has commenced.
  - `num_transactions_processing` integer — The number of transactions that have been received.
  - `batch_request_id` string — A unique ID associated with the request for debugging.

## Other responses

- `400` — Bad request. An array of errors in the data will be returned. Fields not allowed or incorrectly formatted will be noted.
- `401` — Unauthorized

---

[API](https://skmtc.dev/fingoal/apis/insights-api.md) · [All operations](https://skmtc.dev/fingoal/apis/insights-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fingoal/insights-api/revisions/00cf4dbd5441/schema)
