go-firefly3/docs/BudgetsApi.md
2024-05-11 14:45:50 +03:00

26 KiB

{{classname}}

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

Method HTTP request Description
DeleteBudget Delete /v1/budgets/{id} Delete a budget.
DeleteBudgetLimit Delete /v1/budgets/{id}/limits/{limitId} Delete a budget limit.
GetBudget Get /v1/budgets/{id} Get a single budget.
GetBudgetLimit Get /v1/budgets/{id}/limits/{limitId} Get single budget limit.
ListAttachmentByBudget Get /v1/budgets/{id}/attachments Lists all attachments of a budget.
ListBudget Get /v1/budgets List all budgets.
ListBudgetLimit Get /v1/budget-limits Get list of budget limits by date
ListBudgetLimitByBudget Get /v1/budgets/{id}/limits Get all limits for a budget.
ListTransactionByBudget Get /v1/budgets/{id}/transactions All transactions to a budget.
ListTransactionByBudgetLimit Get /v1/budgets/{id}/limits/{limitId}/transactions List all transactions by a budget limit ID.
StoreBudget Post /v1/budgets Store a new budget
StoreBudgetLimit Post /v1/budgets/{id}/limits Store new budget limit.
UpdateBudget Put /v1/budgets/{id} Update existing budget.
UpdateBudgetLimit Put /v1/budgets/{id}/limits/{limitId} Update existing budget limit.

DeleteBudget

DeleteBudget(ctx, id, optional) Delete a budget.

Delete a budget. Transactions will not be deleted.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget.
optional *BudgetsApiDeleteBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiDeleteBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

DeleteBudgetLimit

DeleteBudgetLimit(ctx, id, limitId, optional) Delete a budget limit.

Delete a budget limit.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget. The budget limit MUST be associated to the budget ID.
limitId string The ID of the budget limit. The budget limit MUST be associated to the budget ID.
optional *BudgetsApiDeleteBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiDeleteBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

GetBudget

BudgetSingle GetBudget(ctx, id, optional) 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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the requested budget.
optional *BudgetsApiGetBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiGetBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. | start | optional.String| A date formatted YYYY-MM-DD, to get info on how much the user has spent. | end | optional.String| A date formatted YYYY-MM-DD, to get info on how much the user has spent. |

Return type

BudgetSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

GetBudgetLimit

BudgetLimitSingle GetBudgetLimit(ctx, id, limitId, optional) Get single budget limit.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget. The budget limit MUST be associated to the budget ID.
limitId int32 The ID of the budget limit. The budget limit MUST be associated to the budget ID.
optional *BudgetsApiGetBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiGetBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

BudgetLimitSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListAttachmentByBudget

AttachmentArray ListAttachmentByBudget(ctx, id, optional) Lists all attachments of a budget.

Lists all attachments.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget.
optional *BudgetsApiListAttachmentByBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListAttachmentByBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. | limit | optional.Int32| Number of items per page. The default pagination is per 50 items. | page | optional.Int32| Page number. The default pagination is per 50 items. |

Return type

AttachmentArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListBudget

BudgetArray ListBudget(ctx, optional) 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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *BudgetsApiListBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListBudgetOpts struct

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

Return type

BudgetArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListBudgetLimit

BudgetLimitArray ListBudgetLimit(ctx, start, end, optional) Get list of budget limits by date

Get all budget limits for for this date range.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
start string A date formatted YYYY-MM-DD.
end string A date formatted YYYY-MM-DD.
optional *BudgetsApiListBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

BudgetLimitArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListBudgetLimitByBudget

BudgetLimitArray ListBudgetLimitByBudget(ctx, id, optional) 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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the requested budget.
optional *BudgetsApiListBudgetLimitByBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListBudgetLimitByBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. | start | optional.String| A date formatted YYYY-MM-DD. | end | optional.String| A date formatted YYYY-MM-DD. |

Return type

BudgetLimitArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListTransactionByBudget

TransactionArray ListTransactionByBudget(ctx, id, optional) All transactions to a budget.

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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget.
optional *BudgetsApiListTransactionByBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListTransactionByBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. | limit | optional.Int32| Number of items per page. The default pagination is per 50 items. | page | optional.Int32| Page number. The default pagination is per 50 items. | start | optional.String| A date formatted YYYY-MM-DD. | end | optional.String| A date formatted YYYY-MM-DD. | type_ | optional.Interface of TransactionTypeFilter| Optional filter on the transaction type(s) returned |

Return type

TransactionArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

ListTransactionByBudgetLimit

TransactionArray ListTransactionByBudgetLimit(ctx, id, limitId, optional) 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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the budget. The budget limit MUST be associated to the budget ID.
limitId string The ID of the budget limit. The budget limit MUST be associated to the budget ID.
optional *BudgetsApiListTransactionByBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiListTransactionByBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. | limit | optional.Int32| Number of items per page. The default pagination is per 50 items. | page | optional.Int32| Page number. The default pagination is per 50 items. | type_ | optional.Interface of TransactionTypeFilter| Optional filter on the transaction type(s) returned |

Return type

TransactionArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

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

StoreBudget

BudgetSingle StoreBudget(ctx, body, name, active, order, notes, autoBudgetType, autoBudgetCurrencyId, autoBudgetCurrencyCode, autoBudgetAmount, autoBudgetPeriod, optional) Store a new budget

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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body BudgetStore JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
name string
active bool
order int32
notes string
autoBudgetType AutoBudgetType
autoBudgetCurrencyId string
autoBudgetCurrencyCode string
autoBudgetAmount string
autoBudgetPeriod AutoBudgetPeriod
optional *BudgetsApiStoreBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiStoreBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

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

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

StoreBudgetLimit

BudgetLimitSingle StoreBudgetLimit(ctx, body, currencyId, currencyCode, budgetId, start, period, end, amount, id, optional) Store new budget limit.

Store a new budget limit under this budget.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body BudgetLimitStore JSON array or key=value pairs with the necessary budget information. See the model for the exact specifications.
currencyId string
currencyCode string
budgetId string
start string
period string
end string
amount string
id string The ID of the budget.
optional *BudgetsApiStoreBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiStoreBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

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

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

UpdateBudget

BudgetSingle UpdateBudget(ctx, body, name, active, order, notes, autoBudgetType, autoBudgetCurrencyId, autoBudgetCurrencyCode, autoBudgetAmount, autoBudgetPeriod, id, optional) Update existing budget.

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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body BudgetUpdate JSON array with updated budget information. See the model for the exact specifications.
name string
active bool
order int32
notes string
autoBudgetType AutoBudgetType
autoBudgetCurrencyId string
autoBudgetCurrencyCode string
autoBudgetAmount string
autoBudgetPeriod AutoBudgetPeriod
id string The ID of the budget.
optional *BudgetsApiUpdateBudgetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiUpdateBudgetOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

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

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

UpdateBudgetLimit

BudgetLimitSingle UpdateBudgetLimit(ctx, body, createdAt, updatedAt, start, end, currencyId, currencyCode, currencyName, currencySymbol, currencyDecimalPlaces, budgetId, period, amount, spent, id, limitId, optional) Update existing budget limit.

Update existing budget limit.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body BudgetLimit JSON array with updated budget limit information. See the model for the exact specifications.
createdAt time.Time
updatedAt time.Time
start time.Time
end time.Time
currencyId string
currencyCode string
currencyName string
currencySymbol string
currencyDecimalPlaces int32
budgetId string
period string
amount string
spent string
id string The ID of the budget. The budget limit MUST be associated to the budget ID.
limitId string The ID of the budget limit. The budget limit MUST be associated to the budget ID.
optional *BudgetsApiUpdateBudgetLimitOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BudgetsApiUpdateBudgetLimitOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

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

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