Enrich Open Data

Before you begin with this guide, you should have the basic knowledge from Getting started with Tapix tutorial.
In this guide you will learn how to integrate Tapix APIs to enrich your users payments that you received through your Open Data provider.

For this guide we will be working with the endpoint /shops/findByOpenDataTransaction - the documentation can be found here.

Please note that whenever the record is invalidated through invalidations, you should take the appropriate action given the level and type. After that you should call /shops/findByOpenDataTransaction for the transactions previously mapped to the invalidated records with a parameter refresh = true.

Implementation

For this use case, you will need to provide us with a sample data set you normally receive from your Open Data provider. Before you start with the implementation, please send us samples of all the combinations of banks and data sources (i.e. HSBC-Saltedge, HSBC-TrueLayer Erste-Saltedge ) that you have in your database to support@tapix.io . We will analyze them and once the parser will be ready on our end, we will inform you about our readiness for automatized enrichment over the API.

Ideal scenario

For this endpoint to return you the data you need, you will need to provide three required parameters - data (the object you receive through your Open Data provider), bank, and source.
If you provide these three parameters, the request might look like this:

{
  "data": {
    "description": "INT'L 0072248923 ALIEXPRESS.COM",
    "other": {
      "city": "London",
      "country": "NO",
      "mcc": 5411
      "transaction_type": "POS1"
    }
  },
  "bank": "lloyds",
  "source": "ob",
  "refresh": "false"
}

For which the response would look like this:

{
    "result": "found",
    "handle": "REn34JPYadBtjRAv7rLArD",
    "shop": {
        "uid": "REn34JPYadBtjRAv7rLArD"
    }
}

As you can see, you successfully retrieved information necessary to proceed with getting information about the store. Head to Get shop and merchant information tutorial where you learn how to receive information about shops and merchants.

Not so ideal scenario

At certain times, Tapix doesn't have any information about the shop and thus the shop returns unsolved. Even though you passed all the data in the correct format, it may happen that Tapix just does not know to which shop this data belongs to.

In this case you have to store the handle anyway as Tapix will refer to it, once it will know the correct shop.

That can happen for example for this request:

{
  "data": {
    "description": "STARBUCKS, LONDON 2022-02-02 10 GBP",
    "other": {
      "note": "caffe americano",
      "city": "London",
      "country": "GB",
      "type": "card payment",
      "category": "cafe"
    }
  },
  "bank": "HSBC",
  "source": "Saltedge",
  "refresh": true
}

The result would look like this:

{
    "result": "unsolved",
    "handle": "!0000000000000000000000"
}

Notice that in this situation we still return HTTP status 200.

Where to head next

The next step is getting the information of shops and merchants which you will learn about in Get shop and merchant information tutorial.
You can learn more about integrating invalidations which serve to keep your data up-to-date. You can also integrate and enrich bank transfers or enrich card transactions for additional data.