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.
Enrich Transaction Data
POST
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).
Query Parameters
Name | Type | Description |
---|---|---|
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. |
date* | string | Date at which transaction occurred in the format: YYYY-MM-DD |
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"] |
Headers
Name | Type | Description |
---|---|---|
account_id* | string | id used to identify current user provided in format of account_<id> 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
GET
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.
Query Parameters
Name | Type | Description |
---|---|---|
longitude | number | Longitude of transaction merchant (mandatory if longitude 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 the 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. |
Headers
Name | Type | Description |
---|---|---|
account_id* | string | id used to identify current user provided in format of account_<id> 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. |
Get Categorized Transaction ( based on client code )
GET
https://pfm.genify.ai/api/v1.0/txn-data/
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 the 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_<id> 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.) |
Get Merchant Logo
GET
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.
Query Parameters
Name | Type | Description |
---|---|---|
longitude | number | Longitude of transaction merchant (mandatory if longitude 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 the 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 | string | Value of the transaction in USD by default. Negative ➖ amounts are expenses, positive ➕ amounts are incoming transactions. |
Headers
Name | Type | Description |
---|---|---|
account_id* | string | id used to identify current user provided in format of account_<id> 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. |
You can visit this link to view the image from the Base64 code.
Get Carbon Footprint
GET
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.
Query Parameters
Name | Type | Description |
---|---|---|
longitude | number | Longitude of transaction merchant (mandatory if longitude 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 the 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"] |
Headers
Name | Type | Description |
---|---|---|
account_id* | string | id used to identify current user provided in format of account_<id> 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. |
carbonfootprint* | boolean | Flag used to activate carbon footprint calculation. |
username* | string | Your username. |
authorization* | string | API key associated with your Genify account. |
Post Classification Error
POST
https://pfm.genify.ai/api/v1.0/txn-data/report/error/
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 | client's category suggestion to the request. |
Batch Transactions
POST
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.
Headers
Name | Type | Description |
---|---|---|
account_id* | string | id used to identify current user provided in format of account_<id> 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] |
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 | 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 | integer | flag that specifies whether to store a merchant in the database or not. default: 0. value: 0 or 1. |
website | boolean | flag that specifies if you want to get merchant website or not. values: 0(default) or 1. |
Request Body
Name | Type | Description |
---|---|---|
txns | JSON file | The other way of using batch endpoint, in JSON format, by attaching a JSON file as "Form-Data", |
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"} |
Batch Transactions Demo
CSV File input
Retrieve Batch Transactions
POST
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
Headers
Name | Type | Description |
---|---|---|
username* | string | Your username |
authorization* | string | API key associated with your Genify account. |
Request Body
Name | Type | Description |
---|---|---|
txns_uuids | List | A list containing the txns uuid/s of transactions that we want to retrieve |
Batch Retrieval Demo
Last updated