All URIs are relative to https://api.youneedabudget.com/v1
| Method | HTTP request | Description |
|---|---|---|
| create_transaction | POST /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions |
| get_transaction_by_id | GET /budgets/{budget_id}/transactions/{transaction_id} | Single transaction |
| get_transactions | GET /budgets/{budget_id}/transactions | List transactions |
| get_transactions_by_account | GET /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions |
| get_transactions_by_category | GET /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions |
| get_transactions_by_payee | GET /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions |
| import_transactions | POST /budgets/{budget_id}/transactions/import | Import transactions |
| update_transaction | PUT /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction |
| update_transactions | PATCH /budgets/{budget_id}/transactions | Update multiple transactions |
SaveTransactionsResponse create_transaction(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.
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = ynab.SaveTransactionsWrapper() # SaveTransactionsWrapper | 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.
try:
# Create a single transaction or multiple transactions
api_response = api_instance.create_transaction(budget_id, data)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->create_transaction: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | 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. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | The transaction or transactions were successfully created | - |
| 400 | The request could not be understood due to malformed syntax or validation error(s). | - |
| 409 | A transaction on the same account with the same `import_id` already exists. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionResponse get_transaction_by_id(budget_id, transaction_id)
Single transaction
Returns a single transaction
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = 'transaction_id_example' # str | The id of the transaction
try:
# Single transaction
api_response = api_instance.get_transaction_by_id(budget_id, transaction_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->get_transaction_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | str | The id of the transaction |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The requested transaction | - |
| 404 | The transaction was not found | - |
| 0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionsResponse get_transactions(budget_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
List transactions
Returns budget transactions
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = '2013-10-20' # date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). (optional)
type = 'type_example' # str | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. (optional)
last_knowledge_of_server = 56 # int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)
try:
# List transactions
api_response = api_instance.get_transactions(budget_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->get_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
| type | str | If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. | [optional] |
| last_knowledge_of_server | int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The list of requested transactions | - |
| 400 | An error occurred | - |
| 404 | No transactions were found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionsResponse get_transactions_by_account(budget_id, account_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
List account transactions
Returns all transactions for a specified account
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = 'account_id_example' # str | The id of the account
since_date = '2013-10-20' # date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). (optional)
type = 'type_example' # str | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. (optional)
last_knowledge_of_server = 56 # int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)
try:
# List account transactions
api_response = api_instance.get_transactions_by_account(budget_id, account_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->get_transactions_by_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | str | The id of the account | |
| since_date | date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
| type | str | If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. | [optional] |
| last_knowledge_of_server | int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The list of requested transactions | - |
| 404 | No transactions were found | - |
| 0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HybridTransactionsResponse get_transactions_by_category(budget_id, category_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
List category transactions
Returns all transactions for a specified category
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = 'category_id_example' # str | The id of the category
since_date = '2013-10-20' # date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). (optional)
type = 'type_example' # str | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. (optional)
last_knowledge_of_server = 56 # int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)
try:
# List category transactions
api_response = api_instance.get_transactions_by_category(budget_id, category_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->get_transactions_by_category: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | str | The id of the category | |
| since_date | date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
| type | str | If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. | [optional] |
| last_knowledge_of_server | int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The list of requested transactions | - |
| 404 | No transactions were found | - |
| 0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HybridTransactionsResponse get_transactions_by_payee(budget_id, payee_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
List payee transactions
Returns all transactions for a specified payee
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = 'payee_id_example' # str | The id of the payee
since_date = '2013-10-20' # date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). (optional)
type = 'type_example' # str | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. (optional)
last_knowledge_of_server = 56 # int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)
try:
# List payee transactions
api_response = api_instance.get_transactions_by_payee(budget_id, payee_id, since_date=since_date, type=type, last_knowledge_of_server=last_knowledge_of_server)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->get_transactions_by_payee: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | str | The id of the payee | |
| since_date | date | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
| type | str | If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported. | [optional] |
| last_knowledge_of_server | int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The list of requested transactions | - |
| 404 | No transactions were found | - |
| 0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionsImportResponse import_transactions(budget_id)
Import transactions
Imports transactions.
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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)
try:
# Import transactions
api_response = api_instance.import_transactions(budget_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->import_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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) |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful but there were no transactions to import | - |
| 201 | One or more transactions were imported successfully | - |
| 400 | The request could not be understood due to malformed syntax or validation error(s) | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionResponse update_transaction(budget_id, transaction_id, data)
Updates an existing transaction
Updates a transaction
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = 'transaction_id_example' # str | The id of the transaction
data = ynab.SaveTransactionWrapper() # SaveTransactionWrapper | The transaction to update
try:
# Updates an existing transaction
api_response = api_instance.update_transaction(budget_id, transaction_id, data)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->update_transaction: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | str | The id of the transaction | |
| data | SaveTransactionWrapper | The transaction to update |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The transaction was successfully updated | - |
| 400 | The request could not be understood due to malformed syntax or validation error(s) | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SaveTransactionsResponse update_transactions(budget_id, data)
Update multiple transactions
Updates multiple transactions, by id or import_id.
- Api Key Authentication (bearer):
from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint
configuration = ynab.Configuration()
# Configure API key authorization: bearer
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Defining host is optional and default to https://api.youneedabudget.com/v1
configuration.host = "https://api.youneedabudget.com/v1"
# Create an instance of the API class
api_instance = ynab.TransactionsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | 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 = ynab.UpdateTransactionsWrapper() # UpdateTransactionsWrapper | The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup.
try:
# Update multiple transactions
api_response = api_instance.update_transactions(budget_id, data)
pprint(api_response)
except ApiException as e:
print("Exception when calling TransactionsApi->update_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| budget_id | str | 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 | The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 209 | The transactions were successfully updated | - |
| 400 | The request could not be understood due to malformed syntax or validation error(s). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]