Import transaction history

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Use this method for a one-time free bulk upload of historical transactions to ensure proper operation of aggregate functions during transaction scoring.

The method expects transactions to be uploaded as a valid NDJSON file with the Content-Type: application/x-ndjson header. The request body must contain a sequence of JSON objects, each representing a single transaction, separated by newline characters (\n) as shown in the examples below.

You can use the following templates as a reference:

🚧

Attention

  • This method is not enabled by default. Contact your CSM for details.
  • Import is limited to 1000 records per session.
  • Duplicate transactions are ignored.

Request examples

curl -X POST \
  'https://api.sumsub.com/resources/kyt/misc/txns/importHistory' \
  -H 'Content-Type: application/x-ndjson' \
  -d $'{
          "applicantId": "636cee6b17d6c7000144673b",
          "data": {
            "txnId": "631f268442d8290001e1eee8_newTxn",
            "applicant": {
              "externalUserId": "uniqueRemitterId",
              "address": {
                "country": "DEU",
                "street": "Chauseestr. 60",
                "postCode": "101115",
                "town": "Berlin"
              },
              "device": {
                "ipInfo": {
                    "ip": "87.141.63.130"
                }
              },
              "institutionInfo": {
                "code": "DEUTDEDB101",
                "name": "Deutsche Bank"
              }
            },
            "counterparty": {
              "externalUserId": "uniqueBeneficiaryId",
              "fullName": "John Smith",
              "type": "individual",
              "institutionInfo": {
                "code": "CRESCHZZXXX",
                "name": "Credit Swiss (Schweiz)"
              }
            },
            "info": {
              "direction": "in",
              "amount": 101.42,
              "currencyCode": "GBP",
              "paymentDetails": "Birthday Present"
            }
          },
          "review": {
              "reviewResult": {
                  "reviewAnswer": "RED"
              },
              "reviewStatus": "completed"
          }          
    }\n{
          "applicantId": "636cee6b17d6c7000144673b",
          "data": {
            "txnId": "631f268442d8290001e1eee9_newTxn",
            "applicant": {
              "externalUserId": "uniqueRemitterId",
              "address": {
                "country": "DEU",
                "street": "Chauseestr. 60",
                "postCode": "101115",
                "town": "Berlin"
              },
              "institutionInfo": {
                "code": "DEUTDEDB101",
                "name": "Deutsche Bank"
              }
            },
            "counterparty": {
              "externalUserId": "uniqueBeneficiaryId",
              "fullName": "John Smith",
              "type": "individual"
            },
            "info": {
              "direction": "out",
              "amount": 101.42,
              "currencyCode": "GBP",
              "paymentDetails": "Birthday Present"
            }
          },
          "review": {
              "reviewStatus": "onHold"
          }          
      }'
curl -X POST \
  'https://api.sumsub.com/resources/kyt/misc/txns/importHistory' \
  -H 'Content-Type: application/x-ndjson' \
  -d $'{
         "applicantId": "636cee6b17d6c7000144673b",
         "data": {
            "txnId": "631f268442d8290001e1eee8_newTxn",
            "applicant": {
               "externalUserId": "uniqueRemitterId",
               "address": {
                  "country": "DEU",
                  "street": "Chauseestr. 60",
                  "postCode": "101115",
                  "town": "Berlin"
               },
               "device": {
                  "ipInfo": {
                     "ip": "87.141.63.130"
                  }
               },
               "institutionInfo": {
                  "code": "DEUTDEDB101",
                  "name": "Deutsche Bank"
               }
            },
            "counterparty": {
               "externalUserId": "uniqueBeneficiaryId",
               "fullName": "John Smith",
               "type": "individual",
               "institutionInfo": {
                  "code": "CRESCHZZXXX",
                  "name": "Credit Swiss (Schweiz)"
               }
            },
            "info": {
               "direction": "in",
               "amount": 101.42,
               "currencyCode": "GBP",
               "paymentDetails": "Birthday Present"
            }
         },
         "review": {
            "reviewResult": {
               "reviewAnswer": "GREEN"
            },
            "reviewStatus": "completed"
         },         
         "tags": [
            "test tag",
            "test tag 2"
         ]
    }\n{
         "applicantId": "636cee6b17d6c7000144673b",
         "data": {
            "txnId": "631f268442d8290001e1eee9_newTxn",
            "applicant": {
               "externalUserId": "uniqueRemitterId",
               "address": {
                  "country": "DEU",
                  "street": "Chauseestr. 60",
                  "postCode": "101115",
                  "town": "Berlin"
               },
               "institutionInfo": {
                  "code": "DEUTDEDB101",
                  "name": "Deutsche Bank"
               }
            },
            "counterparty": {
               "externalUserId": "uniqueBeneficiaryId",
               "fullName": "John Smith",
               "type": "individual"
            },
            "info": {
               "direction": "out",
               "amount": 101.42,
               "currencyCode": "GBP",
               "paymentDetails": "Birthday Present"
            }
         },
         "review": {
            "reviewStatus": "onHold"
         },         
         "tags": [
            "test tag",
            "test tag 2"
         ]
      }'

Response explained

If the request is successfully sent and processed, you will get a response indicating the number of bets successfully processed.

Response example to successful request:

{
    "createdCnt": 2
}

If the request fails, you will receive an HTTP response containing an error code along with a message explaining the error.

Response example to failed request:

{
  "code": 400,
  "correlationId": "c9eab02f4e77c2385866a77a105cb48a",
  "description": "Can't parse lines 1, first error: data.applicant: must not be null, data.txnId: must not be null"
}

Query Params
boolean
Body Params
string
required
data
object
required
tags
array of strings
tags
review
object
Headers
string
required
Defaults to application/x-ndjson
Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here!