Skip to main content

Enrichment API

The Enrichment V2 endpoint accepts a response-type parameter, which should be set to consumer. It returns enriched customer transactions.


Authorization

HeaderValue
Api-keystring (tkn_ten_XXX..)
Content-Typeapplication/json

Enriching Transactions

Endpoint

POST https://enrichment-prd-uae.lunedata.io/api/v2/transaction/enrich?response-type=consumer

Query Parameters

KeyValue
response-typeconsumer

Request Body Schema

FieldTypeRequiredDescription
raw_descriptionstringYesTransaction text/raw description
amountfloatYesTransaction amount
ref_idstringYesTransaction reference ID
transaction_idstringNoInternal transaction ID
customer_idstringNoCustomer identifier
account_idstringNoAccount identifier
card_idstringNoCard identifier
card_namestringNoCard name/type
merchant_namestringNoMerchant name
merchant_idstringNoMerchant identifier
directionstringNoTransaction direction (DEBIT / CREDIT)
is_self_transactionbooleanNoWhether transaction is self-to-self
is_transferbooleanNoWhether transaction is a transfer
iso_currency_cdstringNoISO 4217 currency code
occurred_atstring/DateTimeNoTransaction timestamp
mccstringNo(4 digit) Merchant Category Code (MCC)
locationobjectNoLocation object with the optional fields below
iso_country_cdstringNoISO 3166 (Alpha-2) country code
citystringNoCity name
addressstringNoStreet address
regionstringNoRegion/state
postal_codestringNoPostal/ZIP code

Response Schema

FieldTypeDescription
ref_idstringReference ID for the enriched transaction
global_tx_idstringUnique global transaction identifier
brand_idintegerUnique identifier for the detected brand
brand_namestringEnriched brand name
brand_name_arstringBrand name transliterated or translated in Arabic (returned only if Arabic is enabled for the tenant)
brand_logostringRelative path to brand logo. Concatenate with https://brandlogos.azureedge.net/media/
brand_urlstringWebsite URL of the brand
category_idstringConsumer category identifier
category_namestringConsumer category name in English
category_name_arstringConsumer category name in Arabic (returned only if Arabic is enabled for the tenant)
sub_category_idstringConsumer sub-category identifier
sub_category_namestringConsumer sub-category name in English
sub_category_name_arstringConsumer sub-category name in Arabic (returned only if Arabic is enabled for the tenant)
Request Example
{
"transactions": [
{
"raw_description": "STARBUCKS-D582 AL SHAY DUBAI ARE",
"amount": -40,
"ref_id": "0001234",
"transaction_id": "1234AB34",
"customer_id": "cust1",
"account_id": "acc1",
"card_id": "card1",
"card_name": "Emirates Skywards Platinum",
"merchant_name": "STARBUCKS-D582 AL SHAY DUBAI ARE",
"direction": "DEBIT",
"is_self_transaction": false,
"is_transfer": true,
"iso_currency_cd": "AED",
"occurred_at": "2025-09-30",
"mcc": "0780",
"merchant_id": "43253545",
"location": {
"iso_country_cd": "ARE",
"city": "Dubai",
"address": "Al Suwayeb Str. 28",
"region": null,
"postal_code": null
}
}
]
}
Response Example
{
"transactions": [
{
"brand_id": 4331,
"brand_name": "Starbucks",
"brand_logo": "brand_logos/Starbucks_RsMC6xy.png",
"global_tx_id": "1a4aa7df-1c31-43ec-99a1-9604419caf44",
"brand_name_ar": "ستاربكس",
"brand_url": "https://www.starbucks.com/",
"category_id": "10",
"category_name": "Dining",
"sub_category_id": "10-3",
"sub_category_name": "Coffeeshop",
"category_name_ar": "المطاعم",
"sub_category_name_ar": "مقهى",
"ref_id": "1a4aa7df-1c31-43ec-99a1-9604419caf44"
}
]
}
note

If the client’s tenant is configured to force returning the transaction_id field, only then will the transaction_id be included in the response.


Response Status Codes

  • 200 Success: Standard response for successful HTTP requests.
  • 400 Bad Request: The request cannot be fulfilled due to bad syntax.