You Need A Budget

Budgeting software API

api.ynab.com ↗
Version
1.68.0
OpenAPI
3.0.0
Endpoints
31
Schemas
66
Updated
3 days ago
Finance finance budgeting personal-finance
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.ynab.com/v1

Authentication

bearer

Endpoints

Clear filters

Transactions 1 endpoints

DELETE /budgets/{budget_id}/transactions/{transaction_id}

Deletes a transaction

operationId: Transactions_deleteExistingTransaction

Parameters

Name In Required Type Description
budget_id path required string The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
transaction_id path required string The id of the transaction

Responses

200 The transaction was successfully deleted
404 The transaction was not found
DELETE /budgets/{budget_id}/transactions/{transaction_id}

Schemas

object Account
{
  "type": "object",
  "required": [
    "balance",
    "cleared_balance",
    "closed",
    "deleted",
    "id",
    "name",
    "on_budget",
    "transfer_payee_id",
    "type",
    "uncleared_balance"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "note": {
      "type": "string",
      "nullable": true
    },
    "type": {
      "$ref": "#/components/schemas/AccountType"
    },
    "closed": {
      "type": "boolean",
      "description": "Whether this account is closed or not"
    },
    "balance": {
      "type": "integer",
      "format": "int64",
      "description": "The current balance of the account in milliunits format"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the account has been deleted.  Deleted accounts will only be included in delta requests."
    },
    "on_budget": {
      "type": "boolean",
      "description": "Whether this account is on budget or not"
    },
    "cleared_balance": {
      "type": "integer",
      "format": "int64",
      "description": "The current cleared balance of the account in milliunits format"
    },
    "transfer_payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The payee id which should be used when transferring to this account"
    },
    "uncleared_balance": {
      "type": "integer",
      "format": "int64",
      "description": "The current uncleared balance of the account in milliunits format"
    },
    "last_reconciled_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "A date/time specifying when the account was last reconciled."
    },
    "debt_escrow_amounts": {
      "$ref": "#/components/schemas/LoanAccountPeriodicValue"
    },
    "debt_interest_rates": {
      "$ref": "#/components/schemas/LoanAccountPeriodicValue"
    },
    "direct_import_linked": {
      "type": "boolean",
      "description": "Whether or not the account is linked to a financial institution for automatic transaction import."
    },
    "debt_minimum_payments": {
      "$ref": "#/components/schemas/LoanAccountPeriodicValue"
    },
    "debt_original_balance": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The original debt/loan account balance, specified in milliunits format."
    },
    "direct_import_in_error": {
      "type": "boolean",
      "description": "If an account linked to a financial institution (direct_import_linked=true) and the linked connection is not in a healthy state, this will be true."
    }
  }
}
object AccountResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "account"
      ],
      "properties": {
        "account": {
          "$ref": "#/components/schemas/Account"
        }
      }
    }
  }
}
string AccountType
{
  "enum": [
    "checking",
    "savings",
    "cash",
    "creditCard",
    "lineOfCredit",
    "otherAsset",
    "otherLiability",
    "mortgage",
    "autoLoan",
    "studentLoan",
    "personalLoan",
    "medicalDebt",
    "otherDebt"
  ],
  "type": "string",
  "description": "The type of account"
}
object AccountsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "accounts",
        "server_knowledge"
      ],
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Account"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object BudgetDetail
{
  "allOf": [
    {
      "$ref": "#/components/schemas/BudgetSummary"
    },
    {
      "type": "object",
      "properties": {
        "months": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/MonthDetail"
          }
        },
        "payees": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Payee"
          }
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Account"
          }
        },
        "categories": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Category"
          }
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/TransactionSummary"
          }
        },
        "category_groups": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CategoryGroup"
          }
        },
        "payee_locations": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PayeeLocation"
          }
        },
        "subtransactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SubTransaction"
          }
        },
        "scheduled_transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ScheduledTransactionSummary"
          }
        },
        "scheduled_subtransactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ScheduledSubTransaction"
          }
        }
      }
    }
  ]
}
object BudgetDetailResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "budget",
        "server_knowledge"
      ],
      "properties": {
        "budget": {
          "$ref": "#/components/schemas/BudgetDetail"
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object BudgetSettings
{
  "type": "object",
  "required": [
    "currency_format",
    "date_format"
  ],
  "properties": {
    "date_format": {
      "$ref": "#/components/schemas/DateFormat"
    },
    "currency_format": {
      "$ref": "#/components/schemas/CurrencyFormat"
    }
  }
}
object BudgetSettingsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "settings"
      ],
      "properties": {
        "settings": {
          "$ref": "#/components/schemas/BudgetSettings"
        }
      }
    }
  }
}
object BudgetSummary
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "accounts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Account"
      },
      "description": "The budget accounts (only included if `include_accounts=true` specified as query parameter)"
    },
    "last_month": {
      "type": "string",
      "format": "date",
      "description": "The latest budget month"
    },
    "date_format": {
      "$ref": "#/components/schemas/DateFormat"
    },
    "first_month": {
      "type": "string",
      "format": "date",
      "description": "The earliest budget month"
    },
    "currency_format": {
      "$ref": "#/components/schemas/CurrencyFormat"
    },
    "last_modified_on": {
      "type": "string",
      "format": "date-time",
      "description": "The last time any changes were made to the budget from either a web or mobile client"
    }
  }
}
object BudgetSummaryResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "budgets"
      ],
      "properties": {
        "budgets": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/BudgetSummary"
          }
        },
        "default_budget": {
          "$ref": "#/components/schemas/BudgetSummary"
        }
      }
    }
  }
}
object BulkResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "bulk"
      ],
      "properties": {
        "bulk": {
          "type": "object",
          "required": [
            "duplicate_import_ids",
            "transaction_ids"
          ],
          "properties": {
            "transaction_ids": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The list of Transaction ids that were created."
            },
            "duplicate_import_ids": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "If any Transactions were not created because they had an `import_id` matching a transaction already on the same account, the specified import_id(s) will be included in this list."
            }
          }
        }
      }
    }
  }
}
object BulkTransactions
{
  "type": "object",
  "required": [
    "transactions"
  ],
  "properties": {
    "transactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SaveTransactionWithOptionalFields"
      }
    }
  }
}
object CategoriesResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "category_groups",
        "server_knowledge"
      ],
      "properties": {
        "category_groups": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CategoryGroupWithCategories"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object Category
{
  "type": "object",
  "required": [
    "activity",
    "balance",
    "budgeted",
    "category_group_id",
    "deleted",
    "hidden",
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "note": {
      "type": "string",
      "nullable": true
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether or not the category is hidden"
    },
    "balance": {
      "type": "integer",
      "format": "int64",
      "description": "Balance in milliunits format"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the category has been deleted.  Deleted categories will only be included in delta requests."
    },
    "activity": {
      "type": "integer",
      "format": "int64",
      "description": "Activity amount in milliunits format"
    },
    "budgeted": {
      "type": "integer",
      "format": "int64",
      "description": "Budgeted amount in milliunits format"
    },
    "goal_day": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month)."
    },
    "goal_type": {
      "enum": [
        "TB",
        "TBD",
        "MF",
        "NEED",
        "DEBT",
        null
      ],
      "type": "string",
      "nullable": true,
      "description": "The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')"
    },
    "goal_target": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The goal target amount in milliunits"
    },
    "goal_cadence": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal's due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal's due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, ..., 12 = Every 11 Months, and 14 = Every 2 Years."
    },
    "category_group_id": {
      "type": "string",
      "format": "uuid"
    },
    "goal_overall_left": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The amount of funding still needed to complete the goal within the current goal period."
    },
    "goal_target_month": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "The original target month for the goal to be completed.  Only some goal types specify this date."
    },
    "goal_under_funded": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month.  The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month."
    },
    "category_group_name": {
      "type": "string"
    },
    "goal_creation_month": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "The month a goal was created"
    },
    "goal_overall_funded": {
      "type": "integer",
      "format": "int64",
      "nullable": true,
      "description": "The total amount funded towards the goal within the current goal period."
    },
    "goal_months_to_budget": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "The number of months, including the current month, left in the current goal period."
    },
    "goal_cadence_frequency": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal's due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month.  When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored."
    },
    "goal_percentage_complete": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "The percentage completion of the goal"
    },
    "original_category_group_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "DEPRECATED: No longer used.  Value will always be null."
    }
  }
}
object CategoryGroup
{
  "type": "object",
  "required": [
    "deleted",
    "hidden",
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether or not the category group is hidden"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the category group has been deleted.  Deleted category groups will only be included in delta requests."
    }
  }
}
object CategoryGroupWithCategories
{
  "allOf": [
    {
      "$ref": "#/components/schemas/CategoryGroup"
    },
    {
      "type": "object",
      "required": [
        "categories"
      ],
      "properties": {
        "categories": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Category"
          },
          "description": "Category group categories.  Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC)."
        }
      }
    }
  ]
}
object CategoryResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "category"
      ],
      "properties": {
        "category": {
          "$ref": "#/components/schemas/Category"
        }
      }
    }
  }
}
object CurrencyFormat
{
  "type": "object",
  "nullable": true,
  "required": [
    "currency_symbol",
    "decimal_digits",
    "decimal_separator",
    "display_symbol",
    "example_format",
    "group_separator",
    "iso_code",
    "symbol_first"
  ],
  "properties": {
    "iso_code": {
      "type": "string"
    },
    "symbol_first": {
      "type": "boolean"
    },
    "decimal_digits": {
      "type": "integer",
      "format": "int32"
    },
    "display_symbol": {
      "type": "boolean"
    },
    "example_format": {
      "type": "string"
    },
    "currency_symbol": {
      "type": "string"
    },
    "group_separator": {
      "type": "string"
    },
    "decimal_separator": {
      "type": "string"
    }
  },
  "description": "The currency format setting for the budget.  In some cases the format will not be available and will be specified as null."
}
object DateFormat
{
  "type": "object",
  "nullable": true,
  "required": [
    "format"
  ],
  "properties": {
    "format": {
      "type": "string"
    }
  },
  "description": "The date format setting for the budget.  In some cases the format will not be available and will be specified as null."
}
object ErrorDetail
{
  "type": "object",
  "required": [
    "detail",
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    }
  }
}
object ErrorResponse
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "$ref": "#/components/schemas/ErrorDetail"
    }
  }
}
object ExistingTransaction
{
  "allOf": [
    {
      "type": "object"
    },
    {
      "$ref": "#/components/schemas/SaveTransactionWithOptionalFields"
    }
  ]
}
object HybridTransaction
{
  "allOf": [
    {
      "$ref": "#/components/schemas/TransactionSummary"
    },
    {
      "type": "object",
      "required": [
        "account_name",
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "transaction",
            "subtransaction"
          ],
          "type": "string",
          "description": "Whether the hybrid transaction represents a regular transaction or a subtransaction"
        },
        "payee_name": {
          "type": "string",
          "nullable": true
        },
        "account_name": {
          "type": "string"
        },
        "category_name": {
          "type": "string",
          "description": "The name of the category.  If a split transaction, this will be 'Split'."
        },
        "parent_transaction_id": {
          "type": "string",
          "nullable": true,
          "description": "For subtransaction types, this is the id of the parent transaction.  For transaction types, this id will be always be null."
        }
      }
    }
  ]
}
object HybridTransactionsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "transactions"
      ],
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/HybridTransaction"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object LoanAccountPeriodicValue
{
  "type": "object",
  "nullable": true,
  "additionalProperties": {
    "type": "integer",
    "format": "int64"
  }
}
object MonthDetail
{
  "allOf": [
    {
      "$ref": "#/components/schemas/MonthSummary"
    },
    {
      "type": "object",
      "required": [
        "categories"
      ],
      "properties": {
        "categories": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Category"
          },
          "description": "The budget month categories.  Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified."
        }
      }
    }
  ]
}
object MonthDetailResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "month"
      ],
      "properties": {
        "month": {
          "$ref": "#/components/schemas/MonthDetail"
        }
      }
    }
  }
}
object MonthSummariesResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "months",
        "server_knowledge"
      ],
      "properties": {
        "months": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/MonthSummary"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object MonthSummary
{
  "type": "object",
  "required": [
    "activity",
    "budgeted",
    "deleted",
    "income",
    "month",
    "to_be_budgeted"
  ],
  "properties": {
    "note": {
      "type": "string",
      "nullable": true
    },
    "month": {
      "type": "string",
      "format": "date"
    },
    "income": {
      "type": "integer",
      "format": "int64",
      "description": "The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the month has been deleted.  Deleted months will only be included in delta requests."
    },
    "activity": {
      "type": "integer",
      "format": "int64",
      "description": "The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'"
    },
    "budgeted": {
      "type": "integer",
      "format": "int64",
      "description": "The total amount budgeted in the month"
    },
    "age_of_money": {
      "type": "integer",
      "format": "int32",
      "nullable": true,
      "description": "The Age of Money as of the month"
    },
    "to_be_budgeted": {
      "type": "integer",
      "format": "int64",
      "description": "The available amount for 'Ready to Assign'"
    }
  }
}
object NewTransaction
{
  "allOf": [
    {
      "$ref": "#/components/schemas/SaveTransactionWithOptionalFields"
    },
    {
      "type": "object",
      "properties": {
        "import_id": {
          "type": "string",
          "nullable": true,
          "maxLength": 36,
          "description": "If specified, a new transaction will be assigned this `import_id` and considered \"imported\".  We will also attempt to match this imported transaction to an existing \"user-entered\" transaction on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.  Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API)."
        }
      }
    }
  ]
}
object PatchCategoryWrapper
{
  "type": "object",
  "required": [
    "category"
  ],
  "properties": {
    "category": {
      "$ref": "#/components/schemas/SaveCategory"
    }
  }
}
object PatchMonthCategoryWrapper
{
  "type": "object",
  "required": [
    "category"
  ],
  "properties": {
    "category": {
      "$ref": "#/components/schemas/SaveMonthCategory"
    }
  }
}
object PatchTransactionsWrapper
{
  "type": "object",
  "required": [
    "transactions"
  ],
  "properties": {
    "transactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SaveTransactionWithIdOrImportId"
      }
    }
  }
}
object Payee
{
  "type": "object",
  "required": [
    "deleted",
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the payee has been deleted.  Deleted payees will only be included in delta requests."
    },
    "transfer_account_id": {
      "type": "string",
      "nullable": true,
      "description": "If a transfer payee, the `account_id` to which this payee transfers to"
    }
  }
}
object PayeeLocation
{
  "type": "object",
  "required": [
    "deleted",
    "id",
    "latitude",
    "longitude",
    "payee_id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the payee location has been deleted.  Deleted payee locations will only be included in delta requests."
    },
    "latitude": {
      "type": "string"
    },
    "payee_id": {
      "type": "string",
      "format": "uuid"
    },
    "longitude": {
      "type": "string"
    }
  }
}
object PayeeLocationResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "payee_location"
      ],
      "properties": {
        "payee_location": {
          "$ref": "#/components/schemas/PayeeLocation"
        }
      }
    }
  }
}
object PayeeLocationsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "payee_locations"
      ],
      "properties": {
        "payee_locations": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PayeeLocation"
          }
        }
      }
    }
  }
}
object PayeeResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "payee"
      ],
      "properties": {
        "payee": {
          "$ref": "#/components/schemas/Payee"
        }
      }
    }
  }
}
object PayeesResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "payees",
        "server_knowledge"
      ],
      "properties": {
        "payees": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Payee"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object PostAccountWrapper
{
  "type": "object",
  "required": [
    "account"
  ],
  "properties": {
    "account": {
      "$ref": "#/components/schemas/SaveAccount"
    }
  }
}
object PostTransactionsWrapper
{
  "type": "object",
  "properties": {
    "transaction": {
      "$ref": "#/components/schemas/NewTransaction"
    },
    "transactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/NewTransaction"
      }
    }
  }
}
object PutTransactionWrapper
{
  "type": "object",
  "required": [
    "transaction"
  ],
  "properties": {
    "transaction": {
      "$ref": "#/components/schemas/ExistingTransaction"
    }
  }
}
object SaveAccount
{
  "type": "object",
  "required": [
    "balance",
    "name",
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the account"
    },
    "type": {
      "$ref": "#/components/schemas/AccountType"
    },
    "balance": {
      "type": "integer",
      "format": "int64",
      "description": "The current balance of the account in milliunits format"
    }
  }
}
object SaveCategory
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "nullable": true
    },
    "note": {
      "type": "string",
      "nullable": true
    },
    "category_group_id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
object SaveCategoryResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "category",
        "server_knowledge"
      ],
      "properties": {
        "category": {
          "$ref": "#/components/schemas/Category"
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object SaveMonthCategory
{
  "type": "object",
  "required": [
    "budgeted"
  ],
  "properties": {
    "budgeted": {
      "type": "integer",
      "format": "int64",
      "description": "Budgeted amount in milliunits format"
    }
  }
}
object SaveSubTransaction
{
  "type": "object",
  "required": [
    "amount"
  ],
  "properties": {
    "memo": {
      "type": "string",
      "nullable": true,
      "maxLength": 200
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The subtransaction amount in milliunits format."
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The payee for the subtransaction."
    },
    "payee_name": {
      "type": "string",
      "nullable": true,
      "maxLength": 50,
      "description": "The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified on parent transaction) or (2) a payee with the same name or (3) creation of a new payee."
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The category for the subtransaction.  Credit Card Payment categories are not permitted and will be ignored if supplied."
    }
  }
}
object SaveTransactionWithIdOrImportId
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "nullable": true,
          "description": "If specified, this id will be used to lookup a transaction by its `id` for the purpose of updating the transaction itself. If not specified, an `import_id` should be supplied."
        },
        "import_id": {
          "type": "string",
          "nullable": true,
          "maxLength": 36,
          "description": "If specified, this id will be used to lookup a transaction by its `import_id` for the purpose of updating the transaction itself. If not specified, an `id` should be supplied.  You may not provide both an `id` and an `import_id` and updating an `import_id` on an existing transaction is not allowed."
        }
      }
    },
    {
      "$ref": "#/components/schemas/SaveTransactionWithOptionalFields"
    }
  ]
}
object SaveTransactionWithOptionalFields
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "The transaction date in ISO format (e.g. 2016-12-01).  Future dates (scheduled transactions) are not permitted.  Split transaction dates cannot be changed and if a different date is supplied it will be ignored."
    },
    "memo": {
      "type": "string",
      "nullable": true,
      "maxLength": 200
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The transaction amount in milliunits format.  Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored."
    },
    "cleared": {
      "$ref": "#/components/schemas/TransactionClearedStatus"
    },
    "approved": {
      "type": "boolean",
      "description": "Whether or not the transaction is approved.  If not supplied, transaction will be unapproved by default."
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The payee for the transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `tranfer_payee_id` on the account resource."
    },
    "account_id": {
      "type": "string",
      "format": "uuid"
    },
    "flag_color": {
      "$ref": "#/components/schemas/TransactionFlagColor"
    },
    "payee_name": {
      "type": "string",
      "nullable": true,
      "maxLength": 50,
      "description": "The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee."
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The category for the transaction.  To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object.  If an existing transaction is a split, the `category_id` cannot be changed.  Credit Card Payment categories are not permitted and will be ignored if supplied."
    },
    "subtransactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SaveSubTransaction"
      },
      "description": "An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported."
    }
  }
}
object SaveTransactionsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "server_knowledge",
        "transaction_ids"
      ],
      "properties": {
        "transaction": {
          "$ref": "#/components/schemas/TransactionDetail"
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/TransactionDetail"
          },
          "description": "If multiple transactions were specified, the transactions that were saved"
        },
        "transaction_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The transaction ids that were saved"
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        },
        "duplicate_import_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "If multiple transactions were specified, a list of import_ids that were not created because of an existing `import_id` found on the same account"
        }
      }
    }
  }
}
object ScheduledSubTransaction
{
  "type": "object",
  "required": [
    "amount",
    "deleted",
    "id",
    "scheduled_transaction_id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "memo": {
      "type": "string",
      "nullable": true
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The scheduled subtransaction amount in milliunits format"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests."
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "transfer_account_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "If a transfer, the account_id which the scheduled subtransaction transfers to"
    },
    "scheduled_transaction_id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
object ScheduledTransactionDetail
{
  "allOf": [
    {
      "$ref": "#/components/schemas/ScheduledTransactionSummary"
    },
    {
      "type": "object",
      "required": [
        "account_name",
        "subtransactions"
      ],
      "properties": {
        "payee_name": {
          "type": "string",
          "nullable": true
        },
        "account_name": {
          "type": "string"
        },
        "category_name": {
          "type": "string",
          "nullable": true,
          "description": "The name of the category.  If a split scheduled transaction, this will be 'Split'."
        },
        "subtransactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ScheduledSubTransaction"
          },
          "description": "If a split scheduled transaction, the subtransactions."
        }
      }
    }
  ]
}
object ScheduledTransactionResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "scheduled_transaction"
      ],
      "properties": {
        "scheduled_transaction": {
          "$ref": "#/components/schemas/ScheduledTransactionDetail"
        }
      }
    }
  }
}
object ScheduledTransactionSummary
{
  "type": "object",
  "required": [
    "account_id",
    "amount",
    "date_first",
    "date_next",
    "deleted",
    "frequency",
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "memo": {
      "type": "string",
      "nullable": true
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The scheduled transaction amount in milliunits format"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the scheduled transaction has been deleted.  Deleted scheduled transactions will only be included in delta requests."
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "date_next": {
      "type": "string",
      "format": "date",
      "description": "The next date for which the Scheduled Transaction is scheduled."
    },
    "flag_name": {
      "$ref": "#/components/schemas/TransactionFlagName"
    },
    "frequency": {
      "enum": [
        "never",
        "daily",
        "weekly",
        "everyOtherWeek",
        "twiceAMonth",
        "every4Weeks",
        "monthly",
        "everyOtherMonth",
        "every3Months",
        "every4Months",
        "twiceAYear",
        "yearly",
        "everyOtherYear"
      ],
      "type": "string"
    },
    "account_id": {
      "type": "string",
      "format": "uuid"
    },
    "date_first": {
      "type": "string",
      "format": "date",
      "description": "The first date for which the Scheduled Transaction was scheduled."
    },
    "flag_color": {
      "$ref": "#/components/schemas/TransactionFlagColor"
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "transfer_account_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "If a transfer, the account_id which the scheduled transaction transfers to"
    }
  }
}
object ScheduledTransactionsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "scheduled_transactions",
        "server_knowledge"
      ],
      "properties": {
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        },
        "scheduled_transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ScheduledTransactionDetail"
          }
        }
      }
    }
  }
}
object SubTransaction
{
  "type": "object",
  "required": [
    "amount",
    "deleted",
    "id",
    "transaction_id"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "memo": {
      "type": "string",
      "nullable": true
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The subtransaction amount in milliunits format"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the subtransaction has been deleted.  Deleted subtransactions will only be included in delta requests."
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "payee_name": {
      "type": "string",
      "nullable": true
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "category_name": {
      "type": "string",
      "nullable": true
    },
    "transaction_id": {
      "type": "string"
    },
    "transfer_account_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "If a transfer, the account_id which the subtransaction transfers to"
    },
    "transfer_transaction_id": {
      "type": "string",
      "nullable": true,
      "description": "If a transfer, the id of transaction on the other side of the transfer"
    }
  }
}
string TransactionClearedStatus
{
  "enum": [
    "cleared",
    "uncleared",
    "reconciled"
  ],
  "type": "string",
  "description": "The cleared status of the transaction"
}
object TransactionDetail
{
  "allOf": [
    {
      "$ref": "#/components/schemas/TransactionSummary"
    },
    {
      "type": "object",
      "required": [
        "account_name",
        "subtransactions"
      ],
      "properties": {
        "payee_name": {
          "type": "string",
          "nullable": true
        },
        "account_name": {
          "type": "string"
        },
        "category_name": {
          "type": "string",
          "nullable": true,
          "description": "The name of the category.  If a split transaction, this will be 'Split'."
        },
        "subtransactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/SubTransaction"
          },
          "description": "If a split transaction, the subtransactions."
        }
      }
    }
  ]
}
string TransactionFlagColor
{
  "enum": [
    "red",
    "orange",
    "yellow",
    "green",
    "blue",
    "purple",
    null
  ],
  "type": "string",
  "nullable": true,
  "description": "The transaction flag"
}
string TransactionFlagName
{
  "type": "string",
  "nullable": true,
  "description": "The customized name of a transaction flag"
}
object TransactionResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "transaction"
      ],
      "properties": {
        "transaction": {
          "$ref": "#/components/schemas/TransactionDetail"
        }
      }
    }
  }
}
object TransactionSummary
{
  "type": "object",
  "required": [
    "account_id",
    "amount",
    "approved",
    "cleared",
    "date",
    "deleted",
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "The transaction date in ISO format (e.g. 2016-12-01)"
    },
    "memo": {
      "type": "string",
      "nullable": true
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "The transaction amount in milliunits format"
    },
    "cleared": {
      "$ref": "#/components/schemas/TransactionClearedStatus"
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether or not the transaction has been deleted.  Deleted transactions will only be included in delta requests."
    },
    "approved": {
      "type": "boolean",
      "description": "Whether or not the transaction is approved"
    },
    "payee_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "flag_name": {
      "$ref": "#/components/schemas/TransactionFlagName"
    },
    "import_id": {
      "type": "string",
      "nullable": true,
      "description": "If the transaction was imported, this field is a unique (by account) import identifier.  If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'.  For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'."
    },
    "account_id": {
      "type": "string",
      "format": "uuid"
    },
    "flag_color": {
      "$ref": "#/components/schemas/TransactionFlagColor"
    },
    "category_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
    },
    "import_payee_name": {
      "type": "string",
      "nullable": true,
      "description": "If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules"
    },
    "transfer_account_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "If a transfer transaction, the account to which it transfers"
    },
    "debt_transaction_type": {
      "enum": [
        "payment",
        "refund",
        "fee",
        "interest",
        "escrow",
        "balanceAdjustment",
        "credit",
        "charge",
        null
      ],
      "type": "string",
      "nullable": true,
      "description": "If the transaction is a debt/loan account transaction, the type of transaction"
    },
    "matched_transaction_id": {
      "type": "string",
      "nullable": true,
      "description": "If transaction is matched, the id of the matched transaction"
    },
    "transfer_transaction_id": {
      "type": "string",
      "nullable": true,
      "description": "If a transfer transaction, the id of transaction on the other side of the transfer"
    },
    "import_payee_name_original": {
      "type": "string",
      "nullable": true,
      "description": "If the transaction was imported, the original payee name as it appeared on the statement"
    }
  }
}
object TransactionsImportResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "transaction_ids"
      ],
      "properties": {
        "transaction_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of transaction ids that were imported."
        }
      }
    }
  }
}
object TransactionsResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "server_knowledge",
        "transactions"
      ],
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/TransactionDetail"
          }
        },
        "server_knowledge": {
          "type": "integer",
          "format": "int64",
          "description": "The knowledge of the server"
        }
      }
    }
  }
}
object User
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
object UserResponse
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "user"
      ],
      "properties": {
        "user": {
          "$ref": "#/components/schemas/User"
        }
      }
    }
  }
}