---
updatedAt: 2026-06-03T11:10:39.000Z
agentTools:
  projectIndex: https://docs-us.thisisbud.com/llms.txt
---

# Retrieve Income Transactions V2

Provides a list of a customer's income based transactions found within their connected accounts, and predicts whether each income transaction is related to a customer's `salary_or_wages`. Any income which is not salary or wages is given the type `other_incoming`, which can include other income sources such as investments or pension income.

When `X-From` is omitted from the request, a default value of 9 months from before today's date will be used.
When `X-To` is omitted from the request, a default value of today's date will be used.

**Notes:**
- Transactions with multiple currencies are supported, but the statistics are currently only calculated for one currency. The endpoint takes the currency of the first transaction and ignores non-matching currencies in its calculations.
- In contrast to the V1 endpoint, Income Finder V2 no longer filters income transactions to only return the latest per reference.


# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Smart Finders API",
    "version": "1.0.0",
    "contact": {
      "name": "API Support",
      "url": "https://www.thisisbud.com/en-us/",
      "email": "contact@thisisbud.com"
    },
    "x-logo": {
      "url": "https://res.cloudinary.com/postman/image/upload/w_152,h_56,c_fit,f_auto,t_team_logo/v1/team/2baee78029d6ee9e2917981a7a70c621ab65d9cf13d44d3dbd042d3d2f0c9881"
    },
    "description": "Get insights about spending, identify key transactions and create your own custom transaction labels to dig deeper into the data and build new services for customers.\n"
  },
  "tags": [
    {
      "name": "Income Finder",
      "x-displayName": "Income Finder",
      "description": "Find information regarding your customer's income.\n"
    },
    {
      "name": "Loan Finder",
      "x-displayName": "Loan Finder",
      "description": "Find information regarding your customer's loans.\n"
    },
    {
      "name": "Debt Collection Finder",
      "x-displayName": "Debt Collection Finder",
      "description": "Find information regarding your customer's debts.\n"
    },
    {
      "name": "Product Finder",
      "x-displayName": "Product Finder",
      "description": "Find information regarding your customer's financial products.\n"
    },
    {
      "name": "Subscription Finder",
      "x-displayName": "Subscription Finder",
      "description": "Find information regarding your customer's subscriptions.\n"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "servers": [
    {
      "url": "https://api-sandbox.thisisbud.com",
      "description": "Bud US"
    }
  ],
  "paths": {
    "/v2/income": {
      "get": {
        "tags": [
          "Income Finder"
        ],
        "summary": "Retrieve Income Transactions V2",
        "description": "Provides a list of a customer's income based transactions found within their connected accounts, and predicts whether each income transaction is related to a customer's `salary_or_wages`. Any income which is not salary or wages is given the type `other_incoming`, which can include other income sources such as investments or pension income.\n\nWhen `X-From` is omitted from the request, a default value of 9 months from before today's date will be used.\nWhen `X-To` is omitted from the request, a default value of today's date will be used.\n\n**Notes:**\n- Transactions with multiple currencies are supported, but the statistics are currently only calculated for one currency. The endpoint takes the currency of the first transaction and ignores non-matching currencies in its calculations.\n- In contrast to the V1 endpoint, Income Finder V2 no longer filters income transactions to only return the latest per reference.\n",
        "operationId": "v2_income_get",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/3"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/4"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Income Finder Response V2",
                  "required": [
                    "operation_id",
                    "data",
                    "metadata"
                  ],
                  "properties": {
                    "operation_id": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/operation_id"
                    },
                    "data": {
                      "type": "object",
                      "title": "Income_Finder_Response_Data",
                      "required": [
                        "transactions",
                        "statistics"
                      ],
                      "properties": {
                        "transactions": {
                          "type": "array",
                          "title": "Income Transactions",
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/paths/~1v1~1subscriptions/get/responses/200/content/application~1json/schema/properties/data/items/properties/transactions/items"
                              },
                              {
                                "title": "Income Transaction",
                                "required": [
                                  "enrichment"
                                ],
                                "properties": {
                                  "enrichment": {
                                    "type": "object",
                                    "title": "Income Transaction Enrichments",
                                    "description": "Results from required enrichment services for successful marking of income transactions",
                                    "properties": {
                                      "categories": {
                                        "type": "object",
                                        "nullable": true,
                                        "title": "Categoriser_Enrichment",
                                        "description": "Results from Bud's Categorisation Service",
                                        "required": [
                                          "l1",
                                          "l2",
                                          "l3"
                                        ],
                                        "properties": {
                                          "l1": {
                                            "type": "array",
                                            "description": "Details on the Level One category associated with the transaction",
                                            "items": {
                                              "title": "Categoriser Category",
                                              "type": "object",
                                              "description": "The details in relation to a specific category level, as taken from the output of Bud's categorsiation service.",
                                              "required": [
                                                "name",
                                                "confidence",
                                                "label"
                                              ],
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "description": "Internal name (identifier) of the category"
                                                },
                                                "confidence": {
                                                  "type": "string",
                                                  "description": "The level of certainty that the model has predicted the category"
                                                },
                                                "label": {
                                                  "type": "string",
                                                  "description": "Humanised category name"
                                                }
                                              }
                                            }
                                          },
                                          "l2": {
                                            "type": "array",
                                            "description": "Details on the Level Two category associated with the transaction",
                                            "items": {
                                              "$ref": "#/paths/~1v2~1income/get/responses/200/content/application~1json/schema/properties/data/properties/transactions/items/allOf/1/properties/enrichment/properties/categories/properties/l1/items"
                                            }
                                          },
                                          "l3": {
                                            "type": "array",
                                            "description": "Details on the Level Three category associated with the transaction",
                                            "items": {
                                              "$ref": "#/paths/~1v2~1income/get/responses/200/content/application~1json/schema/properties/data/properties/transactions/items/allOf/1/properties/enrichment/properties/categories/properties/l1/items"
                                            }
                                          }
                                        }
                                      },
                                      "merchant": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "nullable": true
                                          },
                                          {
                                            "$ref": "#/paths/~1v1~1debt-collection/get/responses/200/content/application~1json/schema/properties/data/properties/transactions/items/allOf/1/properties/merchant"
                                          }
                                        ]
                                      },
                                      "processor": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "nullable": true
                                          },
                                          {
                                            "title": "Processor ID Object",
                                            "type": "object",
                                            "description": "Details surrounding the identified processor of the transaction",
                                            "required": [
                                              "id",
                                              "name",
                                              "logo",
                                              "confidence"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "string",
                                                "description": "A unique ID for the identified processor"
                                              },
                                              "name": {
                                                "type": "string",
                                                "description": "The clean name of the identified processor"
                                              },
                                              "logo": {
                                                "type": "string",
                                                "description": "The processor's logo image URL location"
                                              },
                                              "confidence": {
                                                "type": "string",
                                                "description": "The level of certainty that the model has predicted the processor"
                                              }
                                            }
                                          }
                                        ]
                                      },
                                      "income": {
                                        "allOf": [
                                          {
                                            "type": "object",
                                            "nullable": true
                                          },
                                          {
                                            "title": "Income Enrichment",
                                            "type": "object",
                                            "description": "Results from Bud's Income Finder Service",
                                            "required": [
                                              "type",
                                              "confidence"
                                            ],
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "description": "The type of identified income type, either `salary_or_wages` or `other_incoming`"
                                              },
                                              "confidence": {
                                                "type": "string",
                                                "description": "The level of certainty that the model has predicted an income related transaction."
                                              }
                                            }
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "statistics": {
                          "type": "object",
                          "title": "Income statistics",
                          "required": [
                            "average"
                          ],
                          "properties": {
                            "average": {
                              "title": "Average income statistics",
                              "type": "object",
                              "description": "Averages of income amounts. These averages are calculated using the filters supplied in the `X-From` & `X-To` headers.\nFor instance, with 6 months of £1000/month and a date range of 6 months, the monthly average will be £1000.\nHowever, if the supplied date range is 12 months and there is no data for more than those 6 months, the average will be £500/month.\n\nNote that the number of months are calculated inclusively e.g. `months(2022-01-01, 2022-02-28) = 2` and `months(2022-01-01, 2022-03-01) = 3`.",
                              "required": [
                                "monthly"
                              ],
                              "properties": {
                                "monthly": {
                                  "allOf": [
                                    {
                                      "description": "average income per month"
                                    },
                                    {
                                      "title": "Average income statistics over time period",
                                      "type": "object",
                                      "required": [
                                        "income",
                                        "regular_income"
                                      ],
                                      "properties": {
                                        "income": {
                                          "allOf": [
                                            {
                                              "description": "average of all income transactions"
                                            },
                                            {
                                              "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                            }
                                          ]
                                        },
                                        "regular_income": {
                                          "allOf": [
                                            {
                                              "description": "average income transactions that we have also detected as regular"
                                            },
                                            {
                                              "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/metadata"
                    }
                  }
                },
                "example": {
                  "operation_id": "v2_income_get",
                  "data": {
                    "transactions": [
                      {
                        "transaction_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "account_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "transaction_description": "PayPal* Bud",
                        "provider": "Chase",
                        "date": "2021-01-11T01:00:00+0100",
                        "amount": {
                          "value": "1234.56",
                          "currency": "USD"
                        },
                        "credit_debit_indicator": "Credit",
                        "enrichment": {
                          "categories": {
                            "l1": [
                              {
                                "name": "income",
                                "confidence": "0.8057",
                                "label": "Income"
                              }
                            ],
                            "l2": [
                              {
                                "name": "employment_income",
                                "confidence": "0.7811",
                                "label": "Employment income"
                              }
                            ],
                            "l3": [
                              {
                                "name": "salary_and_wages",
                                "confidence": "0.6805",
                                "label": "Salary and wages"
                              }
                            ]
                          },
                          "merchant": {
                            "id": "bud",
                            "name": "Bud",
                            "logo": "https://thisisbud.com/merchants/bud.png",
                            "confidence": "0.9501"
                          },
                          "processor": {
                            "id": "paypal",
                            "name": "PayPal",
                            "logo": "https://thisisbud.com/processors/paypal.png",
                            "confidence": "0.9702"
                          },
                          "income": {
                            "type": "salary_and_wages",
                            "confidence": "0.9408"
                          }
                        }
                      }
                    ],
                    "statistics": {
                      "average": {
                        "monthly": {
                          "income": {
                            "value": "1234.56",
                            "currency": "USD"
                          },
                          "regular_income": {
                            "value": "1234.56",
                            "currency": "USD"
                          }
                        }
                      }
                    }
                  },
                  "metadata": {
                    "from": "2021-01-01",
                    "to": "2021-01-31",
                    "results": 1
                  }
                }
              }
            }
          },
          "204": {
            "description": "No transactions"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorised request"
          },
          "404": {
            "description": "No transactions found"
          },
          "405": {
            "description": "An unexpected HTTP method was used"
          },
          "5XX": {
            "description": "An unexpected error occurred on the server side"
          }
        }
      }
    },
    "/v1/loans": {
      "get": {
        "tags": [
          "Loan Finder"
        ],
        "summary": "Retrieve Loan Transactions",
        "description": "Provides a list of a customers' outgoing loan transactions found within their connected accounts.\n\nWhen `X-From` is omitted from the request, a default value of 30 days from before today's date will be used.\nWhen `X-To` is omitted from the request, a default value of today's date will be used.\n\n**Notes:**\n- Transactions with multiple currencies are supported, but the statistics are currently only calculated for one currency. The endpoint takes the currency of the first transaction and ignores non-matching currencies in its calculations.\n",
        "operationId": "v1_loans_get",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "X-Client-Id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The API Client Identifier (Service Application Identifier).",
            "example": "8711bbef-b357-4c2d-97ca-0d9df4206e9a"
          },
          {
            "in": "header",
            "name": "X-Customer-Id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "A unique identifier for a Customer, as registered on Bud's platform.",
            "example": "c3339af9-2426-44d4-9c4d-ddb8fd281e23"
          },
          {
            "in": "header",
            "name": "X-Customer-Idempotent-Identifier",
            "schema": {
              "type": "string"
            },
            "description": "Use the internal client identifier, provided in the `client_metadata` object when creating the customer in __Create Customer V3__, in place of an `X-Customer-Id` header.\n"
          },
          {
            "in": "header",
            "name": "X-From",
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "date_only": {
                "value": "2022-02-28"
              },
              "RFC3339": {
                "value": "2019-02-28T07:20:50.52Z"
              }
            },
            "description": "Transaction from date, this works in pair with the 'X-To' parameter"
          },
          {
            "in": "header",
            "name": "X-To",
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "date_only": {
                "value": "2022-03-30"
              },
              "RFC3339": {
                "value": "2019-03-30T07:20:50.52Z"
              }
            },
            "description": "Transaction to date, this works in pair with the 'X-From' parameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Loans Finder Response",
                  "type": "object",
                  "required": [
                    "operation_id",
                    "data",
                    "metadata"
                  ],
                  "properties": {
                    "operation_id": {
                      "title": "Operation Id Field",
                      "type": "string",
                      "description": "A unique identifier/reference associated with a given endpoint/operation"
                    },
                    "data": {
                      "type": "object",
                      "title": "Loan_Finder_Response_Data",
                      "required": [
                        "transactions",
                        "statistics"
                      ],
                      "properties": {
                        "transactions": {
                          "type": "array",
                          "title": "Loan Transactions",
                          "items": {
                            "title": "Loan Transaction",
                            "allOf": [
                              {
                                "$ref": "#/paths/~1v1~1subscriptions/get/responses/200/content/application~1json/schema/properties/data/items/properties/transactions/items"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "merchant": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "nullable": true
                                      },
                                      {
                                        "$ref": "#/paths/~1v1~1debt-collection/get/responses/200/content/application~1json/schema/properties/data/properties/transactions/items/allOf/1/properties/merchant"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "statistics": {
                          "type": "object",
                          "title": "Loan Statistics",
                          "required": [
                            "total_debit"
                          ],
                          "properties": {
                            "total_debit": {
                              "allOf": [
                                {
                                  "description": "Total debit amount of all loan transactions"
                                },
                                {
                                  "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                }
                              ]
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "title": "Metadata",
                      "description": "Metadata associated with the response schema",
                      "allOf": [
                        {
                          "title": "Metadata",
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "description": "The date from when results were retrieved in the format [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html).\nThis is either populated with the default value used when retrieving the results, or the user specified parameter.\n\nExample: `2023-01-17`\n"
                            },
                            "to": {
                              "type": "string",
                              "description": "The date up to when results were retrieved in the format [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html).\nThis is either populated with the default value used when retrieving the results, or the user specified parameter.\n\nExample: `2023-03-17`\n"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "results"
                          ],
                          "properties": {
                            "results": {
                              "type": "number",
                              "description": "Number of results returned"
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "operation_id": "v1_loans_get",
                  "data": {
                    "transactions": [
                      {
                        "transaction_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "account_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "transaction_description": "Bud Loan Repayment",
                        "provider": "Chase",
                        "date": "2022-03-21T01:00:00+0100",
                        "amount": {
                          "value": "133.28",
                          "currency": "USD"
                        },
                        "credit_debit_indicator": "Debit",
                        "merchant": {
                          "id": "bud",
                          "name": "Bud",
                          "logo": "https://thisisbud.com/merchants/bud.png",
                          "confidence": "0.875"
                        }
                      }
                    ],
                    "statistics": {
                      "total_debit": {
                        "value": "133.28",
                        "currency": "USD"
                      }
                    }
                  },
                  "metadata": {
                    "results": 1,
                    "from": "2022-03-19",
                    "to": "2022-04-19"
                  }
                }
              }
            }
          },
          "204": {
            "description": "No transactions"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorised request"
          },
          "405": {
            "description": "An unexpected HTTP method was used"
          },
          "5XX": {
            "description": "An unexpected error occurred on the server side"
          }
        }
      }
    },
    "/v1/debt-collection": {
      "get": {
        "tags": [
          "Debt Collection Finder"
        ],
        "summary": "Retrieve Debt Collection Transactions",
        "description": "Provides a list of a customers' outgoing debt collection transactions found within their connected accounts.\n\nWhen `X-From` is omitted from the request, a default value of 30 days from before today's date will be used.\nWhen `X-To` is omitted from the request, a default value of today's date will be used.\n\n**Notes:**\n- Transactions with multiple currencies are supported, but the statistics are currently only calculated for one currency. \n  The endpoint takes the currency of the first transaction and ignores non-matching currencies in its calculations.\n",
        "operationId": "v1_debt_collection_get",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/2"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/3"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/4"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Debt Collection Finder Response",
                  "required": [
                    "operation_id",
                    "data",
                    "metadata"
                  ],
                  "properties": {
                    "operation_id": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/operation_id"
                    },
                    "data": {
                      "type": "object",
                      "title": "Debt_Collection_Finder_Response_Data",
                      "required": [
                        "transactions",
                        "statistics"
                      ],
                      "properties": {
                        "transactions": {
                          "type": "array",
                          "title": "Debt Collection Transactions",
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/paths/~1v1~1subscriptions/get/responses/200/content/application~1json/schema/properties/data/items/properties/transactions/items"
                              },
                              {
                                "type": "object",
                                "title": "Debt Collection Transaction",
                                "required": [
                                  "merchant"
                                ],
                                "properties": {
                                  "merchant": {
                                    "title": "Merchant ID Object",
                                    "type": "object",
                                    "description": "Details surrounding the identified merchant of the transaction",
                                    "required": [
                                      "id",
                                      "name",
                                      "logo",
                                      "confidence"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "A unique ID for the identified merchant"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "The clean name of the identified merchant"
                                      },
                                      "logo": {
                                        "type": "string",
                                        "description": "The merchant's logo image URL location"
                                      },
                                      "confidence": {
                                        "type": "string",
                                        "description": "The level of certainty that the model has predicted the merchant"
                                      }
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "statistics": {
                          "type": "object",
                          "title": "Debt Collection Statistics",
                          "required": [
                            "total_debit",
                            "income_relations"
                          ],
                          "properties": {
                            "total_debit": {
                              "allOf": [
                                {
                                  "description": "Total debit amount of all debt collection transactions"
                                },
                                {
                                  "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                }
                              ]
                            },
                            "income_relations": {
                              "type": "object",
                              "title": "Income Relations",
                              "description": "Comparisons of the returned transactions to the income found over the same period",
                              "required": [
                                "expense_to_income_ratio",
                                "total_income"
                              ],
                              "properties": {
                                "expense_to_income_ratio": {
                                  "description": "The ratio of total debit amounts of the returned transactions to the total income over the same period, to 3 decimal places.",
                                  "type": "string"
                                },
                                "total_income": {
                                  "allOf": [
                                    {
                                      "description": "Total income over the provided period"
                                    },
                                    {
                                      "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/metadata"
                    }
                  }
                },
                "example": {
                  "operation_id": "v1_debt_collection_get",
                  "data": {
                    "transactions": [
                      {
                        "transaction_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "account_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                        "transaction_description": "Bud Debt Collection Payment",
                        "provider": "Chase",
                        "date": "2021-04-11T01:00:00+0100",
                        "amount": {
                          "value": "100.00",
                          "currency": "USD"
                        },
                        "credit_debit_indicator": "Debit",
                        "merchant": {
                          "id": "debtcollector",
                          "name": "Debt Collector",
                          "logo": "https://thisisbud.com/merchants/debtcollector.png",
                          "confidence": "0.12345"
                        }
                      }
                    ],
                    "statistics": {
                      "total_debit": {
                        "value": "100.00",
                        "currency": "USD"
                      },
                      "income_relations": {
                        "expense_to_income_ratio": "0.100",
                        "total_income": {
                          "value": "1000.00",
                          "currency": "USD"
                        }
                      }
                    }
                  },
                  "metadata": {
                    "results": 1,
                    "from": "2022-03-19",
                    "to": "2022-04-19"
                  }
                }
              }
            }
          },
          "204": {
            "description": "No transactions"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorised request"
          },
          "405": {
            "description": "An unexpected HTTP method was used"
          },
          "5XX": {
            "description": "An unexpected error occurred on the server side"
          }
        }
      }
    },
    "/insights/v2/products": {
      "get": {
        "tags": [
          "Product Finder"
        ],
        "summary": "Retrieve Financial Products V2",
        "description": "Financial Products returns the finance oriented products and services that a customer uses. \nThis endpoint generates data using a customer's transaction history.\n\nFinancial Products detects the following types of products and services: \n- Loans\n- Buy Now, Pay Later (BNPL)\n- Mortgages\n- Insurance products\n- Credit Cards\n- Private Pensions\n- Savings and Investments\n\n> 🚧 Limitations\n> \n> Financial Products are only identified from debit transactions.\n",
        "operationId": "insights_v2_products",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/2"
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            },
            "example": "2019-02-29",
            "description": "Filter from this date (format: `YYYY-MM-DD`)."
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            },
            "example": "2019-02-29",
            "description": "Filter to this date (format: `YYYY-MM-DD`)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK - everything worked as expected",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Retrieve Financial Products V2 Response Structure",
                  "type": "object",
                  "required": [
                    "operation_id",
                    "metadata"
                  ],
                  "properties": {
                    "operation_id": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/operation_id"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "title": "Financial_Product",
                        "description": "A Financial Product that a customer uses.",
                        "type": "object",
                        "required": [
                          "type",
                          "merchant",
                          "amount",
                          "period"
                        ],
                        "properties": {
                          "type": {
                            "title": "Financial_Product_Type",
                            "description": "A list of the types products and services identified for the given Financial Product. Potential values could be (but not limited to):\n  - `loan`\n  - `bnpl`\n  - `mortgage`\n  - `insurance`\n  - `credit_card`\n  - `private_pension`\n  - `savings_and_investment`\n",
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "merchant": {
                            "title": "Financial_Product_Merchant",
                            "description": "Details of the merchant providing the Financial Product.",
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "logo"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "A unique ID for the merchant."
                              },
                              "name": {
                                "type": "string",
                                "description": "The merchant's name in a displayable format."
                              },
                              "logo": {
                                "type": "string",
                                "description": "The merchant's logo image URL location."
                              }
                            }
                          },
                          "amount": {
                            "title": "Standard Bud Amount",
                            "type": "object",
                            "description": "The monetary amount.",
                            "required": [
                              "value",
                              "currency"
                            ],
                            "properties": {
                              "value": {
                                "title": "Monetary Value",
                                "description": "The value of the monetary amount. The value is formatted with the number of decimal places for the respective currency. \n\nExample: `10.98`\n",
                                "type": "string"
                              },
                              "currency": {
                                "title": "Currency",
                                "description": "The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) of the monetary amount.\n\nExample: `GBP`\n",
                                "type": "string"
                              }
                            }
                          },
                          "period": {
                            "title": "Transaction Period",
                            "description": "The period between each transaction for the given product. Possible values are:\n- `daily` -  This product is charged once a day.\n- `weekly` - This product is charged once a week.\n- `biweekly` - This product is charged once every two weeks.\n- `monthly` - This product is charged once a monthy.\n- `quarterly` - This product is charged once a quater (every 3 months).\n- `six_monthly` - product is charged every six months.\n- `annually` - This product is charged once a year.\n- `unknown` - It is unknown how frequently this product is charged.\n",
                            "type": "string",
                            "enum": [
                              "daily",
                              "weekly",
                              "biweekly",
                              "monthly",
                              "quarterly",
                              "six_monthly",
                              "annually",
                              "unknown"
                            ]
                          }
                        }
                      }
                    },
                    "metadata": {
                      "title": "Metadata",
                      "allOf": [
                        {
                          "title": "Metadata",
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "description": "The date from when results were retrieved in the format [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).\nThis is either populated with the default value used when retrieving the results, or the user specified parameter.\n\nExamples:\n  - `2023-01-17T17:29:51Z`\n  - `2023-01-17T17:29:51-08:00`\n"
                            },
                            "to": {
                              "type": "string",
                              "description": "The date up to when results were retrieved in the format [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).\nThis is either populated with the default value used when retrieving the results, or the user specified parameter.\n\nExamples:\n  - `2023-03-17T17:29:51Z`\n  - `2023-03-17T17:29:51-08:00`\n"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "results"
                          ],
                          "properties": {
                            "results": {
                              "type": "number",
                              "title": "Results count",
                              "description": "Number of products returned."
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "operation_id": "insights_v2_products",
                  "data": [
                    {
                      "type": [
                        "credit_card"
                      ],
                      "merchant": {
                        "id": "americanexpress",
                        "logo": "https://assets.thisisbud.com/bud-datasci-images/merchant_logos/5e190e47-3ed5-4549-a29a-7f832862fd3a/v1/americanexpress.jpeg",
                        "name": "American Express"
                      },
                      "amount": {
                        "value": "300.00",
                        "currency": "USD"
                      },
                      "period": "unknown"
                    },
                    {
                      "type": [
                        "insurance"
                      ],
                      "merchant": {
                        "id": "unitedhealthgroup",
                        "logo": "https://assets.thisisbud.com/bud-datasci-images/merchant_logos/3d46d358-6600-4eb8-a23e-2c548ffa2de0/v1/unitedhealthgroup.jpeg",
                        "name": "UnitedHealth Group"
                      },
                      "amount": {
                        "value": "59.99",
                        "currency": "USD"
                      },
                      "period": "monthly"
                    }
                  ],
                  "metadata": {
                    "from": "2022-09-03T11:28:22.00Z",
                    "to": "2023-03-03T11:28:22.00Z",
                    "results": 2
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request contains an invalid payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1benefits~1totals/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "operation_id": "insights_v2_products",
                  "code_id": "failed_validation",
                  "message": "Invalid request payload.",
                  "errors": {
                    "from": "invalid 'from' date: '7th March 2023'"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorised Request - the request was not authenticated or authorised",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1benefits~1totals/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "operation_id": "unknown",
                  "code_id": "unknown",
                  "message": "Unauthorised request",
                  "errors": {}
                }
              }
            }
          },
          "500": {
            "description": "Server Error - an unexpected error occurred on the server side",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Server Error Response",
                  "type": "object",
                  "required": [
                    "operation_id",
                    "code_id",
                    "message"
                  ],
                  "properties": {
                    "operation_id": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/operation_id"
                    },
                    "code_id": {
                      "type": "string",
                      "description": "A descriptive enough string that is linked to the reason for the error."
                    },
                    "message": {
                      "type": "string",
                      "description": "An actual user friendly error message."
                    },
                    "errors": {
                      "anyOf": [
                        {
                          "$ref": "#/paths/~1v1~1benefits~1totals/get/responses/400/content/application~1json/schema/properties/errors/anyOf/0"
                        },
                        {
                          "$ref": "#/paths/~1v1~1benefits~1totals/get/responses/400/content/application~1json/schema/properties/errors/anyOf/1"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "operation_id": "unknown",
                  "code_id": "unknown",
                  "message": "An error occurred while processing your request. Get in touch with us and provide us your request id: 7ef63242-ba6d-4661-8014-f9eaa9cb2ad8"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subscriptions": {
      "get": {
        "tags": [
          "Subscription Finder"
        ],
        "summary": "Retrieve Subscriptions",
        "description": "This endpoint is used to retrieve information about a user's subscriptions",
        "operationId": "v1_subscriptions_get",
        "security": [
          {
            "OAuth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/1"
          },
          {
            "$ref": "#/paths/~1v1~1loans/get/parameters/2"
          },
          {
            "in": "header",
            "name": "X-From",
            "schema": {
              "type": "string"
            },
            "example": "2022-01-29",
            "description": "Transaction from date"
          },
          {
            "in": "header",
            "name": "X-To",
            "schema": {
              "type": "string"
            },
            "example": "2022-03-29",
            "description": "Transaction to date"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Subscription Products Response",
                  "description": "Subscription products and associated transactions for a customer",
                  "type": "object",
                  "required": [
                    "operation_id",
                    "data",
                    "metadata"
                  ],
                  "properties": {
                    "operation_id": {
                      "type": "string",
                      "enum": [
                        "v1_subscriptions_get"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "title": "Subscriptions Finder Response Data",
                      "items": {
                        "type": "object",
                        "required": [
                          "subscription_type",
                          "transactions",
                          "categories",
                          "period"
                        ],
                        "properties": {
                          "subscription_type": {
                            "type": "string",
                            "description": "Type of subscription identified. Potential values are subject to change and may be converted to enums at a future unspecified date.\n\n| Subscription type           | Description |\n| --------------------------- | ----------- |\n| `unknown`                   | Unknown subscription type |\n| `media_streaming`           | Digital media streaming subscriptions |\n| `newspapers_and_magazines`  | Print media subscriptions |\n| `food_and_drink`            | Grocery and specialty food/drink subscriptions |\n| `technology`                | Technology subscriptions, including software and hardware |\n| `fitness_and_gym`           | Health and fitness subscriptions |\n| `charitable_donations`      | Recurring donations to charity |\n"
                          },
                          "period": {
                            "type": "string",
                            "description": "To describe the period between each transaction within a subscription. Potential values could be (but are not limited to) `monthly`, `quarterly` and `unknown`, and may be converted to enums at a future unspecified date."
                          },
                          "categories": {
                            "type": "object",
                            "description": "Categories of the subscription",
                            "required": [
                              "l1",
                              "l2"
                            ],
                            "properties": {
                              "l1": {
                                "type": "string",
                                "description": "Details on the Level One category associated with the subscription"
                              },
                              "l2": {
                                "type": "string",
                                "description": "Details on the Level Two category associated with the subscription"
                              }
                            }
                          },
                          "merchant": {
                            "type": "object",
                            "description": "Details surrounding the identified merchant of the transaction (this field will be omitted if a merchant is not detected)",
                            "required": [
                              "id",
                              "name",
                              "logo"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "A unique ID for the identified merchant."
                              },
                              "name": {
                                "type": "string",
                                "description": "The clean name of the identified merchant."
                              },
                              "logo": {
                                "type": "string",
                                "description": "The merchant's logo image URL location."
                              }
                            }
                          },
                          "transactions": {
                            "type": "array",
                            "items": {
                              "title": "Basic Transaction Schema",
                              "type": "object",
                              "description": "Basic transaction schema",
                              "required": [
                                "transaction_id",
                                "account_id",
                                "transaction_description",
                                "provider",
                                "date",
                                "amount",
                                "credit_debit_indicator"
                              ],
                              "properties": {
                                "transaction_id": {
                                  "type": "string",
                                  "description": "A unique identifier for the transaction"
                                },
                                "account_id": {
                                  "type": "string",
                                  "description": "A unique identifier for the Customer bank account"
                                },
                                "transaction_description": {
                                  "type": "string",
                                  "description": "A description of the transaction, similar to the transaction information in Open Banking. e.g. a bank transfer reference\""
                                },
                                "provider": {
                                  "type": "string",
                                  "description": "The name of the relevant provider relevant to the source of the original transaction data"
                                },
                                "date": {
                                  "type": "string",
                                  "description": "The date of the transaction in the format [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).\n\nExamples:\n  - `2023-03-17T17:29:51Z`\n  - `2023-03-17T17:29:51-08:00`\n"
                                },
                                "amount": {
                                  "$ref": "#/paths/~1insights~1v2~1products/get/responses/200/content/application~1json/schema/properties/data/items/properties/amount"
                                },
                                "credit_debit_indicator": {
                                  "type": "string",
                                  "description": "Indication as to whether the transaction was a credit or debit",
                                  "enum": [
                                    "Credit",
                                    "Debit"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "$ref": "#/paths/~1v1~1loans/get/responses/200/content/application~1json/schema/properties/metadata"
                    }
                  }
                },
                "example": {
                  "operation_id": "v1_subscriptions_get",
                  "data": [
                    {
                      "subscription_type": "media_and_telecoms",
                      "period": "monthly",
                      "categories": {
                        "l1": "media_and_telecoms",
                        "l2": "digital_media_and_software"
                      },
                      "merchant": {
                        "id": "netflix",
                        "name": "Netflix",
                        "logo": "https://assets.thisisbud.com/netflix_logo_placeholder.jpeg"
                      },
                      "transactions": [
                        {
                          "transaction_id": "fdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                          "account_id": "an_account_id",
                          "transaction_description": "Netflix",
                          "provider": "Amex",
                          "date": "2022-03-21T01:00:00+0100",
                          "amount": {
                            "value": "9.99",
                            "currency": "USD"
                          },
                          "credit_debit_indicator": "Debit"
                        },
                        {
                          "transaction_id": "hdcc55c6-f347-4abc-8c66-61ff290d8bd4",
                          "account_id": "an_account_id",
                          "transaction_description": "Netflix",
                          "provider": "Amex",
                          "date": "2022-04-21T01:00:00+0100",
                          "amount": {
                            "value": "9.99",
                            "currency": "USD"
                          },
                          "credit_debit_indicator": "Debit"
                        }
                      ]
                    },
                    {
                      "subscription_type": "unknown",
                      "period": "unknown",
                      "categories": {
                        "l1": "general",
                        "l2": "other_general"
                      },
                      "transactions": [
                        {
                          "transaction_id": "idcc55c6-f347-4abc-8c66-61ff290d8bd4",
                          "account_id": "an_account_id",
                          "transaction_description": "A Random Subscription Payment",
                          "provider": "Amex",
                          "date": "2022-05-11T01:00:00+0100",
                          "amount": {
                            "value": "59.99",
                            "currency": "USD"
                          },
                          "credit_debit_indicator": "Debit"
                        }
                      ]
                    }
                  ],
                  "metadata": {
                    "results": 2,
                    "from": "2022-03-19",
                    "to": "2022-05-19"
                  }
                }
              }
            }
          },
          "204": {
            "description": "No subscriptions found"
          },
          "400": {
            "description": "The request contains an invalid payload."
          },
          "401": {
            "description": "Unauthorised request"
          },
          "405": {
            "description": "An unexpected HTTP method was used"
          },
          "5XX": {
            "description": "An unexpected error occurred on the server side"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/v1/oauth/token",
            "scopes": {}
          }
        },
        "description": "\nAuthentication flow:\n\n1. Perform OAuth2 Client Credentials authentication using API Credentials (`client_id`,`client_secret`) to obtain an `access_token` against `/v1/oauth/token` endpoint,\n2. Use `access_token` as Bearer Authorisation for every other API request,\n3. Include `X-Client-Id` (=client_id) within the header of every API request,\n4. Note that some of the requests may also require `X-Customer-Id` to be provided within the request header.\n\n### Examples\nObtain OAuth2 `access_token` and `refresh_token` using `grant_type=client_credentials` and HTTP Basic auth header\n\n```\ncurl --basic --user {{client_id}}:{{client_secret}} \\\n  -X POST https://api-sandbox.thisisbud.com/v1/oauth/token \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -d grant_type=client_credentials\n```\n\nSuccessful response:\n```\n{\n  \"operation_id\": \"oauth_token_post\",\n  \"data\": {\n    \"access_token\": \"dd0c17e3fd6d2ce94aa091257a3ea393b4f9b5cf3d3e998f07dc9826da86ff15\",\n    \"token_type\": \"bearer\",\n    \"expires_in\": 3600,\n    \"refresh_token\": \"fac32cca7559d9f6e8f1dfe9a99c71fa1dcfeb482bedf287d7934d2667ae54b3\"\n  }\n}\n```\n\nRefresh `access_token` token using `refresh_token` against `/v1/oauth/token` endpoint with `grant_type=refresh_token`\n\n```\ncurl -X POST \\\n  https://api-sandbox.thisisbud.com/v1/oauth/token \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'X-Client-Id: {{client_id}}' \\\n  -d 'grant_type=refresh_token&refresh_token={{refresh_token}}'\n```\n\nSuccessful response:\n```\n{\n    \"operation_id\": \"oauth_token_post\",\n    \"data\": {\n        \"access_token\": \"cc0c17e3fd6d2ce94aa091257a3ea393b4f9b5cf3d3e998f07dc9826da86ff94\",\n        \"token_type\": \"bearer\",\n        \"expires_in\": 3600,\n        \"refresh_token\": \"ffc30cca7559d9f6e8f1dfe9a99c71fa1dcfeb482bedf287d7934d2667ae54b3\"\n    }\n}\n```\n"
      }
    }
  }
}
````