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.
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 using the same bearer token.
Authorization
There are two requirements that must be met before receipts are authorized for distribution:
- Merchants must explicitly consent to you receiving their data
- Your transaction much match to a merchant's reciept
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
For the most up to date response, please see the API Reference
{
"data": [
{
"byn_etx_id": "934e710a-e65d-59bc-9826-21eff9de88a7",
"match_ts": "2024-07-08T00:29:48.914050907Z",
"transaction": {
"byn_transaction_id": "d64d123c-993d-5a24-bae2-f696c80c6e76",
"purchase_ts": "2024-07-04T05:00:00Z",
"received_ts": "2024-07-07T00:29:48.766775242Z",
"authorization_ts": "2024-07-04T05:00:00Z",
"merchant": {
"name": "HY-VEESPRINGFIELDMO2 1"
},
"location": {
"merchant_store_id": "",
"name": "HY-VEESPRINGFIELDMO2 1",
"card_acceptor_names": null,
"display_name": "",
"phone_number": "",
"address": {
"address_line_one": "",
"address_line_two": "",
"city": "SPRINGFIELD",
"state": "MO",
"country": "US",
"postal_code": ""
}
},
"payment": {
"payment_type": "",
"scheme": "MC",
"card_last_four": "9710",
"bin": "518941",
"auth_code": "07317Z",
"arn": "02305374187000368074698",
"total_amount": "6",
"currency": "USD",
"finx_mid": "",
"virtual_card_last_four": "",
"card_issuer": "",
"card_type": ""
},
"order_type": "",
"description": "",
"finx_transaction_id": "12174141-3c85-53d5-8477-a6ee362cc43b",
"finx_consumer_token": "",
"custom_fields": {
"correlation_id": "0.c8764017.1720312116.2972ec66-01",
"locale": "en-US",
"originator_channel": "DIGITAL",
"originator_description": "Citi US",
"originator_id": "386beb3560d62568eee6e65bb63db3ced1aa66c3",
"source_id": ""
}
},
"receipt": {
"byn_receipt_id": "30c48dfe-2755-547b-acbc-6ec675d2c3b4",
"hotel": null,
"merchant_receipt_id": "2407041644049130109",
"merchant_mid": "",
"purchase_ts": "2024-07-04T18:01:00Z",
"order_ts": "",
"received_ts": "2024-07-05T19:00:40.432Z",
"merchant": {
"name": "HY-VEE"
},
"location": {
"merchant_store_id": "1644",
"name": "HY-VEE SPRINGFIELD",
"card_acceptor_names": null,
"display_name": "",
"phone_number": "417-744-6860",
"address": {
"address_line_one": "2150 E Sunshine St",
"address_line_two": "",
"city": "Springfield",
"state": "MO",
"country": "US",
"postal_code": "65804"
}
},
"order_type": "in_store",
"fulfillment_type": "in_store",
"currency": "USD",
"merchant_total_amount": "6",
"items": [
{
"byn_item_id": "cd9aba4c-7679-5054-a7d3-a0a1b85af0e9",
"merchant_item_id": "3842527",
"upc": "075450557220",
"sku": "0075450557220",
"image_url": "",
"brand": "Unknown",
"description": "Feeding America",
"amount_paid": "0.81",
"full_price_per_unit": "0.81",
"discount_price_per_unit": "0.81",
"quantity": "1",
"unit_type": "each",
"tags": [
"department_id:|:5",
"department_name:|:C-Store",
"category_id:|:81",
"category_name:|:Customer Service"
]
},
{
"byn_item_id": "ebbee34f-1b38-5752-96df-3271db045068",
"merchant_item_id": "315239",
"upc": "075450400212",
"sku": "0075450400210",
"image_url": "https://8e9d5b8b8dcb9208ef3f-01db2a53ae0368d03387780ee86ead55.ssl.cf2.rackcdn.com/0075450400210_CF_hyvee1_default.jpeg",
"brand": "Hy-Vee",
"description": "Bakery Fresh Baguette",
"amount_paid": "2.49",
"full_price_per_unit": "2.49",
"discount_price_per_unit": "2.49",
"quantity": "1",
"unit_type": "each",
"tags": [
"department_id:|:2",
"department_name:|:Bakery",
"category_id:|:19",
"category_name:|:Bakery-Baking Stone Bread"
]
},
{
"byn_item_id": "a6191896-9e98-5041-8df3-ee3a0bfe23a0",
"merchant_item_id": "661578",
"upc": "246536000002",
"sku": "0246536000000",
"image_url": "https://8e9d5b8b8dcb9208ef3f-01db2a53ae0368d03387780ee86ead55.ssl.cf2.rackcdn.com/7bf7d5af-27b9-4523-ae0e-7b0b8c710b2e.jpeg",
"brand": "Di Lusso",
"description": "Dilusso Wisc Muenster Cheese",
"amount_paid": "2.45",
"full_price_per_unit": "2.45",
"discount_price_per_unit": "2.45",
"quantity": "1",
"unit_type": "each",
"tags": [
"department_id:|:11",
"department_name:|:Delicatessen",
"category_id:|:305",
"category_name:|:Deli Service Case"
]
}
],
"image_url": "",
"barcode_url": "",
"custom_fields": null,
"payment": {
"total_amount": "6",
"payment_type": "CREDIT",
"scheme": "MC",
"shipping_amount": null,
"subtotal_amount": "5.75",
"tip_amount": "0",
"tax_amount": "0.25",
"other_positive_amounts": null,
"other_negative_amounts": null,
"cash_back_amount": "0",
"is_virtual_card": null,
"card_issuer": ""
}
},
"byn_match_id": "06897bde-974e-519e-b843-026427bcc1e3"
}
],
"errors": [],
"request_id": "d1edb4f7-8157-41fd-99fb-428761f6d952"
}
Updated 4 months ago