API: GET Enriched Transaction
Overview
Using the byn_transaction_id
within the path, you are able to pull the full enriched transaction record using: api.banyan.com/rest/v1/transaction/ byn_transaction_id
/enriched
The byn_transaction_id
is found in the response to the POST transaction call. If you are sending data to Banyan via BATCH
method and you don't have the byn_transaction_id readily available, you could also use the SEARCH
endpoint using your own unique transaction id, AKA the finx_transaction_id
.
The enriched transaction record (eTx) includes three groups of data:
- Matching details: elements about the match itself (timestamp, id)
- Original transaction details: elements that were sent to Banyan by the FinX including some Banyan enrichments like location/category information
- Receipt details of the matched receipt: elements pertaining to the matched receipt including items and store information
Authentication and Authorization
Authentication is handled in the same way as sharing data via POST method
Receipts that your transaction are tied to are available to be extracted from the Banyan platform. All other eTxs in the platform will not be authorized.
Errors
One additional layer with retrieving enriched transactions is that the merchant must also authorize you as a data buyer in order to retrieve their data. You will receive a permission denied error response if you are not authorized for that particular merchant.
Headers
Header Name | Description | Required | Values |
---|---|---|---|
Bearer | Access Token | Required | See Authorization section |
Content-Type | The transaction format to send | Optional | application/JSON |
Accept | The response format sent back | Optional | application/JSON |
Path
api.banyan.com/rest/v1/transaction/ byn_transaction_id
/enriched where byn_transaction_id
is the Banyan ID of the transaction you want to retrieve.
Example:
api.banyan.com/rest/v1/transaction/4ec82376-86d0-59b9-bada-cebec2c7b219/enriched
Response
{
"data": [
{
"id": "137da853-da31-52fe-97de-6692d44ed5c3",
"match_timestamp": "2022-12-06T16:23:54.709649651Z",
"receipt": {
"id": "72d0682f-fd44-5df1-b656-9dbf9e66a460",
"byn_partner_id": 106,
"merchant_receipt_id": "211db5f4-8357-40ca-bb25-666c8f5ebc33",
"purchase_ts": "2021-07-06T18:52:06.5Z",
"received_ts": "2022-12-06T16:23:47.959Z",
"merchant": {
"id": 8859,
"name": "Nielsen, LLC",
"display_name": "Nielsen",
"byn_partner_id": 107,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"location": {
"name": "Geoscape",
"display_name": "Geoscape",
"phone_number": "439-571-0756",
"address": {
"address_line_one": "32949 Plains bury",
"city": "Lockmantown",
"state": "Louisiana",
"country": "USA",
"postal_code": "85726",
"byn_partner_id": 107,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"byn_partner_id": 106,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"order_type": "",
"fulfillment_type": "",
"currency": "usd",
"merchant_total_amount": "122.8068",
"payments": [
{
"id": "6b42a9eb-28dc-5ed6-a30d-4e13f5b300a2",
"total_amount": "122.8068",
"payment_type": "credit",
"scheme": "Elo",
"bin": "638413193",
"card_last_four": "6664",
"auth_code": "319372",
"arn": "40368483",
"subtotal_amount": "113.71",
"tip_amount": "0",
"tax_amount": "9.0968",
"cash_back_amount": "0"
}
],
"items": [
{
"id": "fmNMK9P8grU8E3ptDkRzAL",
"merchant_item_id": "854139",
"upc": "215494475613",
"brand": "Dodge",
"description": "Magni porro est labore facere rem laborum assumenda ex labore.",
"amount_paid": "47.62",
"full_price_per_unit": "47.62",
"discount_price_per_unit": "0",
"quantity": "1"
},
{
"id": "kx3MrXVXhy4skR2XH5HjRD",
"merchant_item_id": "807870",
"upc": "367889816044",
"brand": "Bentley",
"description": "Nisi minus distinctio adipisci distinctio quam quas optio eligendi et.",
"amount_paid": "39.66",
"full_price_per_unit": "19.83",
"discount_price_per_unit": "0",
"quantity": "2"
},
{
"id": "fwKuupggY6Pc2zqLENJhwc",
"merchant_item_id": "903991",
"upc": "638415093031",
"brand": "Daihatsu",
"description": "Accusamus iusto veniam maxime qui commodi natus est blanditiis et.",
"amount_paid": "22.45",
"full_price_per_unit": "7.4833",
"discount_price_per_unit": "0",
"quantity": "3"
},
{
"id": "mJGtWkP24KDdYBeSLhG32D",
"merchant_item_id": "450088",
"upc": "829873281142",
"brand": "Jaguar",
"description": "Iure doloremque asperiores unde inventore atque aut illo voluptates qui.",
"amount_paid": "3.98",
"full_price_per_unit": "1.3267",
"discount_price_per_unit": "0",
"quantity": "3"
}
],
"merchant_consumer_token": "",
"image_url": "https://nielsen.com/receipt/image/898577492124",
"barcode_url": "https://nielsen.com/receipt/barcode/898577492124"
},
"transaction": {
"id": "4ec82376-86d0-59b9-bada-cebec2c7b219",
"purchase_ts": "2021-07-06T18:52:06.5Z",
"received_ts": "2022-12-06T16:23:53.859Z",
"byn_partner_id": 106,
"merchant": {
"id": 8859,
"name": "Nielsen, LLC",
"display_name": "Nielsen",
"byn_partner_id": 107,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"location": {
"name": "Geoscape",
"display_name": "Geoscape",
"phone_number": "439-571-0756",
"address": {
"address_line_one": "32949 Plains bury",
"city": "Lockmantown",
"state": "Louisiana",
"country": "USA",
"postal_code": "85726",
"byn_partner_id": 107,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"byn_partner_id": 106,
"created_ts": "2022-03-21T18:37:33.242Z"
},
"payment": {
"payment_type": "credit",
"scheme": "Visa",
"card_last_four": "1880",
"bin": "277026663",
"auth_code": "319372",
"arn": "40368483",
"total_amount": "122.8068",
"currency": "SEK",
"finx_mid": "nsdGyKyxd62cqiaMUr8bPh"
},
"order_type": "",
"description": "dHpUZUoZTCusTSZzkgDkaBGIMsKTYVCKgIvyUlrjqshrlLKSY",
"finx_transaction_id": "",
"finx_consumer_token": "kThxpLj5xJmchDLjSkL92V"
}
}
],
"errors": []
}
Updated about 1 month ago