Download OpenAPI specification:Download
This is the documentation for data science services. Currently, these all run on AWS and can be accessed through a single gateway.
Services currently offered:
Server authentication is by api key - please contact a member of the team for the key
Allows clients to get merchant and category information for corresponding transactions. This information is extracted primarily from the transactionInformation string, but we may also process the proprietary and ISO codes to determine if the transaction is cash, bank fees, etc.
Returns a list of all categories, subcategories and ids returned by data science
{- "statusCode": 0,
- "body": {
- "transaction_type": [
- {
- "uuid": "string",
- "id": "string",
- "label": "EATING OUT"
}
], - "categories": {
- "type1": [
- {
- "uuid": "string",
- "id": "string",
- "label": "EATING OUT"
}
]
}, - "type2": [
- {
- "sub_categories": [
- {
- "uuid": "string",
- "id": "string",
- "label": "EATING OUT"
}
], - "label": "string",
- "id": "string"
}
]
}
}
Aggregates categories from all relevant sources. This endpoint should be used as the primary endpoint for categories
application-id required | string <uuid> The application id of the application |
hash required | string (Transaction hash) |
reference | string (Transaction reference) |
description required | string (Transaction Description) |
institution required | string (Institution) |
bookingDateTime required | string (Booking date time) |
amount | number (Transaction amount) |
proprietaryBankTransactionCode | string (Proprietary bank transaction code) |
isoBankFamilyCode | string (Iso bank family code) |
isoBankSubFamilyCode | string (Iso bank subfamily code) |
[- {
- "hash": "f409f4c937d84cf0311561404f026d54",
- "description": "TESCO PFS BASINGSTOKE 2020/07/30 3803",
- "institution": "lloyds",
- "bookingDateTime": "2020-08-01 00:00:00",
- "amount": -20.1,
- "proprietaryBankTransactionCode": "DEB",
- "isoBankFamilyCode": "CCRD",
- "isoBankSubFamilyCode": "POSD"
}
]
[- {
- "enrichment": {
- "hash": "f409f4c937d84cf0311561404f026d54",
- "merchant": {
- "merchantName": "TESCO PETROL",
- "parentGroup": "TESCO",
- "categories": {
- "category_2": "TRANSPORT",
- "category_3": "PETROL/FUEL"
}
}, - "location": "Basingstoke",
- "correctedDate": "2020-07-30",
- "cleanedTransactionString": "TESCO PFS"
}
}
]
Gets categories for a page of transactions. This uses a machine learning classifier, based on the transaction description, amount and date. This endpoint is no longer in use by the main Yapily gateway, and is only consumed by other data science applications.
required | Array of objects (Data to be categorised) |
{- "instances": [
- {
- "description": "Tesco",
- "amount": 10.5,
- "hash": "abcd1234",
- "date": "2020-07-01"
}
]
}
{- "Data": {
- "Transaction": [
- [
- "abc123",
- "GROCERIES",
- "84c9be40-4114-43ce-9e06-5f93c2719693"
]
]
}
}
Returns merchants, categories, and where possible:
This endpoint should not be consumed directly - use the category aggregator to fetch this category information as that will correctly combine other sources.
application-id required | string <uuid> The application id of the application |
hash required | string (Transaction hash) |
reference | string (Transaction reference) |
description required | string (Transaction Description) |
institution required | string (Institution) |
bookingDateTime required | string (Booking date time) |
amount | number (Transaction amount) |
proprietaryBankTransactionCode | string (Proprietary bank transaction code) |
isoBankFamilyCode | string (Iso bank family code) |
isoBankSubFamilyCode | string (Iso bank subfamily code) |
[- {
- "hash": "f409f4c937d84cf0311561404f026d54",
- "description": "TESCO PFS BASINGSTOKE 2020/07/30 3803",
- "institution": "lloyds",
- "bookingDateTime": "2020-08-01 00:00:00",
- "amount": -20.1,
- "proprietaryBankTransactionCode": "DEB",
- "isoBankFamilyCode": "CCRD",
- "isoBankSubFamilyCode": "POSD"
}
]
[- {
- "enrichment": {
- "hash": "f409f4c937d84cf0311561404f026d54",
- "merchant": {
- "merchantName": "TESCO PETROL",
- "parentGroup": "TESCO",
- "categories": {
- "category_2": "TRANSPORT",
- "category_3": "PETROL/FUEL"
}
}, - "location": "Basingstoke",
- "correctedDate": "2020-07-30",
- "cleanedTransactionString": "TESCO PFS"
}
}
]
The Transaction Stream Classifier identifies transactions streams for a user. For a given user's transactions, the transaction stream classifier determines which of their transactions form regular streams, rather than one-time incomes or expenditures. For each of those streams, the classifier isolates the transactions belonging to that stream.
It also determines:
The transaction stream classifier predicts when the next transaction will be (or would have been, if the stream is no longer current). For convenience, the classifier also returns the dates of the first and last transactions in the stream
Finally, the classifier returns the average amount of the transactions in the stream, and an amount consistency score, calculated as 1-v where v is the coeffient of variation of the amounts in the stream.
The endpoint identifies transaction streams from a payload of transactions. This endpoint returns the transactions with an additional transaction streams object containing:
PLEASE NOTE: the transaction stream classifier requires a contiguous block of transactions - at a minimum three months, but ideally a year. The transaction stream clasifier also benefits from receiving transactions from all of a users accounts. This allows us to
required | Array of objects (User accounts) non-empty |
{- "accounts": {
- "accounts": [
- {
- "accountId": 12345678,
- "transactions": [
- {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-03-28"
}, - {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-04-28"
}, - {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-05-28"
}, - {
- "transactionId": "abcdef02",
- "transactionInformation": "Yapily Ltd",
- "amount": 2300,
- "bookingDateTime": "2020-03-27",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef02",
- "transactionInformation": "Yapily Ltd",
- "amount": 2300,
- "bookingDateTime": "2020-04-28",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef03",
- "transactionInformation": "Yapily Ltd",
- "amount": 2500,
- "bookingDateTime": "2020-05-27",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef04",
- "transactionInformation": "Yapily Ltd",
- "amount": 2500,
- "bookingDateTime": "2020-06-26",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef05",
- "transactionInformation": "Side gig",
- "amount": 250,
- "bookingDateTime": "2020-05-25",
- "institution": "hsbc_uk"
}
]
}
]
}
}
{- "enrichment": {
- "incomeStreams": [
- {
- "name": "Yapily Ltd",
- "transactions": [
- {
- "transactionId": "abcdef01",
- "transactionInformation": "Yapily Ltd",
- "amount": 2300,
- "bookingDateTime": "2020-03-27",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef02",
- "transactionInformation": "Yapily Ltd",
- "amount": 2300,
- "bookingDateTime": "2020-04-28",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef03",
- "transactionInformation": "Yapily Ltd",
- "amount": 2500,
- "bookingDateTime": "2020-05-27",
- "institution": "hsbc_uk"
}, - {
- "transactionId": "abcdef04",
- "transactionInformation": "Yapily Ltd",
- "amount": 2500,
- "bookingDateTime": "2020-06-26",
- "institution": "hsbc_uk"
}
], - "transactionSchedule": {
- "frequency": "Monthly",
- "detailedFrequency": "Monthly on working day before day n of month",
- "detailedFrequencyParameter": 28
}, - "scheduleConsistencyScore": 0.96,
- "nextExpectedTransactionDate": "2020-07-28",
- "earliestTransactionDate": "2020-03-27",
- "mostRecentTransactionDate": "2020-06-26",
- "amountConsistencyScore": 0.98,
- "averageAmount": 2400
}
], - "RecentlyTerminatedIncomeStreams": [
- {
- "name": "Previous Job",
- "transactions": [
- {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-03-28"
}, - {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-04-28"
}, - {
- "transactionId": "cedfgh01",
- "transactionInformation": "Previous Job",
- "amount": 1900,
- "bookingDateTime": "2020-05-28"
}
], - "transactionSchedule": {
- "frequency": "Monthly",
- "detailedFrequency": "Monthly on working day before day n of month",
- "detailedFrequencyParameter": 28
}, - "scheduleConsistencyScore": 1,
- "nextExpectedTransactionDate": "2020-06-28",
- "earliestTransactionDate": "2020-03-28",
- "mostRecentTransactionDate": "2020-05-28",
- "amountConsistencyScore": 1,
- "averageAmount": 1900,
- "missedTransactions": 1
}
]
}
}
The Balance Prediction Engine predicts a user's finances over the next 30 days. It consumes raw transactions: as many as possible ideally, but if necessary it can function with only two months' data.
For each day, it outputs the median predicted balance - the prediction itself - and the 10% and 90% confidence bounds to give a sense of how accurate the prediction is expected to be. For convenience it also outputs the historic balances over the last 60 days as well.
Returns balance predictions for an array of accounts
required | Array of objects (Entire balance prediction user) |
{- "accounts": [
- {
- "accountId": "abc123",
- "balance": 999.99,
- "institutionId": "lloyds",
- "transactions": [
- {
- "transactionId": "83-2910",
- "bookingDateTime": "2021-03-01",
- "amount": 20,
- "description": "test string"
}, - {
- "transactionId": "213-32849",
- "bookingDateTime": "2021-03-02",
- "amount": 40,
- "description": "test string"
}, - {
- "transactionId": "213-XXXX",
- "bookingDateTime": "2021-03-05",
- "amount": 40,
- "description": "test string"
}
]
}, - {
- "accountId": "def456",
- "balance": 999.99,
- "institutionId": "monzo_ob",
- "transactions": [
- {
- "transactionId": "83-2910",
- "bookingDateTime": "2021-03-01",
- "amount": 20,
- "description": "test string"
}, - {
- "transactionId": "213-32849",
- "bookingDateTime": "2021-03-02",
- "amount": 40,
- "description": "test string"
}, - {
- "transactionId": "213-XXXX",
- "bookingDateTime": "2021-03-05",
- "amount": 40,
- "description": "test string"
}
]
}
]
}
{- "enrichedAccounts": [
- {
- "accountId": [
- "abc123",
- "def456"
], - "institution": [
- "lloyds",
- "monzo_ob"
], - "historic": [
- {
- "historicDate": "2021-03-01",
- "historicBalance": 20
}, - {
- "historicDate": "2021-03-02",
- "historicBalance": 60
}, - {
- "historicDate": "2021-03-03",
- "historicBalance": 0
}, - {
- "historicDate": "2021-03-04",
- "historicBalance": 0
}, - {
- "historicDate": "2021-03-05",
- "historicBalance": 100
}
], - "predicted": [
- {
- "predictedDate": "2021-03-24",
- "predictedMedianBalance": 28.48,
- "predicted90PercentileBalance": 49.26,
- "predicted10PercentileBalance": 5.96
}, - {
- "predictedDate": "2021-03-25",
- "predictedMedianBalance": 28.88,
- "predicted90PercentileBalance": 46.38,
- "predicted10PercentileBalance": -2.39
}, - {
- "predictedDate": "2021-03-26",
- "predictedMedianBalance": 22.07,
- "predicted90PercentileBalance": 41.48,
- "predicted10PercentileBalance": 0.82
}, - {
- "predictedDate": "2021-03-27",
- "predictedMedianBalance": 20.91,
- "predicted90PercentileBalance": 38.25,
- "predicted10PercentileBalance": -1.24
}, - {
- "predictedDate": "2021-03-28",
- "predictedMedianBalance": 16.29,
- "predicted90PercentileBalance": 41.28,
- "predicted10PercentileBalance": -0.58
}, - {
- "predictedDate": "2021-03-29",
- "predictedMedianBalance": 14.99,
- "predicted90PercentileBalance": 35.98,
- "predicted10PercentileBalance": -14.64
}
]
}
]
}
category_2 required | string (Category 2) Enum: "BILLS" "CHARITY & GIFTS" "EATING OUT" "ENTERTAINMENT" "INVESTMENT & SAVINGS" "GENERAL" "GROCERIES" "PERSONAL CARE" "HOME" "INSURANCE" "OTHER" "SHOPPING" "TRANSPORT" "TRAVEL & HOLIDAY" "FEES & CHARGES" The category of the transaction - called category 2 here for historical reasons |
category_3 | string (Category 3) The subcategory of the transaction - called category_3 here for historical reasons |
source | string (Category Source) Enum: "MODEL" "MERCHANT" "CODE" "KEYWORD" The source of the categorisation for the transaction. |
{- "categories": {
- "category_2": "TRANSPORT",
- "category_3": "PETROL/FUEL"
}
}
hash required | string (Transaction hash) |
reference | string (Transaction reference) |
description required | string (Transaction Description) |
institution required | string (Institution) |
bookingDateTime required | string (Booking date time) |
amount | number (Transaction amount) |
proprietaryBankTransactionCode | string (Proprietary bank transaction code) |
isoBankFamilyCode | string (Iso bank family code) |
isoBankSubFamilyCode | string (Iso bank subfamily code) |
{- "hash": "f409f4c937d84cf0311561404f026d54",
- "description": "TESCO PFS BASINGSTOKE 2020/07/30 3803",
- "reference": "TESCO PFS",
- "institution": "lloyds",
- "bookingDateTime": "2020-08-01 00:00:00",
- "amount": 20.1,
- "proprietaryBankTransactionCode": "DEB",
- "isoBankFamilyCode": "CCRD",
- "isoBankSubFamilyCode": "POSD"
}
merchantName required | string (Merchant name) Name of the merchant |
required | object (categories) |
parentGroup | string (Parent group) Wider group of merchants to which the merchant belongs. Could be a brand such as Virgin, or a single company that spans multiple categories such as Tesco (Tesco Petrol, Tesco Bank etc.) |
object (Thumbnail Urls) |
{- "merchantName": "TESCO PETROL",
- "parentGroup": "TESCO",
- "categories": {
- "category_2": "TRANSPORT",
- "category_3": "PETROL/FUEL"
}
}
hash required | string (Transaction Hash) |
object (Merchant) | |
location | string (Location) If we're able to extract a location from the transaction information, it goes here |
paymentProcessor | string (Payment processor) If we're able to extract a payment processor (such as paypal, square) from the transaction information, it goes here |
correctedDate | string (Corrected date) Where the transaction information contains a date, it goes here. This date is generally pre-clearing and so is likely to be more accurate than bookingDateTime as to when the transaction actually occurred |
object (categories) |
{- "hash": "f409f4c937d84cf0311561404f026d54",
- "merchant": {
- "merchantName": "TESCO PETROL",
- "parentGroup": "TESCO",
- "categories": {
- "category_2": "TRANSPORT",
- "category_3": "PETROL/FUEL"
}
}, - "location": "Basingstoke",
- "correctedDate": "2020-07-30"
}