@datafire/youneedabudget
v3.0.0
Published
DataFire integration for YNAB API Endpoints
Downloads
7
Readme
@datafire/youneedabudget
Client library for YNAB API Endpoints
Installation and Usage
npm install --save @datafire/youneedabudget
let youneedabudget = require('@datafire/youneedabudget').create({
bearer: ""
});
.then(data => {
console.log(data);
});
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.youneedabudget.com
Actions
getBudgets
Returns budgets list with summary information
youneedabudget.getBudgets({}, context)
Input
- input
object
- include_accounts
boolean
: Whether to include the list of budget accounts
- include_accounts
Output
- output BudgetSummaryResponse
getBudgetById
Returns a single budget with all related entities. This resource is effectively a full budget export.
youneedabudget.getBudgetById({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output BudgetDetailResponse
getAccounts
Returns all accounts
youneedabudget.getAccounts({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output AccountsResponse
createAccount
Creates a new account
youneedabudget.createAccount({
"budget_id": "",
"data": {
"account": {
"name": "",
"type": "",
"balance": 0
}
}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget) - data required SaveAccountWrapper
- budget_id required
Output
- output AccountResponse
getAccountById
Returns a single account
youneedabudget.getAccountById({
"budget_id": "",
"account_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - account_id required
string
: The id of the account
- budget_id required
Output
- output AccountResponse
getTransactionsByAccount
Returns all transactions for a specified account
youneedabudget.getTransactionsByAccount({
"budget_id": "",
"account_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - account_id required
string
: The id of the account - since_date
string
: If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). - type
string
(values: uncategorized, unapproved): If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output TransactionsResponse
getCategories
Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
youneedabudget.getCategories({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output CategoriesResponse
getCategoryById
Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
youneedabudget.getCategoryById({
"budget_id": "",
"category_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - category_id required
string
: The id of the category
- budget_id required
Output
- output CategoryResponse
getTransactionsByCategory
Returns all transactions for a specified category
youneedabudget.getTransactionsByCategory({
"budget_id": "",
"category_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - category_id required
string
: The id of the category - since_date
string
: If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). - type
string
(values: uncategorized, unapproved): If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output HybridTransactionsResponse
getBudgetMonths
Returns all budget months
youneedabudget.getBudgetMonths({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output MonthSummariesResponse
getBudgetMonth
Returns a single budget month
youneedabudget.getBudgetMonth({
"budget_id": "",
"month": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - month required
string
: The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC))
- budget_id required
Output
- output MonthDetailResponse
getMonthCategoryById
Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
youneedabudget.getMonthCategoryById({
"budget_id": "",
"month": "",
"category_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - month required
string
: The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC)) - category_id required
string
: The id of the category
- budget_id required
Output
- output CategoryResponse
updateMonthCategory
Update a category for a specific month. Only budgeted
amount can be updated.
youneedabudget.updateMonthCategory({
"budget_id": "",
"month": "",
"category_id": "",
"data": {
"category": {
"budgeted": 0
}
}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - month required
string
: The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC)) - category_id required
string
: The id of the category - data required SaveMonthCategoryWrapper
- budget_id required
Output
- output SaveCategoryResponse
getPayeeLocations
Returns all payee locations
youneedabudget.getPayeeLocations({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget).
- budget_id required
Output
- output PayeeLocationsResponse
getPayeeLocationById
Returns a single payee location
youneedabudget.getPayeeLocationById({
"budget_id": "",
"payee_location_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - payee_location_id required
string
: id of payee location
- budget_id required
Output
- output PayeeLocationResponse
getPayees
Returns all payees
youneedabudget.getPayees({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output PayeesResponse
getPayeeById
Returns a single payee
youneedabudget.getPayeeById({
"budget_id": "",
"payee_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - payee_id required
string
: The id of the payee
- budget_id required
Output
- output PayeeResponse
getPayeeLocationsByPayee
Returns all payee locations for a specified payee
youneedabudget.getPayeeLocationsByPayee({
"budget_id": "",
"payee_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - payee_id required
string
: id of payee
- budget_id required
Output
- output PayeeLocationsResponse
getTransactionsByPayee
Returns all transactions for a specified payee
youneedabudget.getTransactionsByPayee({
"budget_id": "",
"payee_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - payee_id required
string
: The id of the payee - since_date
string
: If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). - type
string
(values: uncategorized, unapproved): If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output HybridTransactionsResponse
getScheduledTransactions
Returns all scheduled transactions
youneedabudget.getScheduledTransactions({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
getScheduledTransactionById
Returns a single scheduled transaction
youneedabudget.getScheduledTransactionById({
"budget_id": "",
"scheduled_transaction_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - scheduled_transaction_id required
string
: The id of the scheduled transaction
- budget_id required
Output
- output ScheduledTransactionResponse
getBudgetSettingsById
Returns settings for a budget
youneedabudget.getBudgetSettingsById({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget).
- budget_id required
Output
- output BudgetSettingsResponse
getTransactions
Returns budget transactions
youneedabudget.getTransactions({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - since_date
string
: If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). - type
string
(values: uncategorized, unapproved): If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. - last_knowledge_of_server
integer
: The starting server knowledge. If provided, only entities that have changed sincelast_knowledge_of_server
will be included.
- budget_id required
Output
- output TransactionsResponse
updateTransactions
Updates multiple transactions, by id
or import_id
.
youneedabudget.updateTransactions({
"budget_id": "",
"data": {
"transactions": []
}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - data required UpdateTransactionsWrapper
- budget_id required
Output
- output SaveTransactionsResponse
createTransaction
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.
youneedabudget.createTransaction({
"budget_id": "",
"data": {}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - data required SaveTransactionsWrapper
- budget_id required
Output
- output SaveTransactionsResponse
bulkCreateTransactions
Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
youneedabudget.bulkCreateTransactions({
"budget_id": "",
"transactions": {
"transactions": []
}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - transactions required BulkTransactions
- budget_id required
Output
- output BulkResponse
importTransactions
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.
youneedabudget.importTransactions({
"budget_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget).
- budget_id required
Output
- output TransactionsImportResponse
getTransactionById
Returns a single transaction
youneedabudget.getTransactionById({
"budget_id": "",
"transaction_id": ""
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - transaction_id required
string
: The id of the transaction
- budget_id required
Output
- output TransactionResponse
updateTransaction
Updates a single transaction
youneedabudget.updateTransaction({
"budget_id": "",
"transaction_id": "",
"data": {
"transaction": {
"account_id": "",
"date": "",
"amount": 0
}
}
}, context)
Input
- input
object
- budget_id 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.youneedabudget.com/#oauth-default-budget). - transaction_id required
string
: The id of the transaction - data required SaveTransactionWrapper
- budget_id required
Output
- output TransactionResponse
getUser
Returns authenticated user information
youneedabudget.getUser(null, context)
Input
This action has no parameters
Output
- output UserResponse
Definitions
Account
- Account
object
- balance required
integer
: The current balance of the account in milliunits format - cleared_balance required
integer
: The current cleared balance of the account in milliunits format - closed required
boolean
: Whether this account is closed or not - deleted required
boolean
: Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. - id required
string
- name required
string
- note
string
- on_budget required
boolean
: Whether this account is on budget or not - transfer_payee_id required
string
: The payee id which should be used when transferring to this account - type required
string
(values: checking, savings, cash, creditCard, lineOfCredit, otherAsset, otherLiability, payPal, merchantAccount, investmentAccount, mortgage): The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. - uncleared_balance required
integer
: The current uncleared balance of the account in milliunits format
- balance required
AccountResponse
- AccountResponse
object
- data required
object
- account required Account
- data required
AccountsResponse
- AccountsResponse
object
- data required
object
- accounts required
array
- items Account
- server_knowledge required
integer
: The knowledge of the server
- accounts required
- data required
BudgetDetail
- BudgetDetail
- accounts
array
: The budget accounts (only included ifinclude_accounts=true
specified as query parameter)- items Account
- currency_format CurrencyFormat
- date_format DateFormat
- first_month
string
: The earliest budget month - id required
string
- last_modified_on
string
: The last time any changes were made to the budget from either a web or mobile client - last_month
string
: The latest budget month - name required
string
- accounts
array
- items Account
- categories
array
- items Category
- category_groups
array
- items CategoryGroup
- months
array
- items MonthDetail
- payee_locations
array
- items PayeeLocation
- payees
array
- items Payee
- scheduled_subtransactions
array
- items ScheduledSubTransaction
- scheduled_transactions
array
- subtransactions
array
- items SubTransaction
- transactions
array
- items TransactionSummary
- accounts
BudgetDetailResponse
- BudgetDetailResponse
object
- data required
object
- budget required BudgetDetail
- server_knowledge required
integer
: The knowledge of the server
- data required
BudgetSettings
- BudgetSettings
object
- currency_format required CurrencyFormat
- date_format required DateFormat
BudgetSettingsResponse
- BudgetSettingsResponse
object
- data required
object
- settings required BudgetSettings
- data required
BudgetSummary
- BudgetSummary
object
- accounts
array
: The budget accounts (only included ifinclude_accounts=true
specified as query parameter)- items Account
- currency_format CurrencyFormat
- date_format DateFormat
- first_month
string
: The earliest budget month - id required
string
- last_modified_on
string
: The last time any changes were made to the budget from either a web or mobile client - last_month
string
: The latest budget month - name required
string
- accounts
BudgetSummaryResponse
- BudgetSummaryResponse
object
- data required
object
- budgets required
array
- items BudgetSummary
- default_budget BudgetSummary
- budgets required
- data required
BulkResponse
- BulkResponse
object
- data required
object
- bulk required
object
- duplicate_import_ids required
array
: If any Transactions were not created because they had animport_id
matching a transaction already on the same account, the specified import_id(s) will be included in this list.- items
string
- items
- transaction_ids required
array
: The list of Transaction ids that were created.- items
string
- items
- duplicate_import_ids required
- bulk required
- data required
BulkTransactions
- BulkTransactions
object
- transactions required
array
- items SaveTransaction
- transactions required
CategoriesResponse
- CategoriesResponse
object
- data required
object
- category_groups required
array
- server_knowledge required
integer
: The knowledge of the server
- category_groups required
- data required
Category
- Category
object
- activity required
integer
: Activity amount in milliunits format - balance required
integer
: Balance in milliunits format - budgeted required
integer
: Budgeted amount in milliunits format - category_group_id required
string
- deleted required
boolean
: Whether or not the category has been deleted. Deleted categories will only be included in delta requests. - goal_creation_month
string
: The month a goal was created - goal_percentage_complete
integer
: The percentage completion of the goal - goal_target
integer
: The goal target amount in milliunits - goal_target_month
string
: The target month for the goal to be completed. Only some goal types specify this date. - goal_type
string
(values: TB, TBD, MF, NEED, ): 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') - hidden required
boolean
: Whether or not the category is hidden - id required
string
- name required
string
- note
string
- original_category_group_id
string
: If category is hidden this is the id of the category group it originally belonged to before it was hidden.
- activity required
CategoryGroup
- CategoryGroup
object
- deleted required
boolean
: Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. - hidden required
boolean
: Whether or not the category group is hidden - id required
string
- name required
string
- deleted required
CategoryGroupWithCategories
- CategoryGroupWithCategories
- deleted required
boolean
: Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. - hidden required
boolean
: Whether or not the category group is hidden - id required
string
- name required
string
- categories required
array
: Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).- items Category
- deleted required
CategoryResponse
- CategoryResponse
object
- data required
object
- category required Category
- data required
CurrencyFormat
- CurrencyFormat
object
: The currency format setting for the budget. In some cases the format will not be available and will be specified as null.- currency_symbol required
string
- decimal_digits required
integer
- decimal_separator required
string
- display_symbol required
boolean
- example_format required
string
- group_separator required
string
- iso_code required
string
- symbol_first required
boolean
- currency_symbol required
DateFormat
- DateFormat
object
: The date format setting for the budget. In some cases the format will not be available and will be specified as null.- format required
string
- format required
ErrorDetail
- ErrorDetail
object
- detail required
string
- id required
string
- name required
string
- detail required
ErrorResponse
- ErrorResponse
object
- error required ErrorDetail
HybridTransaction
- HybridTransaction
- account_id required
string
- amount required
integer
: The transaction amount in milliunits format - approved required
boolean
: Whether or not the transaction is approved - category_id
string
- cleared required
string
(values: cleared, uncleared, reconciled): The cleared status of the transaction - date required
string
: The transaction date in ISO format (e.g. 2016-12-01) - deleted required
boolean
: Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The transaction flag - id required
string
- import_id
string
: 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'. - matched_transaction_id
string
: If transaction is matched, the id of the matched transaction - memo
string
- payee_id
string
- transfer_account_id
string
: If a transfer transaction, the account to which it transfers - transfer_transaction_id
string
: If a transfer transaction, the id of transaction on the other side of the transfer - account_name required
string
- category_name
string
- parent_transaction_id
string
: For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. - payee_name
string
- type required
string
(values: transaction, subtransaction): Whether the hybrid transaction represents a regular transaction or a subtransaction
- account_id required
HybridTransactionsResponse
- HybridTransactionsResponse
object
- data required
object
- transactions required
array
- items HybridTransaction
- transactions required
- data required
MonthDetail
- MonthDetail
- activity required
integer
: The total amount of transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' - age_of_money
integer
: The Age of Money as of the month - budgeted required
integer
: The total amount budgeted in the month - deleted required
boolean
: Whether or not the month has been deleted. Deleted months will only be included in delta requests. - income required
integer
: The total amount of transactions categorized to 'Inflow: To be Budgeted' in the month - month required
string
- note
string
- to_be_budgeted required
integer
: The available amount for 'To be Budgeted' - categories required
array
: The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.- items Category
- activity required
MonthDetailResponse
- MonthDetailResponse
object
- data required
object
- month required MonthDetail
- data required
MonthSummariesResponse
- MonthSummariesResponse
object
- data required
object
- months required
array
- items MonthSummary
- server_knowledge required
integer
: The knowledge of the server
- months required
- data required
MonthSummary
- MonthSummary
object
- activity required
integer
: The total amount of transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' - age_of_money
integer
: The Age of Money as of the month - budgeted required
integer
: The total amount budgeted in the month - deleted required
boolean
: Whether or not the month has been deleted. Deleted months will only be included in delta requests. - income required
integer
: The total amount of transactions categorized to 'Inflow: To be Budgeted' in the month - month required
string
- note
string
- to_be_budgeted required
integer
: The available amount for 'To be Budgeted'
- activity required
Payee
- Payee
object
- deleted required
boolean
: Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. - id required
string
- name required
string
- transfer_account_id
string
: If a transfer payee, theaccount_id
to which this payee transfers to
- deleted required
PayeeLocation
- PayeeLocation
object
- deleted required
boolean
: Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. - id required
string
- latitude required
string
- longitude required
string
- payee_id required
string
- deleted required
PayeeLocationResponse
- PayeeLocationResponse
object
- data required
object
- payee_location required PayeeLocation
- data required
PayeeLocationsResponse
- PayeeLocationsResponse
object
- data required
object
- payee_locations required
array
- items PayeeLocation
- payee_locations required
- data required
PayeeResponse
- PayeeResponse
object
- data required
object
- payee required Payee
- data required
PayeesResponse
- PayeesResponse
object
- data required
object
- payees required
array
- items Payee
- server_knowledge required
integer
: The knowledge of the server
- payees required
- data required
SaveAccount
- SaveAccount
object
- balance required
integer
: The current balance of the account in milliunits format - name required
string
: The name of the account - type required
string
(values: checking, savings, creditCard, cash, lineOfCredit, otherAsset, otherLiability): The account type
- balance required
SaveAccountWrapper
- SaveAccountWrapper
object
- account required SaveAccount
SaveCategoryResponse
- SaveCategoryResponse
object
- data required
object
- category required Category
- server_knowledge required
integer
: The knowledge of the server
- data required
SaveMonthCategory
- SaveMonthCategory
object
- budgeted required
integer
: Budgeted amount in milliunits format
- budgeted required
SaveMonthCategoryWrapper
- SaveMonthCategoryWrapper
object
- category required SaveMonthCategory
SaveSubTransaction
- SaveSubTransaction
object
- amount required
integer
: The subtransaction amount in milliunits format. - category_id
string
: The category for the subtransaction. Credit Card Payment categories are not permitted and will be ignored if supplied. - memo
string
- payee_id
string
: The payee for the subtransaction. - payee_name
string
: The payee name. If apayee_name
value is provided andpayee_id
has a null value, thepayee_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.
- amount required
SaveTransaction
- SaveTransaction
object
- account_id required
string
- amount required
integer
: The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. - approved
boolean
: Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. - category_id
string
: The category for the transaction. To configure a split transaction, you can specify null forcategory_id
and provide asubtransactions
array as part of the transaction object. If an existing transaction is a split, thecategory_id
cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. - cleared
string
(values: cleared, uncleared, reconciled): The cleared status of the transaction - date required
string
: 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. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The transaction flag - import_id
string
: If specified, the new transaction will be assigned thisimport_id
and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.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.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). - memo
string
- payee_id
string
: 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 astranfer_payee_id
on the account resource. - payee_name
string
: The payee name. If apayee_name
value is provided andpayee_id
has a null value, thepayee_name
value will be used to resolve the payee by either (1) a matching payee rename rule (only ifimport_id
is also specified) or (2) a payee with the same name or (3) creation of a new payee. - subtransactions
array
: An array of subtransactions to configure a transaction as a split. Updatingsubtransactions
on an existing split transaction is not supported.- items SaveSubTransaction
- account_id required
SaveTransactionWrapper
- SaveTransactionWrapper
object
- transaction required SaveTransaction
SaveTransactionsResponse
- SaveTransactionsResponse
object
- data required
object
- duplicate_import_ids
array
: If multiple transactions were specified, a list of import_ids that were not created because of an existingimport_id
found on the same account- items
string
- items
- server_knowledge required
integer
: The knowledge of the server - transaction TransactionDetail
- transaction_ids required
array
: The transaction ids that were saved- items
string
- items
- transactions
array
: If multiple transactions were specified, the transactions that were saved- items TransactionDetail
- duplicate_import_ids
- data required
SaveTransactionsWrapper
- SaveTransactionsWrapper
object
- transaction SaveTransaction
- transactions
array
- items SaveTransaction
ScheduledSubTransaction
- ScheduledSubTransaction
object
- amount required
integer
: The scheduled subtransaction amount in milliunits format - category_id
string
- deleted required
boolean
: Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. - id required
string
- memo
string
- payee_id
string
- scheduled_transaction_id required
string
- transfer_account_id
string
: If a transfer, the account_id which the scheduled subtransaction transfers to
- amount required
ScheduledTransactionDetail
- ScheduledTransactionDetail
- account_id required
string
- amount required
integer
: The scheduled transaction amount in milliunits format - category_id
string
- date_first required
string
: The first date for which the Scheduled Transaction was scheduled. - date_next required
string
: The next date for which the Scheduled Transaction is scheduled. - deleted required
boolean
: Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The scheduled transaction flag - frequency required
string
(values: never, daily, weekly, everyOtherWeek, twiceAMonth, every4Weeks, monthly, everyOtherMonth, every3Months, every4Months, twiceAYear, yearly, everyOtherYear) - id required
string
- memo
string
- payee_id
string
- transfer_account_id
string
: If a transfer, the account_id which the scheduled transaction transfers to - account_name required
string
- category_name
string
- payee_name
string
- subtransactions required
array
: If a split scheduled transaction, the subtransactions.- items ScheduledSubTransaction
- account_id required
ScheduledTransactionResponse
- ScheduledTransactionResponse
object
- data required
object
- scheduled_transaction required ScheduledTransactionDetail
- data required
ScheduledTransactionSummary
- ScheduledTransactionSummary
object
- account_id required
string
- amount required
integer
: The scheduled transaction amount in milliunits format - category_id
string
- date_first required
string
: The first date for which the Scheduled Transaction was scheduled. - date_next required
string
: The next date for which the Scheduled Transaction is scheduled. - deleted required
boolean
: Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The scheduled transaction flag - frequency required
string
(values: never, daily, weekly, everyOtherWeek, twiceAMonth, every4Weeks, monthly, everyOtherMonth, every3Months, every4Months, twiceAYear, yearly, everyOtherYear) - id required
string
- memo
string
- payee_id
string
- transfer_account_id
string
: If a transfer, the account_id which the scheduled transaction transfers to
- account_id required
ScheduledTransactionsResponse
- ScheduledTransactionsResponse
object
- data required
object
- scheduled_transactions required
array
- server_knowledge required
integer
: The knowledge of the server
- scheduled_transactions required
- data required
SubTransaction
- SubTransaction
object
- amount required
integer
: The subtransaction amount in milliunits format - category_id
string
- category_name
string
- deleted required
boolean
: Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. - id required
string
- memo
string
- payee_id
string
- payee_name
string
- transaction_id required
string
- transfer_account_id
string
: If a transfer, the account_id which the subtransaction transfers to - transfer_transaction_id
string
: If a transfer, the id of transaction on the other side of the transfer
- amount required
TransactionDetail
- TransactionDetail
- account_id required
string
- amount required
integer
: The transaction amount in milliunits format - approved required
boolean
: Whether or not the transaction is approved - category_id
string
- cleared required
string
(values: cleared, uncleared, reconciled): The cleared status of the transaction - date required
string
: The transaction date in ISO format (e.g. 2016-12-01) - deleted required
boolean
: Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The transaction flag - id required
string
- import_id
string
: 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'. - matched_transaction_id
string
: If transaction is matched, the id of the matched transaction - memo
string
- payee_id
string
- transfer_account_id
string
: If a transfer transaction, the account to which it transfers - transfer_transaction_id
string
: If a transfer transaction, the id of transaction on the other side of the transfer - account_name required
string
- category_name
string
- payee_name
string
- subtransactions required
array
: If a split transaction, the subtransactions.- items SubTransaction
- account_id required
TransactionResponse
- TransactionResponse
object
- data required
object
- transaction required TransactionDetail
- data required
TransactionSummary
- TransactionSummary
object
- account_id required
string
- amount required
integer
: The transaction amount in milliunits format - approved required
boolean
: Whether or not the transaction is approved - category_id
string
- cleared required
string
(values: cleared, uncleared, reconciled): The cleared status of the transaction - date required
string
: The transaction date in ISO format (e.g. 2016-12-01) - deleted required
boolean
: Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The transaction flag - id required
string
- import_id
string
: 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'. - matched_transaction_id
string
: If transaction is matched, the id of the matched transaction - memo
string
- payee_id
string
- transfer_account_id
string
: If a transfer transaction, the account to which it transfers - transfer_transaction_id
string
: If a transfer transaction, the id of transaction on the other side of the transfer
- account_id required
TransactionsImportResponse
- TransactionsImportResponse
object
- data required
object
- transaction_ids required
array
: The list of transaction ids that were imported.- items
string
- items
- transaction_ids required
- data required
TransactionsResponse
- TransactionsResponse
object
- data required
object
- server_knowledge required
integer
: The knowledge of the server - transactions required
array
- items TransactionDetail
- server_knowledge required
- data required
UpdateTransaction
- UpdateTransaction
- id required
string
- account_id required
string
- amount required
integer
: The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. - approved
boolean
: Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. - category_id
string
: The category for the transaction. To configure a split transaction, you can specify null forcategory_id
and provide asubtransactions
array as part of the transaction object. If an existing transaction is a split, thecategory_id
cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. - cleared
string
(values: cleared, uncleared, reconciled): The cleared status of the transaction - date required
string
: 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. - flag_color
string
(values: red, orange, yellow, green, blue, purple, ): The transaction flag - import_id
string
: If specified, the new transaction will be assigned thisimport_id
and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.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.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). - memo
string
- payee_id
string
: 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 astranfer_payee_id
on the account resource. - payee_name
string
: The payee name. If apayee_name
value is provided andpayee_id
has a null value, thepayee_name
value will be used to resolve the payee by either (1) a matching payee rename rule (only ifimport_id
is also specified) or (2) a payee with the same name or (3) creation of a new payee. - subtransactions
array
: An array of subtransactions to configure a transaction as a split. Updatingsubtransactions
on an existing split transaction is not supported.- items SaveSubTransaction
- id required
UpdateTransactionsWrapper
- UpdateTransactionsWrapper
object
- transactions required
array
- items UpdateTransaction
- transactions required
User
- User
object
- id required
string
- id required
UserResponse
- UserResponse
object
- data required
object
- user required User
- data required