openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 71.8 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"https://api.ynab.com/v1"}],"info":{"contact":{"x-twitter":"ynab"},"description":"Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com","title":"YNAB API Endpoints","version":"1.0.0","x-apisguru-categories":["financial"],"x-logo":{"url":"https://twitter.com/ynab/profile_image?size=original"},"x-origin":[{"format":"openapi","url":"https://api.youneedabudget.com/papi/spec-v1-swagger.json","version":"3.0"}],"x-providerName":"youneedabudget.com"},"security":[{"bearer":[]}],"tags":[{"name":"User"},{"name":"Budgets"},{"description":"The accounts for a budget","name":"Accounts"},{"description":"The categories for a budget","name":"Categories"},{"description":"The payees for a budget","name":"Payees"},{"description":"When you enter a transaction and specify a payee on the YNAB mobile apps, the GPS coordinates for that location are stored, with your permission, so that the next time you are in the same place (like the Grocery store) we can pre-populate nearby payees for you! It’s handy and saves you time. This resource makes these locations available. Locations will not be available for all payees.","name":"Payee Locations"},{"description":"Each budget contains one or more months, which is where Ready to Assign, Age of Money and category (budgeted / activity / balances) amounts are available.","name":"Months"},{"description":"The transactions for a budget","name":"Transactions"},{"description":"The scheduled transactions for a budget","name":"Scheduled Transactions"}],"paths":{"/budgets":{"get":{"description":"Returns budgets list with summary information","operationId":"getBudgets","parameters":[{"description":"Whether to include the list of budget accounts","in":"query","name":"include_accounts","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSummaryResponse"}}},"description":"The list of budgets"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No budgets were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List budgets","tags":["Budgets"]}},"/budgets/{budget_id}":{"get":{"description":"Returns a single budget with all related entities. This resource is effectively a full budget export.","operationId":"getBudgetById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetDetailResponse"}}},"description":"The requested budget"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The specified budget was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single budget","tags":["Budgets"]}},"/budgets/{budget_id}/accounts":{"get":{"description":"Returns all accounts","operationId":"getAccounts","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsResponse"}}},"description":"The list of requested accounts"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No accounts were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Account list","tags":["Accounts"]},"post":{"description":"Creates a new account","operationId":"createAccount","parameters":[{"description":"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)","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAccountWrapper"}}},"description":"The account to create.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}},"description":"The account was successfully created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)."}},"summary":"Create a new account","tags":["Accounts"]}},"/budgets/{budget_id}/accounts/{account_id}":{"get":{"description":"Returns a single account","operationId":"getAccountById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the account","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}},"description":"The requested account"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The requested account was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single account","tags":["Accounts"]}},"/budgets/{budget_id}/accounts/{account_id}/transactions":{"get":{"description":"Returns all transactions for a specified account","operationId":"getTransactionsByAccount","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the account","in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).","in":"query","name":"since_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.","in":"query","name":"type","required":false,"schema":{"enum":["uncategorized","unapproved"],"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsResponse"}}},"description":"The list of requested transactions"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No transactions were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List account transactions","tags":["Transactions"]}},"/budgets/{budget_id}/categories":{"get":{"description":"Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).","operationId":"getCategories","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}},"description":"The categories grouped by category group"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No categories were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List categories","tags":["Categories"]}},"/budgets/{budget_id}/categories/{category_id}":{"get":{"description":"Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).","operationId":"getCategoryById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the category","in":"path","name":"category_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}},"description":"The requested category"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The category not was found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single category","tags":["Categories"]}},"/budgets/{budget_id}/categories/{category_id}/transactions":{"get":{"description":"Returns all transactions for a specified category","operationId":"getTransactionsByCategory","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the category","in":"path","name":"category_id","required":true,"schema":{"type":"string"}},{"description":"If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).","in":"query","name":"since_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.","in":"query","name":"type","required":false,"schema":{"enum":["uncategorized","unapproved"],"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HybridTransactionsResponse"}}},"description":"The list of requested transactions"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No transactions were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List category transactions","tags":["Transactions"]}},"/budgets/{budget_id}/months":{"get":{"description":"Returns all budget months","operationId":"getBudgetMonths","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthSummariesResponse"}}},"description":"The list of budget months"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No budget months were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List budget months","tags":["Months"]}},"/budgets/{budget_id}/months/{month}":{"get":{"description":"Returns a single budget month","operationId":"getBudgetMonth","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))","in":"path","name":"month","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthDetailResponse"}}},"description":"The budget month detail"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The budget month was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single budget month","tags":["Months"]}},"/budgets/{budget_id}/months/{month}/categories/{category_id}":{"get":{"description":"Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).","operationId":"getMonthCategoryById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))","in":"path","name":"month","required":true,"schema":{"format":"date","type":"string"}},{"description":"The id of the category","in":"path","name":"category_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}},"description":"The requested month category"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The month category was not was found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single category for a specific budget month","tags":["Categories"]},"patch":{"description":"Update a category for a specific month. Only `budgeted` amount can be updated.","operationId":"updateMonthCategory","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))","in":"path","name":"month","required":true,"schema":{"format":"date","type":"string"}},{"description":"The id of the category","in":"path","name":"category_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMonthCategoryWrapper"}}},"description":"The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveCategoryResponse"}}},"description":"The month category was successfully updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)"}},"summary":"Update a category for a specific month","tags":["Categories"]}},"/budgets/{budget_id}/payee_locations":{"get":{"description":"Returns all payee locations","operationId":"getPayeeLocations","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeeLocationsResponse"}}},"description":"The list of payee locations"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No payees locations were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List payee locations","tags":["Payee Locations"]}},"/budgets/{budget_id}/payee_locations/{payee_location_id}":{"get":{"description":"Returns a single payee location","operationId":"getPayeeLocationById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"id of payee location","in":"path","name":"payee_location_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeeLocationResponse"}}},"description":"The payee location"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The payee location was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single payee location","tags":["Payee Locations"]}},"/budgets/{budget_id}/payees":{"get":{"description":"Returns all payees","operationId":"getPayees","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeesResponse"}}},"description":"The requested list of payees"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No payees were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List payees","tags":["Payees"]}},"/budgets/{budget_id}/payees/{payee_id}":{"get":{"description":"Returns a single payee","operationId":"getPayeeById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the payee","in":"path","name":"payee_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeeResponse"}}},"description":"The requested payee"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The payee was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single payee","tags":["Payees"]}},"/budgets/{budget_id}/payees/{payee_id}/payee_locations":{"get":{"description":"Returns all payee locations for a specified payee","operationId":"getPayeeLocationsByPayee","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"id of payee","in":"path","name":"payee_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeeLocationsResponse"}}},"description":"The list of requested payee locations"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No payees locations were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List locations for a payee","tags":["Payee Locations"]}},"/budgets/{budget_id}/payees/{payee_id}/transactions":{"get":{"description":"Returns all transactions for a specified payee","operationId":"getTransactionsByPayee","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the payee","in":"path","name":"payee_id","required":true,"schema":{"type":"string"}},{"description":"If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).","in":"query","name":"since_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.","in":"query","name":"type","required":false,"schema":{"enum":["uncategorized","unapproved"],"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HybridTransactionsResponse"}}},"description":"The list of requested transactions"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No transactions were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List payee transactions","tags":["Transactions"]}},"/budgets/{budget_id}/scheduled_transactions":{"get":{"description":"Returns all scheduled transactions","operationId":"getScheduledTransactions","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTransactionsResponse"}}},"description":"The list of requested scheduled transactions"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No scheduled transactions were found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"List scheduled transactions","tags":["Scheduled Transactions"]}},"/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}":{"get":{"description":"Returns a single scheduled transaction","operationId":"getScheduledTransactionById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the scheduled transaction","in":"path","name":"scheduled_transaction_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTransactionResponse"}}},"description":"The requested Scheduled Transaction"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The scheduled transaction was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single scheduled transaction","tags":["Scheduled Transactions"]}},"/budgets/{budget_id}/settings":{"get":{"description":"Returns settings for a budget","operationId":"getBudgetSettingsById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSettingsResponse"}}},"description":"The requested budget settings"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The specified Budget was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Budget Settings","tags":["Budgets"]}},"/budgets/{budget_id}/transactions":{"get":{"description":"Returns budget transactions","operationId":"getTransactions","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).","in":"query","name":"since_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.","in":"query","name":"type","required":false,"schema":{"enum":["uncategorized","unapproved"],"type":"string"}},{"description":"The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.","in":"query","name":"last_knowledge_of_server","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsResponse"}}},"description":"The list of requested transactions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No transactions were found"}},"summary":"List transactions","tags":["Transactions"]},"patch":{"description":"Updates multiple transactions, by `id` or `import_id`.","operationId":"updateTransactions","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchTransactionsWrapper"}}},"description":"The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.","required":true},"responses":{"209":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveTransactionsResponse"}}},"description":"The transactions were successfully updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)."}},"summary":"Update multiple transactions","tags":["Transactions"]},"post":{"description":"Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.","operationId":"createTransaction","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTransactionsWrapper"}}},"description":"The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveTransactionsResponse"}}},"description":"The transaction or transactions were successfully created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A transaction on the same account with the same `import_id` already exists."}},"summary":"Create a single transaction or multiple transactions","tags":["Transactions"]}},"/budgets/{budget_id}/transactions/bulk":{"post":{"description":"Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.","operationId":"bulkCreateTransactions","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactions"}}},"description":"The list of transactions to create","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResponse"}}},"description":"The bulk request was processed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)"}},"summary":"Bulk create transactions","tags":["Deprecated"]}},"/budgets/{budget_id}/transactions/import":{"post":{"description":"Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.","operationId":"importTransactions","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsImportResponse"}}},"description":"The request was successful but there were no transactions to import"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsImportResponse"}}},"description":"One or more transactions were imported successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)"}},"summary":"Import transactions","tags":["Transactions"]}},"/budgets/{budget_id}/transactions/{transaction_id}":{"delete":{"description":"Deletes a transaction","operationId":"deleteTransaction","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the transaction","in":"path","name":"transaction_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}},"description":"The transaction was successfully deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The transaction was not found"}},"summary":"Deletes an existing transaction","tags":["Transactions"]},"get":{"description":"Returns a single transaction","operationId":"getTransactionById","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the transaction","in":"path","name":"transaction_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}},"description":"The requested transaction"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The transaction was not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"Single transaction","tags":["Transactions"]},"put":{"description":"Updates a single transaction","operationId":"updateTransaction","parameters":[{"description":"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).","in":"path","name":"budget_id","required":true,"schema":{"type":"string"}},{"description":"The id of the transaction","in":"path","name":"transaction_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutTransactionWrapper"}}},"description":"The transaction to update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}},"description":"The transaction was successfully updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request could not be understood due to malformed syntax or validation error(s)"}},"summary":"Updates an existing transaction","tags":["Transactions"]}},"/user":{"get":{"description":"Returns authenticated user information","operationId":"getUser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"The user info"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"An error occurred"}},"summary":"User info","tags":["User"]}}},"components":{"schemas":{"Account":{"properties":{"balance":{"description":"The current balance of the account in milliunits format","format":"int64","type":"integer"},"cleared_balance":{"description":"The current cleared balance of the account in milliunits format","format":"int64","type":"integer"},"closed":{"description":"Whether this account is closed or not","type":"boolean"},"debt_escrow_amounts":{"$ref":"#/components/schemas/LoanAccountPeriodicValue"},"debt_interest_rates":{"$ref":"#/components/schemas/LoanAccountPeriodicValue"},"debt_minimum_payments":{"$ref":"#/components/schemas/LoanAccountPeriodicValue"},"debt_original_balance":{"description":"The original debt/loan account balance, specified in milliunits format.","format":"int64","type":"integer"},"deleted":{"description":"Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.","type":"boolean"},"direct_import_in_error":{"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.","type":"boolean"},"direct_import_linked":{"description":"Whether or not the account is linked to a financial institution for automatic transaction import.","type":"boolean"},"id":{"format":"uuid","type":"string"},"last_reconciled_at":{"description":"A date/time specifying when the account was last reconciled.","format":"date-time","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"on_budget":{"description":"Whether this account is on budget or not","type":"boolean"},"transfer_payee_id":{"description":"The payee id which should be used when transferring to this account","format":"uuid","type":"string"},"type":{"$ref":"#/components/schemas/AccountType"},"uncleared_balance":{"description":"The current uncleared balance of the account in milliunits format","format":"int64","type":"integer"}},"required":["id","name","type","on_budget","closed","balance","cleared_balance","uncleared_balance","transfer_payee_id","deleted"],"type":"object"},"AccountResponse":{"properties":{"data":{"properties":{"account":{"$ref":"#/components/schemas/Account"}},"required":["account"],"type":"object"}},"required":["data"],"type":"object"},"AccountType":{"description":"The type of account","enum":["checking","savings","cash","creditCard","lineOfCredit","otherAsset","otherLiability","mortgage","autoLoan","studentLoan","personalLoan","medicalDebt","otherDebt"],"type":"string"},"AccountsResponse":{"properties":{"data":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"},"server_knowledge":{"description":"The knowledge of the server","format":"int64","type":"integer"}},"required":["accounts","server_knowledge"],"type":"object"}},"required":["data"],"type":"object"},"BudgetDetail":{"allOf":[{"$ref":"#/components/schemas/BudgetSummary"},{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/Account"},"type":"array"},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array"},"category_groups":{"items":{"$ref":"#/components/schemas/CategoryGroup"},"type":"array"},"months":{"items":{"$ref":"#/components/schemas/MonthDetail"},"type":"array"},"payee_locations":{"items":{"$ref":"#/components/schemas/PayeeLocation"},"type":"array"},"payees":{"items":{"$ref":"#/components/schemas/Payee"},"type":"array"},"scheduled_subtransactions":{"items":{"$ref":"#/components/schemas/ScheduledSubTransaction"},"type":"array"},"scheduled_transactions":{"items":{"$ref":"#/components/schemas/ScheduledTransactionSummary"},"type":"array"},"subtransactions":{"items":{"$ref":"#/components/schemas/SubTransaction"},"type":"array"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionSummary"},"type":"array"}},"type":"object"}]},"BudgetDetailResponse":{"properties":{"data":{"properties":{"budget":{"$ref":"#/components/schemas/BudgetDetail"},"server_knowledge":{"description":"The knowledge of the server","format":"int64","type":"integer"}},"required":["budget","server_knowledge"],"type":"object"}},"required":["data"],"type":"object"},"BudgetSettings":{"properties":{"currency_format":{"$ref":"#/components/schemas/CurrencyFormat"},"date_format":{"$ref":"#/components/schemas/DateFormat"}},"required":["date_format","currency_format"],"type":"object"},"BudgetSettingsResponse":{"properties":{"data":{"properties":{"settings":{"$ref":"#/components/schemas/BudgetSettings"}},"required":["settings"],"type":"object"}},"required":["data"],"type":"object"},"BudgetSummary":{"properties":{"accounts":{"description":"The budget accounts (only included if `include_accounts=true` specified as query parameter)","items":{"$ref":"#/components/schemas/Account"},"type":"array"},"currency_format":{"$ref":"#/components/schemas/CurrencyFormat"},"date_format":{"$ref":"#/components/schemas/DateFormat"},"first_month":{"description":"The earliest budget month","format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"last_modified_on":{"description":"The last time any changes were made to the budget from either a web or mobile client","format":"date-time","type":"string"},"last_month":{"description":"The latest budget month","format":"date","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"BudgetSummaryResponse":{"properties":{"data":{"properties":{"budgets":{"items":{"$ref":"#/components/schemas/BudgetSummary"},"type":"array"},"default_budget":{"$ref":"#/components/schemas/BudgetSummary"}},"required":["budgets"],"type":"object"}},"required":["data"],"type":"object"},"BulkResponse":{"properties":{"data":{"properties":{"bulk":{"properties":{"duplicate_import_ids":{"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.","items":{"type":"string"},"type":"array"},"transaction_ids":{"description":"The list of Transaction ids that were created.","items":{"type":"string"},"type":"array"}},"required":["transaction_ids","duplicate_import_ids"],"type":"object"}},"required":["bulk"],"type":"object"}},"required":["data"],"type":"object"},"BulkTransactions":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/SaveTransaction"},"type":"array"}},"required":["transactions"],"type":"object"},"CategoriesResponse":{"properties":{"data":{"properties":{"category_groups":{"items":{"$ref":"#/components/schemas/CategoryGroupWithCategories"},"type":"array"},"server_knowledge":{"description":"The knowledge of the server","format":"int64","type":"integer"}},"required":["category_groups","server_knowledge"],"type":"object"}},"required":["data"],"type":"object"},"Category":{"properties":{"activity":{"description":"Activity amount in milliunits format","format":"int64","type":"integer"},"balance":{"description":"Balance in milliunits format","format":"int64","type":"integer"},"budgeted":{"description":"Budgeted amount in milliunits format","format":"int64","type":"integer"},"category_group_id":{"format":"uuid","type":"string"},"deleted":{"description":"Whether or not the category has been deleted. Deleted categories will only be included in delta requests.","type":"boolean"},"goal_cadence":{"description":"The goal cadence","format":"int32","type":"integer"},"goal_cadence_frequency":{"description":"The goal cadence frequency","format":"int32","type":"integer"},"goal_creation_month":{"description":"The month a goal was created","format":"date","type":"string"},"goal_day":{"description":"The day of the goal","format":"int32","type":"integer"},"goal_months_to_budget":{"description":"The number of months, including the current month, left in the current goal period.","format":"int32","type":"integer"},"goal_overall_funded":{"description":"The total amount funded towards the goal within the current goal period.","format":"int64","type":"integer"},"goal_overall_left":{"description":"The amount of funding still needed to complete the goal within the current goal period.","format":"int64","type":"integer"},"goal_percentage_complete":{"description":"The percentage completion of the goal","format":"int32","type":"integer"},"goal_target":{"description":"The goal target amount in milliunits","format":"int64","type":"integer"},"goal_target_month":{"description":"The original target month for the goal to be completed. Only some goal types specify this date.","format":"date","type":"string"},"goal_type":{"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')","enum":["TB","TBD","MF","NEED","DEBT",null],"type":"string"},"goal_under_funded":{"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.","format":"int64","type":"integer"},"hidden":{"description":"Whether or not the category is hidden","type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"note":{"type":"string"},"original_category_group_id":{"description":"DEPRECATED: No longer used. Value will always be null.","format":"uuid","type":"string"}},"required":["id","category_group_id","name","hidden","budgeted","activity","balance","deleted"],"type":"object"},"CategoryGroup":{"properties":{"deleted":{"description":"Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.","type":"boolean"},"hidden":{"description":"Whether or not the category group is hidden","type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","hidden","deleted"],"type":"object"},"CategoryGroupWithCategories":{"allOf":[{"$ref":"#/components/schemas/CategoryGroup"},{"properties":{"categories":{"description":"Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).","items":{"$ref":"#/components/schemas/Category"},"type":"array"}},"require