{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/ViewRule", "title": "ViewRule", "properties": { "id": { "type": "string", "description": "Unique system generated identifier for each rule. This ID can be used when calling the PUT method to update a view rule. If the ID is passed, and the rule is found, the existing rule gets updated. Else, a new rule is created with a system created ID.", "example": "755dfc54-b50b-4471-88cd-57d040766cb6" }, "name": { "maximum": 100, "minimum": 1, "type": "string", "description": "View rule name is an optional string type field representing the name of the View Rule. When displaying the rules to a user, the names will be easier for the user to understand as opposed to IDs.", "example": "All Transactions Above $100" }, "fromDate": { "type": "string", "description": "Essentially every View rule must have a lifespan range specified by fromDate and toDate fields. Expected format - yyyy-MM-dd'T'HH:mm:ss. Note: Please provide the date in UTC timezone instead of Local timezone
  • GET /views
  • GET /views/{viewId}
  • POST /views
  • PUT /views
  • ", "example": "2020-05-23T10:40:59.000Z" }, "toDate": { "type": "string", "description": "Essentially every View rule must have a lifespan range specified by fromDate and toDate fields. Expected format - yyyy-MM-dd'T'HH:mm:ss.Note: Please provide the date in UTC timezone instead of Local timezone
    Endpoints:", "example": "2020-05-23T10:40:59.000Z" }, "type": { "type": "string", "description": "View.rule.type describes the ViewRule's type - INCOME or EXPENSE or TRANSFER. This is synonymous with the type field of the transaction category resource. Each Transaction has a categoryId and each categoryId has a categoryType associated to it. The supported values for Transaction category and categoryType are provided by the GET transactions/categories API.

    Note: There is a validation check in POST /views and PUT /views API where if you are passing categoryId in the view.rule.include or view.rule.exclude Request body. The validation expects that the categoryId's categoryType should match with view.rule.type

    Endpoints:", "enum": [ "INCOME", "EXPENSE", "TRANSFER" ] }, "baseType": { "type": "array", "description": "baseType for a Transaction identifies whether it was deposited to your account (CREDIT) or taken out (DEBIT). Specifying baseType for a rule will filter out transactions based on either CREDIT or DEBIT or both.
    \n
    Note: baseType is not mandatory to be passed. It's useful for specific situations like tracking refunds. Combine \"type\" = EXPENSE and \"baseType\" = CREDIT to fetch only refunds.

    Endpoints:\nexample: CREDIT", "items": { "type": "string", "enum": [ "CREDIT", "DEBIT" ] } }, "include": { "$ref": "#/components/schemas/ViewRuleInclude" }, "exclude": { "$ref": "#/components/schemas/ViewRuleExclude" } } }