Module ynab
API
Definitions
![](https://bcentral-dev-packageicons.azureedge.net/images/ballerinax_ynab_1.3.0.png)
ballerinax/ynab Ballerina library
Overview
This is a generated connector for YNAB API v1.0.0 OpenAPI specification. YNAB 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
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create YNAB account
- Obtain tokens
- Log into YNAB account by visiting https://app.youneedabudget.com/users/authentication
- Obtain the
access token
following this guide
Quickstart
To use the YNAB connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/ynab
module into the Ballerina project.
import ballerinax/ynab;
Step 2: Create a new connector instance
Create a ynab:ClientConfig
with the access token
obtained, and initialize the connector with it.
ynab:ClientConfig clientConfig = { auth: { token: <ACCESS_TOKEN> } }; ynab:Client baseClient = check new Client(clientConfig);
Step 3: Invoke connector operation
-
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example on how to return a budgets list with summary information using the connector.
List budgets
public function main() { ynab:BudgetSummaryResponse|error response = baseClient->getBudgets(); if (response is ynab:BudgetSummaryResponse) { log:printInfo(response.toString()); } else { log:printError(response.message()); } }
-
Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
ynab: Client![](/images/permalink.svg)
This is a generated connector for YNAB API v1.0.0 OpenAPI specification. YNAB 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
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a YNAB account and obtain tokens by following this guide.
init (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.youneedabudget.com/v1" - URL of the target service
getUser![](/images/permalink.svg)
function getUser() returns UserResponse|error
User info
Return Type
- UserResponse|error - The user info
getBudgets![](/images/permalink.svg)
function getBudgets(boolean? includeAccounts) returns BudgetSummaryResponse|error
List budgets
Parameters
- includeAccounts boolean? (default ()) - Whether to include the list of budget accounts
Return Type
- BudgetSummaryResponse|error - The list of budgets
getBudgetById![](/images/permalink.svg)
function getBudgetById(string budgetId, int? lastKnowledgeOfServer) returns BudgetDetailResponse|error
Single budget
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- BudgetDetailResponse|error - The requested budget
getBudgetSettingsById![](/images/permalink.svg)
function getBudgetSettingsById(string budgetId) returns BudgetSettingsResponse|error
Budget Settings
Parameters
- budgetId 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).
Return Type
- BudgetSettingsResponse|error - The requested budget settings
getAccounts![](/images/permalink.svg)
function getAccounts(string budgetId, int? lastKnowledgeOfServer) returns AccountsResponse|error
Account list
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- AccountsResponse|error - The list of requested accounts
createAccount![](/images/permalink.svg)
function createAccount(string budgetId, byte[] payload) returns AccountResponse|error
Create a new account
Parameters
- budgetId 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)
- payload byte[] - The account to create.
Return Type
- AccountResponse|error - The account was successfully created
getAccountById![](/images/permalink.svg)
function getAccountById(string budgetId, string accountId) returns AccountResponse|error
Single account
Parameters
- budgetId 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).
- accountId string - The id of the account
Return Type
- AccountResponse|error - The requested account
getCategories![](/images/permalink.svg)
function getCategories(string budgetId, int? lastKnowledgeOfServer) returns CategoriesResponse|error
List categories
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- CategoriesResponse|error - The categories grouped by category group
getCategoryById![](/images/permalink.svg)
function getCategoryById(string budgetId, string categoryId) returns CategoryResponse|error
Single category
Parameters
- budgetId 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).
- categoryId string - The id of the category
Return Type
- CategoryResponse|error - The requested category
getMonthCategoryById![](/images/permalink.svg)
function getMonthCategoryById(string budgetId, string month, string categoryId) returns CategoryResponse|error
Single category for a specific budget month
Parameters
- budgetId 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 string - The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC))
- categoryId string - The id of the category
Return Type
- CategoryResponse|error - The requested month category
updateMonthCategory![](/images/permalink.svg)
function updateMonthCategory(string budgetId, string month, string categoryId, byte[] payload) returns SaveCategoryResponse|error
Update a category for a specific month
Parameters
- budgetId 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 string - The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC))
- categoryId string - The id of the category
- payload byte[] - The category to update. Only
budgeted
amount can be updated and any other fields specified will be ignored.
Return Type
- SaveCategoryResponse|error - The month category was successfully updated
getPayees![](/images/permalink.svg)
function getPayees(string budgetId, int? lastKnowledgeOfServer) returns PayeesResponse|error
List payees
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- PayeesResponse|error - The requested list of payees
getPayeeById![](/images/permalink.svg)
function getPayeeById(string budgetId, string payeeId) returns PayeeResponse|error
Single payee
Parameters
- budgetId 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).
- payeeId string - The id of the payee
Return Type
- PayeeResponse|error - The requested payee
getPayeeLocations![](/images/permalink.svg)
function getPayeeLocations(string budgetId) returns PayeeLocationsResponse|error
List payee locations
Parameters
- budgetId 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).
Return Type
- PayeeLocationsResponse|error - The list of payee locations
getPayeeLocationById![](/images/permalink.svg)
function getPayeeLocationById(string budgetId, string payeeLocationId) returns PayeeLocationResponse|error
Single payee location
Parameters
- budgetId 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).
- payeeLocationId string - id of payee location
Return Type
- PayeeLocationResponse|error - The payee location
getPayeeLocationsByPayee![](/images/permalink.svg)
function getPayeeLocationsByPayee(string budgetId, string payeeId) returns PayeeLocationsResponse|error
List locations for a payee
Parameters
- budgetId 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).
- payeeId string - id of payee
Return Type
- PayeeLocationsResponse|error - The list of requested payee locations
getBudgetMonths![](/images/permalink.svg)
function getBudgetMonths(string budgetId, int? lastKnowledgeOfServer) returns MonthSummariesResponse|error
List budget months
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- MonthSummariesResponse|error - The list of budget months
getBudgetMonth![](/images/permalink.svg)
function getBudgetMonth(string budgetId, string month) returns MonthDetailResponse|error
Single budget month
Parameters
- budgetId 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 string - The budget month in ISO format (e.g. 2016-12-01) ("current" can also be used to specify the current calendar month (UTC))
Return Type
- MonthDetailResponse|error - The budget month detail
getTransactions![](/images/permalink.svg)
function getTransactions(string budgetId, string? sinceDate, string? 'type, int? lastKnowledgeOfServer) returns TransactionsResponse|error
List transactions
Parameters
- budgetId 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).
- sinceDate string? (default ()) - 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? (default ()) - If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- TransactionsResponse|error - The list of requested transactions
createTransaction![](/images/permalink.svg)
function createTransaction(string budgetId, byte[] payload) returns SaveTransactionsResponse|error
Create a single transaction or multiple transactions
Parameters
- budgetId 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).
- payload byte[] - 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 oftransactions
. It is expected that you will only provide a value for one of these objects.
Return Type
- SaveTransactionsResponse|error - The transaction or transactions were successfully created
updateTransactions![](/images/permalink.svg)
function updateTransactions(string budgetId, byte[] payload) returns SaveTransactionsResponse|error
Update multiple transactions
Parameters
- budgetId 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).
- payload byte[] - The transactions to update. Each transaction must have either an
id
orimport_id
specified. Ifid
is specified as null animport_id
value can be provided which will allow transaction(s) to be updated by theirimport_id
. If anid
is specified, it will always be used for lookup.
Return Type
- SaveTransactionsResponse|error - The transactions were successfully updated
importTransactions![](/images/permalink.svg)
function importTransactions(string budgetId) returns TransactionsImportResponse|error
Import transactions
Parameters
- budgetId 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).
Return Type
- TransactionsImportResponse|error - The request was successful but there were no transactions to import
getTransactionById![](/images/permalink.svg)
function getTransactionById(string budgetId, string transactionId) returns TransactionResponse|error
Single transaction
Parameters
- budgetId 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).
- transactionId string - The id of the transaction
Return Type
- TransactionResponse|error - The requested transaction
updateTransaction![](/images/permalink.svg)
function updateTransaction(string budgetId, string transactionId, byte[] payload) returns TransactionResponse|error
Updates an existing transaction
Parameters
- budgetId 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).
- transactionId string - The id of the transaction
- payload byte[] - The transaction to update
Return Type
- TransactionResponse|error - The transaction was successfully updated
bulkCreateTransactions![](/images/permalink.svg)
function bulkCreateTransactions(string budgetId, byte[] payload) returns BulkResponse|error
Bulk create transactions
Parameters
- budgetId 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).
- payload byte[] - The list of transactions to create
Return Type
- BulkResponse|error - The bulk request was processed successfully
getTransactionsByAccount![](/images/permalink.svg)
function getTransactionsByAccount(string budgetId, string accountId, string? sinceDate, string? 'type, int? lastKnowledgeOfServer) returns TransactionsResponse|error
List account transactions
Parameters
- budgetId 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).
- accountId string - The id of the account
- sinceDate string? (default ()) - 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? (default ()) - If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- TransactionsResponse|error - The list of requested transactions
getTransactionsByCategory![](/images/permalink.svg)
function getTransactionsByCategory(string budgetId, string categoryId, string? sinceDate, string? 'type, int? lastKnowledgeOfServer) returns HybridTransactionsResponse|error
List category transactions
Parameters
- budgetId 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).
- categoryId string - The id of the category
- sinceDate string? (default ()) - 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? (default ()) - If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- HybridTransactionsResponse|error - The list of requested transactions
getTransactionsByPayee![](/images/permalink.svg)
function getTransactionsByPayee(string budgetId, string payeeId, string? sinceDate, string? 'type, int? lastKnowledgeOfServer) returns HybridTransactionsResponse|error
List payee transactions
Parameters
- budgetId 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).
- payeeId string - The id of the payee
- sinceDate string? (default ()) - 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? (default ()) - If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- HybridTransactionsResponse|error - The list of requested transactions
getScheduledTransactions![](/images/permalink.svg)
function getScheduledTransactions(string budgetId, int? lastKnowledgeOfServer) returns ScheduledTransactionsResponse|error
List scheduled transactions
Parameters
- budgetId 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).
- lastKnowledgeOfServer int? (default ()) - The starting server knowledge. If provided, only entities that have changed since
last_knowledge_of_server
will be included.
Return Type
- ScheduledTransactionsResponse|error - The list of requested scheduled transactions
getScheduledTransactionById![](/images/permalink.svg)
function getScheduledTransactionById(string budgetId, string scheduledTransactionId) returns ScheduledTransactionResponse|error
Single scheduled transaction
Parameters
- budgetId 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).
- scheduledTransactionId string - The id of the scheduled transaction
Return Type
- ScheduledTransactionResponse|error - The requested Scheduled Transaction
Records![](/images/permalink.svg)
ynab: Account![](/images/permalink.svg)
Fields
- id string -
- name string -
- 'type string - The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
- on_budget boolean - Whether this account is on budget or not
- closed boolean - Whether this account is closed or not
- note string? -
- balance int - The current balance of the account in milliunits format
- cleared_balance int - The current cleared balance of the account in milliunits format
- uncleared_balance int - The current uncleared balance of the account in milliunits format
- transfer_payee_id string - The payee id which should be used when transferring to this account
- direct_import_linked boolean? - Whether or not the account is linked to a financial institution for automatic transaction import.
- direct_import_in_error boolean? - 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.
- deleted boolean - Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
ynab: AccountResponse![](/images/permalink.svg)
Fields
- data AccountresponseData -
ynab: AccountresponseData![](/images/permalink.svg)
Fields
- account Account -
ynab: AccountsResponse![](/images/permalink.svg)
Fields
- data AccountsresponseData -
ynab: AccountsresponseData![](/images/permalink.svg)
Fields
- accounts Account[] -
- server_knowledge int - The knowledge of the server
ynab: BudgetDetail![](/images/permalink.svg)
Fields
- Fields Included from *BudgetSummary
- id string
- name string
- last_modified_on string
- first_month string
- last_month string
- date_format DateFormat
- currency_format CurrencyFormat
- accounts Account[]
- anydata...
- accounts Account[]? -
- payees Payee[]? -
- payee_locations PayeeLocation[]? -
- category_groups CategoryGroup[]? -
- categories Category[]? -
- months MonthDetail[]? -
- transactions TransactionSummary[]? -
- subtransactions SubTransaction[]? -
- scheduled_transactions ScheduledTransactionSummary[]? -
- scheduled_subtransactions ScheduledSubTransaction[]? -
ynab: BudgetDetailResponse![](/images/permalink.svg)
Fields
- data BudgetdetailresponseData -
ynab: BudgetdetailresponseData![](/images/permalink.svg)
Fields
- budget BudgetDetail -
- server_knowledge int - The knowledge of the server
ynab: BudgetSettings![](/images/permalink.svg)
Fields
- date_format DateFormat - The date format setting for the budget. In some cases the format will not be available and will be specified as null.
- currency_format CurrencyFormat - The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
ynab: BudgetSettingsResponse![](/images/permalink.svg)
Fields
- data BudgetsettingsresponseData -
ynab: BudgetsettingsresponseData![](/images/permalink.svg)
Fields
- settings BudgetSettings -
ynab: BudgetSummary![](/images/permalink.svg)
Fields
- id string -
- name string -
- last_modified_on string? - The last time any changes were made to the budget from either a web or mobile client
- first_month string? - The earliest budget month
- last_month string? - The latest budget month
- date_format DateFormat? - The date format setting for the budget. In some cases the format will not be available and will be specified as null.
- currency_format CurrencyFormat? - The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
- accounts Account[]? - The budget accounts (only included if
include_accounts=true
specified as query parameter)
ynab: BudgetSummaryResponse![](/images/permalink.svg)
Fields
- data BudgetsummaryresponseData -
ynab: BudgetsummaryresponseData![](/images/permalink.svg)
Fields
- budgets BudgetSummary[] -
- default_budget BudgetSummary? -
ynab: BulkResponse![](/images/permalink.svg)
Fields
- data BulkresponseData -
ynab: BulkresponseData![](/images/permalink.svg)
Fields
- bulk BulkresponseDataBulk -
ynab: BulkresponseDataBulk![](/images/permalink.svg)
Fields
- transaction_ids string[] - The list of Transaction ids that were created.
- duplicate_import_ids string[] - 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.
ynab: BulkTransactions![](/images/permalink.svg)
Fields
- transactions SaveTransaction[] -
ynab: CategoriesResponse![](/images/permalink.svg)
Fields
- data CategoriesresponseData -
ynab: CategoriesresponseData![](/images/permalink.svg)
Fields
- category_groups CategoryGroupWithCategories[] -
- server_knowledge int - The knowledge of the server
ynab: Category![](/images/permalink.svg)
Fields
- id string -
- category_group_id string -
- name string -
- hidden boolean - Whether or not the category is hidden
- 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.
- note string? -
- budgeted int - Budgeted amount in milliunits format
- activity int - Activity amount in milliunits format
- balance int - Balance in milliunits format
- goal_type string? - The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
- goal_creation_month string? - The month a goal was created
- goal_target int? - The goal target amount in milliunits
- goal_target_month string? - The original target month for the goal to be completed. Only some goal types specify this date.
- goal_percentage_complete int? - The percentage completion of the goal
- goal_months_to_budget int? - The number of months, including the current month, left in the current goal period.
- goal_under_funded int? - 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.
- goal_overall_funded int? - The total amount funded towards the goal within the current goal period.
- goal_overall_left int? - The amount of funding still needed to complete the goal within the current goal period.
- deleted boolean - Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
ynab: CategoryGroup![](/images/permalink.svg)
Fields
- id string -
- name string -
- hidden boolean - Whether or not the category group is hidden
- deleted boolean - Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.
ynab: CategoryGroupWithCategories![](/images/permalink.svg)
Fields
- Fields Included from *CategoryGroup
- categories Category[] - Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
ynab: CategoryResponse![](/images/permalink.svg)
Fields
- data CategoryresponseData -
ynab: CategoryresponseData![](/images/permalink.svg)
Fields
- category Category -
ynab: ClientConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
ynab: CurrencyFormat![](/images/permalink.svg)
The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
Fields
- iso_code string - ISO code
- example_format string - Example format
- decimal_digits int - Decimal digits
- decimal_separator string - Decimal separator
- symbol_first boolean - Symbol first
- group_separator string - Group separator
- currency_symbol string - Currency symbol
- display_symbol boolean - Display symbol
ynab: DateFormat![](/images/permalink.svg)
The date format setting for the budget. In some cases the format will not be available and will be specified as null.
Fields
- format string - Date format setting for the budget
ynab: ErrorDetail![](/images/permalink.svg)
Fields
- id string -
- name string -
- detail string -
ynab: ErrorResponse![](/images/permalink.svg)
Fields
- _error ErrorDetail -
ynab: HybridTransaction![](/images/permalink.svg)
Fields
- Fields Included from *TransactionSummary
- 'type string - Whether the hybrid transaction represents a regular transaction or a subtransaction
- 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.
- account_name string -
- payee_name string? -
- category_name string? -
ynab: HybridTransactionsResponse![](/images/permalink.svg)
Fields
ynab: HybridtransactionsresponseData![](/images/permalink.svg)
Fields
- transactions HybridTransaction[] -
ynab: MonthDetail![](/images/permalink.svg)
Fields
- Fields Included from *MonthSummary
- categories Category[] - The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
ynab: MonthDetailResponse![](/images/permalink.svg)
Fields
- data MonthdetailresponseData -
ynab: MonthdetailresponseData![](/images/permalink.svg)
Fields
- month MonthDetail -
ynab: MonthSummariesResponse![](/images/permalink.svg)
Fields
- data MonthsummariesresponseData -
ynab: MonthsummariesresponseData![](/images/permalink.svg)
Fields
- months MonthSummary[] -
- server_knowledge int - The knowledge of the server
ynab: MonthSummary![](/images/permalink.svg)
Fields
- month string -
- note string? -
- income int - The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
- budgeted int - The total amount budgeted in the month
- activity int - The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
- to_be_budgeted int - The available amount for 'Ready to Assign'
- age_of_money int? - The Age of Money as of the month
- deleted boolean - Whether or not the month has been deleted. Deleted months will only be included in delta requests.
ynab: Payee![](/images/permalink.svg)
Fields
- id string -
- name string -
- transfer_account_id string? - If a transfer payee, the
account_id
to which this payee transfers to
- deleted boolean - Whether or not the payee has been deleted. Deleted payees will only be included in delta requests.
ynab: PayeeLocation![](/images/permalink.svg)
Fields
- id string -
- payee_id string -
- latitude string -
- longitude string -
- deleted boolean - Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests.
ynab: PayeeLocationResponse![](/images/permalink.svg)
Fields
- data PayeelocationresponseData -
ynab: PayeelocationresponseData![](/images/permalink.svg)
Fields
- payee_location PayeeLocation -
ynab: PayeeLocationsResponse![](/images/permalink.svg)
Fields
- data PayeelocationsresponseData -
ynab: PayeelocationsresponseData![](/images/permalink.svg)
Fields
- payee_locations PayeeLocation[] -
ynab: PayeeResponse![](/images/permalink.svg)
Fields
- data PayeeresponseData -
ynab: PayeeresponseData![](/images/permalink.svg)
Fields
- payee Payee -
ynab: PayeesResponse![](/images/permalink.svg)
Fields
- data PayeesresponseData -
ynab: PayeesresponseData![](/images/permalink.svg)
Fields
- payees Payee[] -
- server_knowledge int - The knowledge of the server
ynab: SaveAccount![](/images/permalink.svg)
Fields
- name string - The name of the account
- 'type string - The account type
- balance int - The current balance of the account in milliunits format
ynab: SaveAccountWrapper![](/images/permalink.svg)
Fields
- account SaveAccount -
ynab: SaveCategoryResponse![](/images/permalink.svg)
Fields
- data SavecategoryresponseData -
ynab: SavecategoryresponseData![](/images/permalink.svg)
Fields
- category Category -
- server_knowledge int - The knowledge of the server
ynab: SaveMonthCategory![](/images/permalink.svg)
Fields
- budgeted int - Budgeted amount in milliunits format
ynab: SaveMonthCategoryWrapper![](/images/permalink.svg)
Fields
- category SaveMonthCategory -
ynab: SaveSubTransaction![](/images/permalink.svg)
Fields
- amount int - The subtransaction amount in milliunits format.
- payee_id string? - The payee for the subtransaction.
- payee_name string? - The payee name. If a
payee_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.
- category_id string? - The category for the subtransaction. Credit Card Payment categories are not permitted and will be ignored if supplied.
- memo string? -
ynab: SaveTransaction![](/images/permalink.svg)
Fields
- account_id string -
- date 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.
- amount int - The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
- 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 as
tranfer_payee_id
on the account resource.
- payee_name string? - The payee name. If a
payee_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.
- category_id string? - The category for the transaction. To configure a split transaction, you can specify null for
category_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.
- memo string? -
- cleared string? - The cleared status of the transaction
- approved boolean? - Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
- flag_color string? - The transaction flag
- import_id string? - If specified, the new transaction will be assigned this
import_id
and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
- subtransactions SaveSubTransaction[]? - An array of subtransactions to configure a transaction as a split. Updating
subtransactions
on an existing split transaction is not supported.
ynab: SaveTransactionsResponse![](/images/permalink.svg)
Fields
- data SavetransactionsresponseData -
ynab: SavetransactionsresponseData![](/images/permalink.svg)
Fields
- transaction_ids string[] - The transaction ids that were saved
- 'transaction TransactionDetail? -
- transactions TransactionDetail[]? - If multiple transactions were specified, the transactions that were saved
- duplicate_import_ids string[]? - If multiple transactions were specified, a list of import_ids that were not created because of an existing
import_id
found on the same account
- server_knowledge int - The knowledge of the server
ynab: SaveTransactionsWrapper![](/images/permalink.svg)
Fields
- 'transaction SaveTransaction? -
- transactions SaveTransaction[]? -
ynab: SaveTransactionWrapper![](/images/permalink.svg)
Fields
- 'transaction SaveTransaction -
ynab: ScheduledSubTransaction![](/images/permalink.svg)
Fields
- id string -
- scheduled_transaction_id string -
- amount int - The scheduled subtransaction amount in milliunits format
- memo string? -
- payee_id string? -
- category_id string? -
- transfer_account_id string? - If a transfer, the account_id which the scheduled subtransaction transfers to
- deleted boolean - Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests.
ynab: ScheduledTransactionDetail![](/images/permalink.svg)
Fields
- Fields Included from *ScheduledTransactionSummary
- account_name string -
- payee_name string? -
- category_name string? -
- subtransactions ScheduledSubTransaction[] - If a split scheduled transaction, the subtransactions.
ynab: ScheduledTransactionResponse![](/images/permalink.svg)
Fields
ynab: ScheduledtransactionresponseData![](/images/permalink.svg)
Fields
- scheduled_transaction ScheduledTransactionDetail -
ynab: ScheduledTransactionsResponse![](/images/permalink.svg)
Fields
ynab: ScheduledtransactionsresponseData![](/images/permalink.svg)
Fields
- scheduled_transactions ScheduledTransactionDetail[] -
- server_knowledge int - The knowledge of the server
ynab: ScheduledTransactionSummary![](/images/permalink.svg)
Fields
- id string -
- date_first string - The first date for which the Scheduled Transaction was scheduled.
- date_next string - The next date for which the Scheduled Transaction is scheduled.
- frequency string -
- amount int - The scheduled transaction amount in milliunits format
- memo string? -
- flag_color string? - The scheduled transaction flag
- account_id string -
- payee_id string? -
- category_id string? -
- transfer_account_id string? - If a transfer, the account_id which the scheduled transaction transfers to
- deleted boolean - Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
ynab: SubTransaction![](/images/permalink.svg)
Fields
- id string -
- transaction_id string -
- amount int - The subtransaction amount in milliunits format
- memo string? -
- payee_id string? -
- payee_name string? -
- category_id string? -
- category_name 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
- deleted boolean - Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
ynab: TransactionDetail![](/images/permalink.svg)
Fields
- Fields Included from *TransactionSummary
- account_name string -
- payee_name string? -
- category_name string? -
- subtransactions SubTransaction[] - If a split transaction, the subtransactions.
ynab: TransactionResponse![](/images/permalink.svg)
Fields
- data TransactionresponseData -
ynab: TransactionresponseData![](/images/permalink.svg)
Fields
- 'transaction TransactionDetail -
ynab: TransactionsImportResponse![](/images/permalink.svg)
Fields
ynab: TransactionsimportresponseData![](/images/permalink.svg)
Fields
- transaction_ids string[] - The list of transaction ids that were imported.
ynab: TransactionsResponse![](/images/permalink.svg)
Fields
- data TransactionsresponseData -
ynab: TransactionsresponseData![](/images/permalink.svg)
Fields
- transactions TransactionDetail[] -
- server_knowledge int - The knowledge of the server
ynab: TransactionSummary![](/images/permalink.svg)
Fields
- id string -
- date string - The transaction date in ISO format (e.g. 2016-12-01)
- amount int - The transaction amount in milliunits format
- memo string? -
- cleared string - The cleared status of the transaction
- approved boolean - Whether or not the transaction is approved
- flag_color string? - The transaction flag
- account_id string -
- payee_id string? -
- category_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
- matched_transaction_id string? - If transaction is matched, the id of the matched transaction
- 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'.
- deleted boolean - Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
ynab: UpdateTransaction![](/images/permalink.svg)
Fields
- id string -
- Fields Included from *SaveTransaction
ynab: UpdateTransactionsWrapper![](/images/permalink.svg)
Fields
- transactions UpdateTransaction[] -
ynab: User![](/images/permalink.svg)
Fields
- id string -
ynab: UserResponse![](/images/permalink.svg)
Fields
- data UserresponseData -
ynab: UserresponseData![](/images/permalink.svg)
Fields
- user User -
Import
import ballerinax/ynab;
Metadata
Released date: over 1 year ago
Version: 1.3.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.2.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Finance/Asset Management
Cost/Paid
Contributors
Dependencies