Enrichment API
The Enrichment V2 endpoint accepts a response-type parameter, which should be set to consumer.
It returns enriched customer transactions.
Authorization
| Header | Value |
|---|---|
Api-key | string (tkn_ten_XXX..) |
Content-Type | application/json |
Enriching Transactions
Endpoint
POST https://enrichment-prd-uae.lunedata.io/api/v2/transaction/enrich?response-type=consumer
Query Parameters
| Key | Value |
|---|---|
response-type | consumer |
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
raw_description | string | Yes | Transaction text/raw description |
amount | float | Yes | Transaction amount |
ref_id | string | Yes | Transaction reference ID |
transaction_id | string | No | Internal transaction ID |
customer_id | string | No | Customer identifier |
account_id | string | No | Account identifier |
card_id | string | No | Card identifier |
card_name | string | No | Card name/type |
merchant_name | string | No | Merchant name |
merchant_id | string | No | Merchant identifier |
direction | string | No | Transaction direction (DEBIT / CREDIT) |
is_self_transaction | boolean | No | Whether transaction is self-to-self |
is_transfer | boolean | No | Whether transaction is a transfer |
iso_currency_cd | string | No | ISO 4217 currency code |
occurred_at | string/DateTime | No | Transaction timestamp |
mcc | string | No | (4 digit) Merchant Category Code (MCC) |
location | object | No | Location object with the optional fields below |
iso_country_cd | string | No | ISO 3166 (Alpha-2) country code |
city | string | No | City name |
address | string | No | Street address |
region | string | No | Region/state |
postal_code | string | No | Postal/ZIP code |
Response Schema
| Field | Type | Description |
|---|---|---|
ref_id | string | Reference ID for the enriched transaction |
global_tx_id | string | Unique global transaction identifier |
brand_id | integer | Unique identifier for the detected brand |
brand_name | string | Enriched brand name |
brand_name_ar | string | Brand name transliterated or translated in Arabic (returned only if Arabic is enabled for the tenant) |
brand_logo | string | Relative path to brand logo. Concatenate with https://brandlogos.azureedge.net/media/ |
brand_url | string | Website URL of the brand |
category_id | string | Consumer category identifier |
category_name | string | Consumer category name in English |
category_name_ar | string | Consumer category name in Arabic (returned only if Arabic is enabled for the tenant) |
sub_category_id | string | Consumer sub-category identifier |
sub_category_name | string | Consumer sub-category name in English |
sub_category_name_ar | string | Consumer 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.