Batch Retrieval Demo

Batch Retrieval Demo Video

200

400

401

404

403

500

{
    "successful_transactions": {
        "23560778-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8950"
            "Carbon Footprint": null,
            "Category ID": "1002",
            "Category Name": "Restaurant",
            "Clean Description": "Zomato Order",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Zomato",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Zomato.png",
            "Merchant Website": null,
            "Subcategory Name": "Indian restaurant"
        },
        "235608c2-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8951"
            "Carbon Footprint": null,
            "Category ID": "4003",
            "Category Name": "Electronics",
            "Clean Description": "Apple Itunes Store Aed",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Apple",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/logos/apple%20us.png",
            "Merchant Website": null,
            "Subcategory Name": "Electronics"
        },
        "23560944-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8952"
            "Carbon Footprint": null,
            "Category ID": "9005",
            "Category Name": "Software and apps",
            "Clean Description": "Itunes",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Itunes",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/google_logos/Itunes.png",
            "Merchant Website": null,
            "Subcategory Name": "Software and apps"
        },
        "235609a8-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8953"
            "Carbon Footprint": null,
            "Category ID": "1001",
            "Category Name": "Supermarket",
            "Clean Description": "Carrefour Market Alsee",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Carrefour Market",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Carrefour Market.png",
            "Merchant Website": null,
            "Subcategory Name": "Supermarket"
        },
        "23560a02-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8954"
            "Carbon Footprint": null,
            "Category ID": "1001",
            "Category Name": "Supermarket",
            "Clean Description": "Swiss Mart Supermarket",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Al Suwais Supermarket",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Al Suwais Supermarket.png",
            "Merchant Website": null,
            "Subcategory Name": "Supermarket"
        },
        "23560a66-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8955"
            "Carbon Footprint": null,
            "Category ID": "4005",
            "Category Name": "Other shopping",
            "Clean Description": "duty free dfs",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Beirut Duty Free Shops",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Beirut Duty-Free Shops.png",
            "Merchant Website": null,
            "Subcategory Name": "Duty free store"
        },
        "23560ac0-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8956"
            "Carbon Footprint": null,
            "Category ID": "6006",
            "Category Name": "Online activities and subscriptions",
            "Clean Description": "itunes  bill",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Itunes Bill",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/logos/itunes bill.png",
            "Merchant Website": null,
            "Subcategory Name": "Online activities and subscriptions"
        },
        "23560b24-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8957"
            "Carbon Footprint": null,
            "Category ID": "6006",
            "Category Name": "Online activities and subscriptions",
            "Clean Description": "itunes  bill",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Itunes Bill",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/logos/itunes bill.png",
            "Merchant Website": null,
            "Subcategory Name": "Online activities and subscriptions"
        },
        "23560b88-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8958"
            "Carbon Footprint": null,
            "Category ID": "5002",
            "Category Name": "Vehicle purchase, maintenance",
            "Clean Description": "Tensai Tuning Auto Wor",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Tensai",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Tensai.png",
            "Merchant Website": null,
            "Subcategory Name": "Auto tune up service"
        },
        "23560be2-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8959"
            "Carbon Footprint": null,
            "Category ID": "9002",
            "Category Name": "Online services",
            "Clean Description": "Google Services",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Google",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/google_logos/Google.png",
            "Merchant Website": null,
            "Subcategory Name": "Online services"
        },
        "23560c3c-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8960"
            "Carbon Footprint": null,
            "Category ID": "2005",
            "Category Name": "Telephone and internet",
            "Clean Description": "Etisalat Eshop Atg",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Etisalat",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Etisalat.png",
            "Merchant Website": null,
            "Subcategory Name": "Telephone and internet"
        },
        "23560c96-2fb5-11ee-931c-d281dc259316": {
            "Merchant ID": "00005af3107a8961"
            "Carbon Footprint": null,
            "Category ID": "2005",
            "Category Name": "Telephone and internet",
            "Clean Description": "Etisalat eshop",
            "Country": "UNITED ARAB EMIRATES",
            "Display Description": "Etisalat",
            "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Etisalat.png",
            "Merchant Website": null,
            "Subcategory Name": "Telephone and internet"
        }
    }
}

Query Parameters

Name

Type

Description

country*

string

Country where transaction was preformed. Need to insert the right

otherwise it will lead to an error, e.g., Egypt, EG or EGY.

date*

string

Date at which transaction occurred in the format: YYYY-MM-DD

format

latitude

number

Latitude of transaction merchant

(mandatory if longitude is provided.)

longitude

number

Longitude of transaction merchant

(mandatory if latitude is provided.)

amount*

string

Value of the transaction in USD by default. Negative ➖ amounts

are expenses, positive ➕ amounts are incoming transactions.

description*

string

Description of the transaction, e.g.,

"Cafe Lucia Plaza Central XY123"

(Note: if the char "&" is part of passed

description in IDE, please use "%26" instead.)

mcc

number

Merchant category code (Use model_name = model_4

to use the mcc mapper as the primary categorizer)

currency

string

Options: [ Default:"USD", "EUR", "GBP", "AED", "SAR",

"EGP", "AUD", "BRL", "CAD", "CHF", "CNY", "COP", "DKK",

"HKD", "HUF", "INR", "JPY", "MXN", "MYR", "NOK",

"OMR", "PHP", "PLN", "RON", "SEK", "SGD", "UAH", "ZAR"]

Get Categorized Transaction

https://pfm.genify.ai/api/v1.0/txn-data/

The unified endpoint can be used to only categorize a banking transaction (from a credit card, a debit card or a bank account) from its description and amount. The transaction is categorized as one of ~80 categories in Genify's category tree.

Enrich Transaction Data

https://pfm.genify.ai/api/v1.0/txn-data/

Unified endpoint: this single endpoint can be used for all three features (categorization, merchant logo, carbon footprint), for convenience. This endpoint categorizes a banking transaction from its description and amount, and also returns the corresponding merchant logo and carbon footprint. Any one, two or all three features can be queried (See individual endpoint documentation for more details).

Headers

Name

Type

Description

Account_id*

String

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

Category*

String

Flag used to activate categorizer.

Model_name

String

Name of the machine learning model to

use. COMING SOON: separate endpoint to

retrieve the list available. Defaults to model_2.

Username*

String

Your username

Authorization*

String

API key associated with your Genify account.

Website

Boolean

flag specifies weither to get merchant website or not.

value: 0(default) or 1.

Enrich Transaction Data

Get Categorized Transaction

Get Categorized Transaction (based on client code)

Get Merchant Logo

Get Carbon Footprint

Post Classification Error

Batch Transactions

Batch Transactions Demo

Retrieve Batch Transactions

Batch Retrieval Demo

Was this helpful?

Query Parameters

Name

Type

Description

bank_code*

String

code of that client that will be used to fetch static categorization for the requested transaction.

country*

string

Country where transaction was preformed. Need to insert the right

format

otherwise it will lead to an error, e.g., Egypt, EG or EGY.

Headers

Name

Type

Description

Username*

String

Client name.

Authorization*

String

Client api_key.

Category*

Boolean

Flag used to activate categorizer.

Account_id*

String

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

Query Parameters

Name

Type

Description

longitude

number

Longitude of transaction merchant

(mandatory if latitude is provided.)

latitude

number

Latitude of transaction merchant

(mandatory if longitude is provided.)

date*

string

Date at which transaction occurred in the format: YYYY-MM-DD

country*

string

Country where transaction was preformed. Need to insert the right

format

otherwise it will lead to an error, e.g., Egypt, EG or EGY.

description*

string

Description of the transaction, e.g.,

"Cafe Lucia Plaza Central XY123"

amount*

Number

Value of the transaction in USD by default. Negative ➖ amounts

are expenses, positive ➕ amounts are incoming transactions.

200 categorization successful

400 mis…

401 invalid us…

500

{
    "Transaction UUID": "3dffdef7-29a2-42c3-91e5-75d10e3d69f1"
    "Merchant ID": "00005af3107a8964"
    "Carbon Footprint": null,
    "Category Confidence": null,
    "Category ID": "1003",
    "Category Name": "Coffeeshop",
    "Country": "EGYPT",
    "Logo": null,
    "Subcategory Name": "Coffee shop",
    "Clean Description": "Starbucks Plaza Central",
    "Display Description": "Starbucks"
}

Transaction Data API

Endpoints used to enrich banking transaction data with categories, merchant logos and the carbon footprint.

The Transaction Data API endpoints require authorization (via API key) as they are hosted by Genify in the cloud. Other endpoints are installed on our clients' cloud or premises.

Last updated 7 months ago

200

400

401

404

403

500

{
    "batch_txn uuid": "22f48412-2fb5-11ee-9863-d281dc259316",
    "txns uuids": [
        "23560778-2fb5-11ee-931c-d281dc259316",
        "235608c2-2fb5-11ee-931c-d281dc259316",
        "23560944-2fb5-11ee-931c-d281dc259316",
        "235609a8-2fb5-11ee-931c-d281dc259316",
        "23560a02-2fb5-11ee-931c-d281dc259316",
        "23560a66-2fb5-11ee-931c-d281dc259316",
        "23560ac0-2fb5-11ee-931c-d281dc259316",
        "23560b24-2fb5-11ee-931c-d281dc259316",
        "23560b88-2fb5-11ee-931c-d281dc259316",
        "23560be2-2fb5-11ee-931c-d281dc259316"
    ]
}

200

400 missing ...

401 no author…

500

{

    "Transaction UUID": "3dffdef7-29a2-42c3-91e5-75d10e3d69f1"
    "Merchant ID": "00005af3107a8964"
    "Carbon Footprint": 6.3,
    "Category Confidence": null,
    "Category ID": "1003",
    "Category Name": "Coffeeshop",
    "Clean Description": "Starbucks",
    "Country": "EGYPT",
    "Display Description": "Starbucks",
    "Logo": null,
    "Merchant Website": "locations.starbucks.eg",
    "Subcategory Name": "Coffeeshop"
}

200: OK success

400 bad req...

401 unauthor…

403: forbidd..

{

    "Transaction UUID": "3dffdef7-29a2-42c3-91e5-75d10e3d69f1"
    "Merchant ID": null
    "Carbon Footprint": null,
    "Category Confidence": 1,
    "Category ID": "CHD",
    "Category Name": "Banking Service",
    "Country": "egypt",
    "Logo": null,
    "Subcategory Name": null,
    "Clean Description": "CASH DEPOSIT",
    "Display Description": "CASH DEPOSIT"
}

200 success

400 mis…

401 invalid us…

404 no ser …

500 error …

403 user is…

{
	"Transaction UUID": "3dffdef7-29a2-42c3-91e5-75d10e3d69f1"
	"Merchant ID": "00005af3107a8964"
	"Carbon Footprint": 0.661,
	"Category ID": "2005",
	"Category Name": "Telephone and internet",
	"Clean Description": "Orange Egypt",
	"Country": "EGYPT",
	"Display Description": "Orange",
	"Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Orange.png",
	"Merchant Website": "www.orange.eg",
	"Subcategory Name": "Telephone and internet"
}

Headers

Name

Type

Description

account_id*

string

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

category_name

string

If carbon_footprint is true, the category_name

can be inserted to avoid running the categorizer

and use the category you provide instead.

category_id

string

If carbon_footprint is true, the category_id can be inserted to avoid

running the categorizer and use the category you provide instead

model_name

string

Name of the machine learning model to

use. COMING SOON: separate endpoint to

retrieve the list available. Defaults to model_2.

logo

boolean

If false or omitted, no logo is returned.

carbonfootprint

boolean

If false or omitted, omits carbon footprint value from response.

category

boolean

If false or omitted, omits category

name and id values from response.

username*

string

Your username

authorization*

string

API key associated with your Genify account.

logo_format

String

Logo format you want returned.

Options: [Default: raw, round, square]

website

boolean

flag specifies weither to get merchant website or not.

value: 0(default) or 1.

Get Categorized Transaction (based on client code)

https://pfm.genify.ai/api/v1.0/txn-data/

200: OK success message

400 bad request ...

{
    "message": "error report was received"
}

200

400

401

404

403

500

{
    "batch_txn uuid": "22f48412-2fb5-11ee-9863-d281dc259316",
    "txns uuids": [
        "23560778-2fb5-11ee-931c-d281dc259316",
        "235608c2-2fb5-11ee-931c-d281dc259316",
        "23560944-2fb5-11ee-931c-d281dc259316",
        "235609a8-2fb5-11ee-931c-d281dc259316",
        "23560a02-2fb5-11ee-931c-d281dc259316",
        "23560a66-2fb5-11ee-931c-d281dc259316",
        "23560ac0-2fb5-11ee-931c-d281dc259316",
        "23560b24-2fb5-11ee-931c-d281dc259316",
        "23560b88-2fb5-11ee-931c-d281dc259316",
        "23560be2-2fb5-11ee-931c-d281dc259316"
    ]
}

Get Merchant Logo

https://pfm.genify.ai/api/v1.0/txn-data/

The same endpoint can be used to only obtain the merchant logo corresponding to a transaction. The merchant logo is retrieved from Genify's proprietary database which grows incrementally if an unknown merchant is queried.

Headers

Name

Type

Description

Account_id*

String

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

Model_name

String

Name of the machine learning model to

use. COMING SOON: separate endpoint to

retrieve the list available. Defaults to model_2.

Logo*

String

Flag used to activate logo grabber.

Authorization*

String

API key associated with your Genify account.

Username*

String

Your username

Logo_format

String

Format of the output logo. Options: raw, square or round. Default: raw.

Website

Boolean

flag specifies weither to get merchant website or not.

value: 0(default) or 1.

Headers

Name

Type

Description

Username*

String

Your username

Authorization*

String

API key associated with your Genify account.

Headers

Name

Type

Description

Account_id*

String

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

category_id

string

If carbon_footprint is on, user can insert a category ID to avoid wait time of categorizer.

category_name

string

If carbon_footprint is on, user can insert a category name to avoid wait time of categorizer.

Carbon footprint*

Boolean

Flag used to activate carbon footprint calculation.

Username*

String

Your username

Authorization*

String

API key associated with your Genify account.

Request body

Name

Type

Description

Description*

string

The endpoint on which the user wants to report an error.

wrong_category*

string

Genify's categorization to client's request.

suggested_category*

string

the endpoint on which the user wants to report an error.

Query Parameters

Name

Type

Description

account_id*

string

id used to identify current user provided in format of

account_ eg: account_0 which exists for testing.

(Note: the more the data collected for your user's

id, the better results the models will provide you.)

This account_id will be overwritten in case of providing a specific account_id with each txn.

category_name

string

If carbon_footprint is true, the category_name

can be inserted to avoid running the categorizer

and use the category you provide instead.

category_id

string

If carbon_footprint is true, the category_id can be inserted to avoid

running the categorizer and use the category you provide instead

model_name

string

Name of the machine learning model to

use. COMING SOON: separate endpoint to

retrieve the list available. Defaults to model_2.

logo

boolean

If false or omitted, omits logo from response. [removed value]

Carbon footprint*

Boolean

If false or omitted, omits carbon footprint value from response.

Category*

Boolean

If false or omitted, omits category name and id values from response.

date*

string

Date at which transaction occurred in the format: YYYY-MM-DD

Username*

String

Your username

Authorization*

String

API key associated with your Genify account.

Logo_format

String

Format of the output logo. Options: raw, square or round. Default: raw.

Enable_caching

Boolean

Flag that specifies whether to cache a merchant or not, in case It was not already cached. default: 0. value: 0 or 1.

Extend_db

Boolean

Flag that specifies whether to store a merchant in the database or not. default: 0. value: 0 or 1

Website

Boolean

flag specifies weither to get merchant website or not.

value: 0(default) or 1.

Query Parameters

Name

Type

Description

longitude

number

Longitude of transaction merchant

(mandatory if latitude is provided.)

latitude

number

Latitude of transaction merchant

(mandatory if longitude is provided.)

date*

string

Date at which transaction occurred in the format: YYYY-MM-DD

country*

string

Country where transaction was preformed. Need to insert the right

format

otherwise it will lead to an error, e.g., Egypt, EG or EGY.

amount*

Number

Value of the transaction in USD by default. Negative ➖ amounts

are expenses, positive ➕ amounts are incoming transactions.

description*

string

Description of the transaction, e.g.,

"Cafe Lucia Plaza Central XY123"

(Note: if the char "&" is part of passed

description in IDE, please use "%26" instead.)

Currency

string

Options: [ Default:"USD", "EUR", "GBP", "AED", "SAR", "EGP", "AUD", "BRL", "CAD", "CHF", "CNY", "COP", "DKK", "HKD", "HUF", "INR", "JPY", "MXN", "MYR", "NOK", "OMR", "PHP", "PLN", "RON", "SEK", "SGD", "UAH", "ZAR"]

200 success

400 missing des...

401 authorization is..

{
    "Transaction UUID": "3dffdef7-29a2-42c3-91e5-75d10e3d69f1"
    "Merchant ID": null
    "Carbon Footprint": null,
    "Category Confidence": null,
    "Category ID": "1003",
    "Category Name": "Coffeeshop",
    "Clean Description": "Starbucks",
    "Country": "EGYPT",
    "Display Description": "Starbucks",
    "Logo": "https://pfm-logos.s3.eu-central-1.amazonaws.com/cached_logos/Starbucks%20round.png",
    "Merchant Website": "locations.starbucks.eg",
    "Subcategory Name": "Coffeeshop"
}

Query Parameters

Name

Type

Description

longitude

number

Longitude of transaction merchant

(mandatory if latitude is provided.)

latitude

number

Latitude of transaction merchant

(mandatory if longitude is provided.)

date*

string

Date at which transaction occurred in the format: YYYY-MM-DD

country*

string

Country where transaction was preformed. Need to insert the right

format

otherwise it will lead to an error, e.g., Egypt, EG or EGY.

description*

string

Description of the transaction, e.g.,

"Cafe Lucia Plaza Central XY123"

(Note: if the char "&" is part of passed

description in IDE, please use "%26" instead.)

amount*

Number

Value of the transaction in USD by default. Negative ➖ amounts

are expenses, positive ➕ amounts are incoming transactions.

CSV File input

Batch Transactions Demo

Demo Video with JSON body input

Batch Transactions

https://pfm.genify.ai/api/v1.0/txn-data/

This Endpoint will automatically operate as a batch endpoint whenever it gets a input as "raw body", "csv file", or "json file". The input ideally should contain list of transactions to be processed in batches.

Get Carbon Footprint

https://pfm.genify.ai/api/v1.0/txn-data/

The same endpoint can be used to only calculate the carbon footprint (carbon-equivalent weight in kg) corresponding to a transaction description, amount and category ID/name. The carbon footprint is computed using Genify's curated database of carbon footprint values. When no category is passed as input, the Genify transaction categorizer is used to infer the category.

Request Body

Name

Type

Description

txns_uuids

List

A list containing the txns uuid/s of transactions that we want to retrieve

Retrieve Batch Transactions

https://pfm.genify.ai/api/v1.0/txn-data/retrieve-txn/batch/

In this Endpoint we will make use of the Txns UUIDs generated to retrieve all the Txns or Retrieve any number of txns by specifying their UUIDs

Request body

Name

Type

Description

txns

JSON file

The endpoint on which the user wants to report an error.

txns

csv file

The second way of using batch endpoint, in CSV format, by attaching a CSV file as "Form-Data",

txns

List

This is the first scenario of inputting transactions. We add in the raw body option (JSON Formatted), a list containing transactions in form of a JSON object each Transaction Parameters Required are: { "description", "amount", "country"} Optional: {"mcc", "bank-code", "account-id"}

Post Classification Error

https://pfm.genify.ai/api/v1.0/txn-data/report/error/

Overview

Authentication

PFM Suite

Error Codes

HTTP Codes

Logo HTTP Codes