Enrichment V1 (Deprecated)

The Enrichment endpoint returns the Brand Logo, Brand ID and Brand Name as well as the Category ID and Category Name for transactions. Transactions can be sent as single or bulk requests using the corresponding endpoints.

Enriching Transactions

Enriches single transaction

AUTHORIZATIONS:

Api-key

REQUEST BODY SCHEMA :

application/json

arrow

raw_description
required

string (Raw Description)

arrow

amount
required

float (Amount)   >=1.0

Responses

RESPONSE SCHEMA :

application/json

arrow

brand_logo

string (Brand Logo URL)
The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

arrow

category_name

string (See All  Categories)

arrow

brand_name

string (Brand Name)

arrow

category_id

string (See All  Categories)  [ 1 .. 255 ] charcters

arrow

brand_id

string (Brand ID is a unique identifier)  [ 1 .. 255 ] charcters

POST

https://api.lunedata.io/api/v1/transaction/enrich/

Payload

application/json

Content type

{
  "raw_description": "string",
  "amount": 1
}

201

application/json

Content type

{
  "brand_logo": "string",
  "category_name": "string",
  "brand_name": "string",
  "category_id": "string",
  "brand_id": "string"
}
Enrich Bulk Transaction

Enriches the transactions in bulk

AUTHORIZATIONS:

Api-key

REQUEST BODY SCHEMA :

application/json

arrow

data >
required

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

local_id
required

string (Local ID is used to identify the transactions)  [ 1 .. 36 ] charcters

arrow

raw_description
required

string (Raw Description)

arrow

amount
required

float (Amount) >=1.0

]

Responses

RESPONSE SCHEMA :

application/json

Array [

arrow

local_id

string (Local ID is used to identify the transactions)  [ 1 .. 36 ] charcters

arrow

global_tx_id

string (Global transaction ID)  [ 1 .. 36 ] charcters

arrow

category_id

string (See All  Categories)  [ 1 .. 255 ] charcters

arrow

cagtegory_name

string (See All  Categories)

arrow

brand_id

string (Brand ID is a unique identifier)  [ 1 .. 255 ] charcters

arrow

brand_name

string (Brand Name)

arrow

brand_logo

string (Brand Logo URL)
The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

]

POST

https://api.lunedata.io/api/v1/transaction/enrich/bulk/

Payload

application/json

Content type

{
  "data": [
    {
      "local_id": "string",
      "raw_description": "string",
      "amount": 1
    }
  ]
}

201

application/json

Content type

[
  {
    "local_id": "string",
    "global_tx_id": "string",
    "category_id": "string",
    "category_name": "string",
    "brand_id": "string",
    "brand_name": "string",
    "brand_logo": "string"
  }
]

Enrichment V2.1.2

The Enrichment V2 endpoint, Accepts a query parameter response-type that allows you to control response type from either consumer or business. It also returns the Brand Website URL, Business Category and Business Sub-category for transactions. Transactions can be sent as single or bulk requests using the same endpoint. Note that in case of not specifying  response-type the consumer param value will be set by default.

Query Params (Key)

Value

response-type

consumer

Enriching Consumer Transactions

Enriches single or bulk transactions

AUTHORIZATIONS:

Api-key

REQUEST BODY SCHEMA :

application/json

arrow

transactions >
required

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

transaction_date

string (YYYY-MM-DD)

arrow

amount
required

float (Amount)

arrow

currency_code

string (Currency code) 3 charcters ISO currency code

arrow

raw_description
required

string (Raw Description)

arrow

ref_id

string (Reference ID)

]

Responses

RESPONSE SCHEMA :

application/json

arrow

transactions >

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

ref_id

string (Reference ID)

arrow

category_id

string (See All Main Consumer Categories)  [ 1 .. 255 ] charcters

arrow

category_name

string (See All Main Consumer Categories)

arrow

sub_category_id

string (See All Consumer Sub-Categories)  [ 1 .. 255 ] charcters

arrow

sub_category_name

string (See All Consumer Sub-Categories)

arrow

brand_id

string (Brand ID is a unique identifier)  [ 1 .. 255 ] charcters

arrow

brand_name

string (Brand Name)

arrow

brand_logo

The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

arrow

brand_url

string (Brand website URL)

arrow

global_tx_id

string (Global Transaction ID)

]

POST

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

Payload

application/json

Content type

{
    "transactions" : [
         {
            "transaction_date" : "2022-12-25" ,
            "amount": -23.0,
            "currency_code": "AED",
            "raw_description": "Mcdonalds",
            "ref_id": "r1"
         },
    		 {
            "transaction_date" : "2022-11-22" ,
            "amount": 13.0,
            "currency_code": "SAR",
            "raw_description": "Apple Pay Mcdonalds ADNOC",
            "ref_id": "r2"
         }
    ]
}

201

application/json

Content type

{
    "transactions": [
        {
            "ref_id": "r1",
            "category_id": "10",
            "category_name": "Dining",
            "sub_category_id": "10-1",
            "sub_category_name": "Restaurants",
            "brand_id": 20157,
            "brand_name": "McDonalds",
            "brand_logo": "brand_logos/mcdonalds.png",
            "brand_url": "https://www.mcdonalds.com/",
            "global_tx_id": "9c838349-ce82-4c20-83d6-7fff6b3a5958"
        },
        {
            "ref_id": "r2",
            "category_id": "10",
            "category_name": "Dining",
            "sub_category_id": "10-1",
            "sub_category_name": "Restaurants",
            "brand_id": 20157,
            "brand_name": "McDonalds",
            "brand_logo": "brand_logos/mcdonalds.png",
            "brand_url": "https://www.mcdonalds.com/",
            "global_tx_id": "59f3c13a-139a-47c4-9414-28913a69b50d"
        }
    ]
}

Enriching Business Transactions

Query Params (Key)

Value

response-type

business

Enriches single or bulk transactions

AUTHORIZATIONS:

Api-key

REQUEST BODY SCHEMA :

application/json

arrow

transactions >
required

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

transaction_date

string (YYYY-MM-DD)

arrow

amount
required

float (Amount)

arrow

currency_code

string (Currency code) 3 charcters ISO currency code

arrow

raw_description
required

string (Raw Description)

arrow

ref_id

string (Reference ID)

]

Responses

RESPONSE SCHEMA :

application/json

arrow

transactions >

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

ref_id

string (Reference ID)

arrow

business_category_id

string (See All Business Main Categories)   [ 1 .. 255 ] charcters

arrow

business_category_name

string (See All Business Main Categories)

arrow

business_sub_category_id

string (See All Business Sub-Categories)   [ 1 .. 255 ] charcters

arrow

business_sub_category_name

string (See All Business Sub-Categories)

arrow

brand_id

Integer (Brand ID is a unique identifier)

arrow

brand_name

string (Brand Name)

arrow

brand_logo

The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

arrow

brand_url

string (Brand website URL)

arrow

global_tx_id

string (Global Transaction ID)

]

POST

https://api.lunedata.io/api/v2/transaction/enrich/?response-type=business

Payload

application/json

Content type

{
    "transactions" : [
         {
            "transaction_date" : "2022-12-25" ,
            "amount": -23.0,
            "currency_code": "AED",
            "raw_description": "Mcdonalds",
            "ref_id": "r1"
         },
    		 {
            "transaction_date" : "2022-11-22" ,
            "amount": 13.0,
            "currency_code": "SAR",
            "raw_description": "Apple Pay Mcdonalds ADNOC",
            "ref_id": "r2"
        }
    ]
}

201

application/json

Content type

{
    "transactions": [
        {
            "ref_id": "r1",
            "business_category_id": "B8",
            "business_category_name": "Meals & drinks",
            "business_sub_category_id": "B8-1",
            "business_sub_category_name": "Restaurants",
            "brand_id": 20157,
            "brand_name": "McDonalds",
            "brand_logo": "brand_logos/mcdonalds.png",
            "brand_url": "https://www.mcdonalds.com/",
            "global_tx_id": "37ce3c54-77eb-4d0a-baa0-65d78075b5a4"
        },
        {
            "ref_id": "r2",
            "business_category_id": "B8",
            "business_category_name": "Meals & drinks",
            "business_sub_category_id": "B8-1",
            "business_sub_category_name": "Restaurants",
            "brand_id": 20157,
            "brand_name": "McDonalds",
            "brand_logo": "brand_logos/mcdonalds.png",
            "brand_url": "https://www.mcdonalds.com/",
            "global_tx_id": "2d76dc98-3869-4d5f-81d9-3b1660a6f104"
        }
    ]
}

Response Status

- 200 Success : Standard response for successful HTTP requests.

-  400 Bad Request: The request cannot be fulfilled due to bad syntax.

List Of Consumer Main Categories

category_id (string)

category_name (string)

"1"

Financial Services

"2"

Charity & Gifts

"3"

Education

"4"

Entertainment

"5"

Government Services

"6"

Groceries

"7"

Wellness

"8"

Savings & Investments

"9"

Household

"10"

Dining

"11"

Shopping

"12"

Income

"13"

Transfer

"14"

Transportation

"15"

Travel

"16"

Loans

"17"

Insurance

"18"

Services

"19"

Miscellaneous

List of emirates

code (string)

name

AE-AZ

Abu Dhabi

AE-FU

Fujairah

AE-SH

Sharjah

AE-DU

Dubai

AE-RK

Ras Al Khaimah

AE-UQ

Umm Al Quwain

AE-AJ

Ajman

List Of Consumer Sub-Categories

sub_category_id (string)

sub_category_name (string)

Financial Services

"1-1"

Currency Exchange

"1-2"

Bank Fees

"1-3"

Financial Services

"1"

Other

Charity & Gifts

"2-1"

Donations

"2-2"

Gifting

"2"

Other

Education

"3-1"

University Tuition

"3-2"

School Fees

"3-3"

Books

"3-4"

Courses

"3-5"

Certifications

"3"

Other

Entertainment

"4-1"

Cinema

"4-2"

Theater

"4-3"

Concerts

"4-4"

Sport Events

"4-5"

Amusement Parks

"4-6"

Sport Activities

"4-7"

Comedy Shows

"4-8"

Pets

"4-9"

Gaming

"4-10"

Hobbies

"4-11"

Music Streaming

"4-12"

TV

"4-13"

Movie Streaming

"4-14"

Parks

"4"

Other

Government Services

"5-1"

Taxes

"5-2"

Government Fees

"5"

Other

Groceries

"6-1"

Supermarket

"6-2"

Convenience Store

"6-3"

Alcohol Shop

"6-4"

Tobacco Shop

"6-5"

Grocery Delivery

"6"

Other

Wellness

"7-1"

Medical

"7-2"

Pharmacy

"7-3"

GYM

"7-4"

Hair & Beauty

"7-5"

Dental

"7-6"

Mental Wellbeing

"7"

Other

Savings & Investments

"8-1"

Savings

"8-2"

Stocks

"8-3"

Long-term Deposits

"8-4"

Mutual Funds

"8-5"

Crypto

"8"

Other

Household

"9-1"

Rent

"9-2"

Electricity & Water

"9-3"

Internet

"9-4"

Phone Bill

"9-5"

Maintenance

"9-6"

Household Serivces

"9"

Other

Dining

"10-1"

Restaurants

"10-2"

Food Delivery

"10-3"

Coffeeshop

"10-4"

Nightlife

"10-5"

Shisha

"10-6"

Food Catering Services

"10"

Other

Shopping

"11-1"

Department Stores

"11-2"

Clothing

"11-3"

Electronics

"11-4"

Online Shopping

"11-5"

Furniture

"11-6"

Stationery and Supplies

"11-7"

Jewelery

"11-8"

Cosmetics and Perfumes

"11"

Other

Income

"12-1"

Salary

"12-2"

Allowance

"12-3"

Income from Investments

"12-4"

Income from Transfers & Deposits

"12-5"

Refunds and returned Payments

"12"

Other

Transfer

"13-1"

Money Transfers to Others

"13-2"

Cash withdrawals (ATM)

"13-3"

Money transfers between accounts

"13-4"

Payment to credit card

"13-5"

Online money transfers

"13"

Other

Transportation

"14-1"

Parking

"14-2"

Tolls

"14-3"

Subways, Metros & Buses

"14-4"

Taxis

"14-5"

Bikes & Scooters

"14-6"

Fuel & E-charging

"14-7"

Vehicle Purchases

"14-8"

Vehicle Maintenance

"14-9"

Car Rental

"14-10"

Courier Services

"14"

Other

Travel

"15-1"

Hotel and Accommodation

"15-2"

Plane & Train Tickets

"15-3"

Cruise Tickets

"15"

Other

Loans

"16-1"

Mortgage

"16-2"

Interest & Loan Repayment

"16"

Other

Insurance

"17-1"

Life Insurance

"17-2"

Medical Insurance

"17-3"

Car Insurance

"17"

Other

Services

"18-1"

Online Services

"18-2"

Administrative Services

"18"

Other

Miscellaneous

"19-1"

Miscellaneous

"19"

Other

List of emirates

code (string)

name

AE-AZ

Abu Dhabi

AE-FU

Fujairah

AE-SH

Sharjah

AE-DU

Dubai

AE-RK

Ras Al Khaimah

AE-UQ

Umm Al Quwain

AE-AJ

Ajman

List Of Business Main Categories

business_category_id (string)

business_category_name (string)

"B1"

Financial Services

"B2"

Charity

"B3"

Training

"B4"

Entertainment

"B5"

Taxes

"B6"

General and Admin

"B7"

Employee Benefits

"B8"

Meals & drinks

"B9"

Hardware

"B10"

Inflows

"B11"

Transfer

"B12"

Transportation

"B13"

Travel

"B14"

Loans

"B15"

Professional Services & Marketing

"B16"

Software

"B17"

Salaries and other compensation

"B18"

Utilities

"B19"

Miscellaneous

List of emirates

code (string)

name

AE-AZ

Abu Dhabi

AE-FU

Fujairah

AE-SH

Sharjah

AE-DU

Dubai

AE-RK

Ras Al Khaimah

AE-UQ

Umm Al Quwain

AE-AJ

Ajman

List Of Business Sub-Categories

business_sub_category_id (string)

business_sub_category_name (string)

Financial Services

"B1-1"

Currency Exchange

"B1-2"

Bank Fees

"B1-3"

Installments

"B1"

Other

Charity

"B2"

Other

Training

"B3-1"

Books

"B3-2"

Training and Upskilling

"B3-3"

University Tuition - Scholarships

"B3-4"

Certifications

"B3"

Other

Entertainment

"B4-1"

Cinema

"B4-2"

Theater

"B4-3"

Concerts

"B4-4"

Sport Events

"B4"

Other

Taxes

"B5-1"

Taxes

"B5-3"

Payroll Tax

"B5"

Other

Government Services

"B21-1"

Government Fees

"B21"

Other

General and Admin

"B6-1"

Office Supplies

"B6-2"

Office Services

"B6-3"

Office Rent

"B6-4"

Giveaways

"B6-5"

Maintenance

"B6-6"

Furniture

"B6"

Other

Employee Benefits

"B7-1"

Gym

"B7-2"

Coworking Space

"B7-3"

Shopping & Gift Cards

"B7-4"

School Fees

"B7-5"

Pension plans

"B7-6"

Life Insurance

"B7-7"

Medical Insurance

"B7-8"

Car Insurance

"B7"

Other

Meals & drinks

"B8-1"

Restaurants

"B8-2"

Food Delivery

"B8-3"

Coffeeshop

"B8-4"

Food Catering Services

"B8"

Other

Hardware

"B9-1"

Electronics

"B9"

Other

Inflows

"B10"

Other

Transfer

"B11-1"

Cheque

"B11"

Other

Transportation

"B12-1"

Parking

"B12-2"

Tolls

"B12-3"

Subways, Metros & Buses

"B12-4"

Taxis

"B12-5"

Bikes & Scooters

"B12-6"

Fuel & E-charging

"B12-7"

Car Rental

"B12-8"

Vehicle Purchase

"B12-9"

Vehicle Maintenance

"B12"

Other

Logistics

"B20-1"

Courier Services

"B20"

Other

Travel

"B13-1"

Hotel and Accommodation

"B13-2"

Plane & Train Tickets

"B13"

Other

Loans

"B14-1"

Liabilities

"B14-2"

Installments

"B14-3"

Mortgage

"B14-4"

Interest & Loan Repayment

"B14"

Other

Professional Services & Marketing

"B15-1"

Digital Marketing

"B15-2"

Advertising Agencies

"B15-3"

Public Relations

"B15-4"

Legal

"B15-5"

Finanace

"B15-6"

Consultancy

"B15-7"

Audit

"B15-8"

Miscellaneous

"B15-9"

Administrative and Operation Management Services

"B15"

Other

Software

"B16-1"

Online Services

"B16-2"

Administrative Services

"B16-3"

Servers

"B16"

Other

Salaries and other compensation

"B17-1"

Salary

"B17-2"

Allowance

"B17-3"

Pension Plans

"B17"

Other

Utilities

"B18-1"

Electricity & Water

"B18-2"

Internet

"B18-3"

Phone Bill

"B18"

Other

Miscellaneous

"B19-1"

Miscellaneous

"B19"

Other

List of emirates

code (string)

name

AE-AZ

Abu Dhabi

AE-FU

Fujairah

AE-SH

Sharjah

AE-DU

Dubai

AE-RK

Ras Al Khaimah

AE-UQ

Umm Al Quwain

AE-AJ

Ajman