In this tutorial we will guide you through working with two more endpoints:/shops/{id}
and /merchants/{id}
.
Prerequisites to this guide are one or more of the following:
In these guides you learned how to get shop.uid or handle, that are essential starting points for this tutorial.
By now, you should have all the information needed to get the information about the shop.
For that, use the endpoint /shops/{id}
where id
stands for either handle or shop.uid from the response. However, shop.uid is more appropriate for this usage since it generates less requests.
Your query to get shop information should look like this:
/v6/shops/A987AKnMPJ0CR9PZo1Jy5A
For which the response will be this:
{ "uid": "A987AKnMPJ0CR9PZo1Jy5A", "type": "bricks", "tags": [ "Hyper-Supermarket" ], "merchantUid": "538VqZ4gn33tVJJWEYa8d3@gb", "category": { "name": "Groceries", "logo": "https://s3.eu-central-1.amazonaws.com/files.node-prod.dateio.cz/category/vw4k5PnQBYNFYeL5iJNtVy/l" }, "location": { "address": { "street": "Eastcheap 6", "city": "London", "zip": "EC3M 1AE", "country": "GB" "areas": { "20": "England" } }, "coordinates": { "type": "rooftop", "lat": 51.5106004, "long": -0.0849892 } }, "url": "https://www.tesco.com", "googlePlaceId": "ChIJJVHlMlIDdkgRWLgmapTxxdo" }
Now you should have successfully gathered some information about the shop. Congratulations!
As you can see, you now know where the shop is located through the GPS coordinates, its address, whether it is an online or physical store, its URL, Google Place ID, the main category of business where the merchant operates, tags that provide additional information and merchant.uid.
merchant.uid is particularly important for the last step and that is gathering information about the merchant. Do not confuse it with merchantId - the input parameter from card transaction endpoints.
For this step, use the GET endpoint /merchants/{id}
where the {id}
represents themerchantUid
you got from the response from /shops/{id}
in the previous step.
Your query to get merchant information should look like this:
/v6/merchants/538VqZ4gn33tVJJWEYa8d3@gb
For which the response will be this:
{ "uid": "538VqZ4gn33tVJJWEYa8d3@gb", "name": "Tesco", "logo": "https://s3.eu-central-1.amazonaws.com/files.node-prod.dateio.cz/m/538VqZ4gn33tVJJWEYa8d3/l" }
The response has provided you with the full merchant name and their logo in high resolution.
And that is it! By now you should have integrated all Tapix APIs necessary for enrichment of transaction data.
Responses of both endpoints /merchants/{id}
and /shops/{id}
should be stored for further usage so you only need to call these endpoints if:
You can learn more about integrating invalidations which serve to keep your data up-to-date. You can also integrate suggestions so you or your users can report any data discrepancies.