Skip to content

Latest commit

 

History

History
1292 lines (925 loc) · 49.4 KB

BudgetsApi.md

File metadata and controls

1292 lines (925 loc) · 49.4 KB

firefly_iii_client.BudgetsApi

All URIs are relative to https://demo.firefly-iii.org/api

Method HTTP request Description
delete_budget DELETE /v1/budgets/{id} Delete a budget.
delete_budget_limit DELETE /v1/budgets/{id}/limits/{limitId} Delete a budget limit.
get_budget GET /v1/budgets/{id} Get a single budget.
get_budget_limit GET /v1/budgets/{id}/limits/{limitId} Get single budget limit.
list_attachment_by_budget GET /v1/budgets/{id}/attachments Lists all attachments of a budget.
list_budget GET /v1/budgets List all budgets.
list_budget_limit GET /v1/budget-limits Get list of budget limits by date
list_budget_limit_by_budget GET /v1/budgets/{id}/limits Get all limits for a budget.
list_transaction_by_budget GET /v1/budgets/{id}/transactions All transactions to a budget.
list_transaction_by_budget_limit GET /v1/budgets/{id}/limits/{limitId}/transactions List all transactions by a budget limit ID.
store_budget POST /v1/budgets Store a new budget
store_budget_limit POST /v1/budgets/{id}/limits Store new budget limit.
update_budget PUT /v1/budgets/{id} Update existing budget.
update_budget_limit PUT /v1/budgets/{id}/limits/{limitId} Update existing budget limit.

delete_budget

delete_budget(id, x_trace_id=x_trace_id)

Delete a budget.

Delete a budget. Transactions will not be deleted.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Delete a budget.
        api_instance.delete_budget(id, x_trace_id=x_trace_id)
    except Exception as e:
        print("Exception when calling BudgetsApi->delete_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

void (empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Budget deleted. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_budget_limit

delete_budget_limit(id, limit_id, x_trace_id=x_trace_id)

Delete a budget limit.

Delete a budget limit.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget. The budget limit MUST be associated to the budget ID.
    limit_id = '123' # str | The ID of the budget limit. The budget limit MUST be associated to the budget ID.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Delete a budget limit.
        api_instance.delete_budget_limit(id, limit_id, x_trace_id=x_trace_id)
    except Exception as e:
        print("Exception when calling BudgetsApi->delete_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget. The budget limit MUST be associated to the budget ID.
limit_id str The ID of the budget limit. The budget limit MUST be associated to the budget ID.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

void (empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Budget limit deleted. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_budget

BudgetSingle get_budget(id, x_trace_id=x_trace_id, start=start, end=end)

Get a single budget.

Get a single budget. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_single import BudgetSingle
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the requested budget.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    start = 'Mon Sep 17 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD, to get info on how much the user has spent.  (optional)
    end = 'Mon Dec 31 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD, to get info on how much the user has spent.  (optional)

    try:
        # Get a single budget.
        api_response = api_instance.get_budget(id, x_trace_id=x_trace_id, start=start, end=end)
        print("The response of BudgetsApi->get_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->get_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the requested budget.
x_trace_id str Unique identifier associated with this request. [optional]
start date A date formatted YYYY-MM-DD, to get info on how much the user has spent. [optional]
end date A date formatted YYYY-MM-DD, to get info on how much the user has spent. [optional]

Return type

BudgetSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 The requested budget -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_budget_limit

BudgetLimitSingle get_budget_limit(id, limit_id, x_trace_id=x_trace_id)

Get single budget limit.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_limit_single import BudgetLimitSingle
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget. The budget limit MUST be associated to the budget ID.
    limit_id = 1 # int | The ID of the budget limit. The budget limit MUST be associated to the budget ID.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Get single budget limit.
        api_response = api_instance.get_budget_limit(id, limit_id, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->get_budget_limit:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->get_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget. The budget limit MUST be associated to the budget ID.
limit_id int The ID of the budget limit. The budget limit MUST be associated to the budget ID.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetLimitSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 The requested budget limit -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_attachment_by_budget

AttachmentArray list_attachment_by_budget(id, x_trace_id=x_trace_id, limit=limit, page=page)

Lists all attachments of a budget.

Lists all attachments.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.attachment_array import AttachmentArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)

    try:
        # Lists all attachments of a budget.
        api_response = api_instance.list_attachment_by_budget(id, x_trace_id=x_trace_id, limit=limit, page=page)
        print("The response of BudgetsApi->list_attachment_by_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_attachment_by_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget.
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]

Return type

AttachmentArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of attachments -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_budget

BudgetArray list_budget(x_trace_id=x_trace_id, limit=limit, page=page, start=start, end=end)

List all budgets.

List all the budgets the user has made. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_array import BudgetArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)
    start = 'Mon Sep 17 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end.  (optional)
    end = 'Mon Dec 31 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end.  (optional)

    try:
        # List all budgets.
        api_response = api_instance.list_budget(x_trace_id=x_trace_id, limit=limit, page=page, start=start, end=end)
        print("The response of BudgetsApi->list_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_budget: %s\n" % e)

Parameters

Name Type Description Notes
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]
start date A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end. [optional]
end date A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end. [optional]

Return type

BudgetArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of budgets. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_budget_limit

BudgetLimitArray list_budget_limit(start, end, x_trace_id=x_trace_id)

Get list of budget limits by date

Get all budget limits for for this date range.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_limit_array import BudgetLimitArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    start = 'Mon Sep 17 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD. 
    end = 'Mon Dec 31 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD. 
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Get list of budget limits by date
        api_response = api_instance.list_budget_limit(start, end, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->list_budget_limit:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
start date A date formatted YYYY-MM-DD.
end date A date formatted YYYY-MM-DD.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetLimitArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of budget limits. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_budget_limit_by_budget

BudgetLimitArray list_budget_limit_by_budget(id, x_trace_id=x_trace_id, start=start, end=end)

Get all limits for a budget.

Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The "spent" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_limit_array import BudgetLimitArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the requested budget.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    start = 'Mon Sep 17 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD.  (optional)
    end = 'Mon Dec 31 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD.  (optional)

    try:
        # Get all limits for a budget.
        api_response = api_instance.list_budget_limit_by_budget(id, x_trace_id=x_trace_id, start=start, end=end)
        print("The response of BudgetsApi->list_budget_limit_by_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_budget_limit_by_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the requested budget.
x_trace_id str Unique identifier associated with this request. [optional]
start date A date formatted YYYY-MM-DD. [optional]
end date A date formatted YYYY-MM-DD. [optional]

Return type

BudgetLimitArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of budget limits applicable to this budget. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_transaction_by_budget

TransactionArray list_transaction_by_budget(id, x_trace_id=x_trace_id, limit=limit, page=page, start=start, end=end, type=type)

All transactions to a budget.

Get all transactions linked to a budget, possibly limited by start and end

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.transaction_array import TransactionArray
from firefly_iii_client.models.transaction_type_filter import TransactionTypeFilter
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)
    start = 'Mon Sep 17 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD.  (optional)
    end = 'Mon Dec 31 00:00:00 UTC 2018' # date | A date formatted YYYY-MM-DD.  (optional)
    type = firefly_iii_client.TransactionTypeFilter() # TransactionTypeFilter | Optional filter on the transaction type(s) returned (optional)

    try:
        # All transactions to a budget.
        api_response = api_instance.list_transaction_by_budget(id, x_trace_id=x_trace_id, limit=limit, page=page, start=start, end=end, type=type)
        print("The response of BudgetsApi->list_transaction_by_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_transaction_by_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget.
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]
start date A date formatted YYYY-MM-DD. [optional]
end date A date formatted YYYY-MM-DD. [optional]
type TransactionTypeFilter Optional filter on the transaction type(s) returned [optional]

Return type

TransactionArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of transactions. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_transaction_by_budget_limit

TransactionArray list_transaction_by_budget_limit(id, limit_id, x_trace_id=x_trace_id, limit=limit, page=page, type=type)

List all transactions by a budget limit ID.

List all the transactions within one budget limit. The start and end date are dictated by the budget limit.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.transaction_array import TransactionArray
from firefly_iii_client.models.transaction_type_filter import TransactionTypeFilter
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget. The budget limit MUST be associated to the budget ID.
    limit_id = '123' # str | The ID of the budget limit. The budget limit MUST be associated to the budget ID.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)
    type = firefly_iii_client.TransactionTypeFilter() # TransactionTypeFilter | Optional filter on the transaction type(s) returned (optional)

    try:
        # List all transactions by a budget limit ID.
        api_response = api_instance.list_transaction_by_budget_limit(id, limit_id, x_trace_id=x_trace_id, limit=limit, page=page, type=type)
        print("The response of BudgetsApi->list_transaction_by_budget_limit:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->list_transaction_by_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget. The budget limit MUST be associated to the budget ID.
limit_id str The ID of the budget limit. The budget limit MUST be associated to the budget ID.
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]
type TransactionTypeFilter Optional filter on the transaction type(s) returned [optional]

Return type

TransactionArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of transactions. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

store_budget

BudgetSingle store_budget(budget_store, x_trace_id=x_trace_id)

Store a new budget

Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_single import BudgetSingle
from firefly_iii_client.models.budget_store import BudgetStore
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    budget_store = firefly_iii_client.BudgetStore() # BudgetStore | JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Store a new budget
        api_response = api_instance.store_budget(budget_store, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->store_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->store_budget: %s\n" % e)

Parameters

Name Type Description Notes
budget_store BudgetStore JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 New budget stored, result in response. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
422 Validation error. The body will have the exact details. -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

store_budget_limit

BudgetLimitSingle store_budget_limit(id, budget_limit_store, x_trace_id=x_trace_id)

Store new budget limit.

Store a new budget limit under this budget.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_limit_single import BudgetLimitSingle
from firefly_iii_client.models.budget_limit_store import BudgetLimitStore
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget.
    budget_limit_store = firefly_iii_client.BudgetLimitStore() # BudgetLimitStore | JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Store new budget limit.
        api_response = api_instance.store_budget_limit(id, budget_limit_store, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->store_budget_limit:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->store_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget.
budget_limit_store BudgetLimitStore JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetLimitSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 New budget limit stored, result in response. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
422 Validation error. The body will have the exact details. -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_budget

BudgetSingle update_budget(id, budget_update, x_trace_id=x_trace_id)

Update existing budget.

Update existing budget. This endpoint cannot be used to set budget amount limits.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_single import BudgetSingle
from firefly_iii_client.models.budget_update import BudgetUpdate
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget.
    budget_update = firefly_iii_client.BudgetUpdate() # BudgetUpdate | JSON array with updated budget information. See the model for the exact specifications.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Update existing budget.
        api_response = api_instance.update_budget(id, budget_update, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->update_budget:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->update_budget: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget.
budget_update BudgetUpdate JSON array with updated budget information. See the model for the exact specifications.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 Updated budget stored, result in response -
400 Bad request -
401 Unauthenticated -
404 Page not found -
422 Validation error. The body will have the exact details. -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_budget_limit

BudgetLimitSingle update_budget_limit(id, limit_id, budget_limit, x_trace_id=x_trace_id)

Update existing budget limit.

Update existing budget limit.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.budget_limit import BudgetLimit
from firefly_iii_client.models.budget_limit_single import BudgetLimitSingle
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.BudgetsApi(api_client)
    id = '123' # str | The ID of the budget. The budget limit MUST be associated to the budget ID.
    limit_id = '123' # str | The ID of the budget limit. The budget limit MUST be associated to the budget ID.
    budget_limit = firefly_iii_client.BudgetLimit() # BudgetLimit | JSON array with updated budget limit information. See the model for the exact specifications.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Update existing budget limit.
        api_response = api_instance.update_budget_limit(id, limit_id, budget_limit, x_trace_id=x_trace_id)
        print("The response of BudgetsApi->update_budget_limit:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BudgetsApi->update_budget_limit: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the budget. The budget limit MUST be associated to the budget ID.
limit_id str The ID of the budget limit. The budget limit MUST be associated to the budget ID.
budget_limit BudgetLimit JSON array with updated budget limit information. See the model for the exact specifications.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

BudgetLimitSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 Updated budget limit stored, result in response -
400 Bad request -
401 Unauthenticated -
404 Page not found -
422 Validation error. The body will have the exact details. -
500 Internal exception -

[Back to top] [Back to API list] [Back to Model list] [Back to README]