# \TransactionsApi All URIs are relative to *https://api.youneedabudget.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_transaction**](TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions [**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction [**get_transactions**](TransactionsApi.md#get_transactions) | **get** /budgets/{budget_id}/transactions | List transactions [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **get** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **get** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions [**update_transaction**](TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction [**update_transactions**](TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions ## create_transaction > ::models::SaveTransactionsResponse create_transaction(ctx, budget_id, data) Create a single transaction or multiple transactions 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. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transaction or transactions to create. To create a single transaction you can specify a value for the 'transaction' object and to create multiple transactions you can specify an array of 'transactions'. It is expected that you will only provide a value for one of these objects. | ### Return type [**::models::SaveTransactionsResponse**](SaveTransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_transaction_by_id > ::models::TransactionResponse get_transaction_by_id(ctx, budget_id, transaction_id) Single transaction Returns a single transaction ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | **String**| The id of the transaction | ### Return type [**::models::TransactionResponse**](TransactionResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_transactions > ::models::TransactionsResponse get_transactions(ctx, budget_id, optional) List transactions Returns budget transactions ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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) | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **budget_id** | **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**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | ### Return type [**::models::TransactionsResponse**](TransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_transactions_by_account > ::models::TransactionsResponse get_transactions_by_account(ctx, budget_id, account_id, optional) List account transactions Returns all transactions for a specified account ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | **String**| The id of the account | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **budget_id** | **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** | **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**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | ### Return type [**::models::TransactionsResponse**](TransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_transactions_by_category > ::models::HybridTransactionsResponse get_transactions_by_category(ctx, budget_id, category_id, optional) List category transactions Returns all transactions for a specified category ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | **String**| The id of the category | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **budget_id** | **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** | **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**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | ### Return type [**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_transactions_by_payee > ::models::HybridTransactionsResponse get_transactions_by_payee(ctx, budget_id, payee_id, optional) List payee transactions Returns all transactions for a specified payee ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | **String**| The id of the payee | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **budget_id** | **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** | **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**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | ### Return type [**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## update_transaction > ::models::TransactionResponse update_transaction(ctx, budget_id, transaction_id, data) Updates an existing transaction Updates a transaction ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | **String**| The id of the transaction | **data** | [**UpdateTransactionWrapper**](UpdateTransactionWrapper.md)| The transaction to update | ### Return type [**::models::TransactionResponse**](TransactionResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## update_transactions > ::models::UpdateTransactionsResponse update_transactions(ctx, budget_id, data) Update multiple transactions Updates multiple transactions, by 'id' or 'import_id'. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **budget_id** | **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** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. | ### Return type [**::models::UpdateTransactionsResponse**](UpdateTransactionsResponse.md) ### Authorization [bearer](../README.md#bearer) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)