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

19 KiB

{{classname}}

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

Method HTTP request Description
DeleteLinkType Delete /v1/link-types/{id} Permanently delete link type.
DeleteTransactionLink Delete /v1/transaction-links/{id} Permanently delete link between transactions.
GetLinkType Get /v1/link-types/{id} Get single a link type.
GetTransactionLink Get /v1/transaction-links/{id} Get a single link.
ListLinkType Get /v1/link-types List all types of links.
ListTransactionByLinkType Get /v1/link-types/{id}/transactions List all transactions under this link type.
ListTransactionLink Get /v1/transaction-links List all transaction links.
StoreLinkType Post /v1/link-types Create a new link type
StoreTransactionLink Post /v1/transaction-links Create a new link between transactions
UpdateLinkType Put /v1/link-types/{id} Update existing link type.
UpdateTransactionLink Put /v1/transaction-links/{id} Update an existing link between transactions.

DeleteLinkType

DeleteLinkType(ctx, id, optional) Permanently delete link type.

Will permanently delete a link type. The links between transactions will be removed. The transactions themselves remain. You cannot delete some of the system provided link types, indicated by the editable=false flag when you list it.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiDeleteLinkTypeOpts 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]

DeleteTransactionLink

DeleteTransactionLink(ctx, id, optional) Permanently delete link between transactions.

Will permanently delete link. Transactions remain.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiDeleteTransactionLinkOpts 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]

GetLinkType

LinkTypeSingle GetLinkType(ctx, id, optional) Get single a link type.

Returns a single link type by its ID.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiGetLinkTypeOpts struct

Name Type Description Notes

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

Return type

LinkTypeSingle

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]

GetTransactionLink

TransactionLinkSingle GetTransactionLink(ctx, id, optional) Get a single link.

Returns a single link by its ID.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiGetTransactionLinkOpts struct

Name Type Description Notes

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

Return type

TransactionLinkSingle

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]

ListLinkType

LinkTypeArray ListLinkType(ctx, optional) List all types of links.

List all the link types the system has. These include the default ones as well as any new ones.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiListLinkTypeOpts 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

LinkTypeArray

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]

ListTransactionByLinkType

TransactionArray ListTransactionByLinkType(ctx, id, optional) List all transactions under this link type.

List all transactions under this link type, both the inward and outward transactions.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiListTransactionByLinkTypeOpts 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 limit the results. | end | optional.String| A date formatted YYYY-MM-DD, to limit the results. | 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/json

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

ListTransactionLink

TransactionLinkArray ListTransactionLink(ctx, optional) List all transaction links.

List all the transaction links.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiListTransactionLinkOpts 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

TransactionLinkArray

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]

StoreLinkType

LinkTypeSingle StoreLinkType(ctx, body, name, inward, outward, editable, optional) Create a new link type

Creates a new link type. The data required can be submitted as a JSON body or as a list of parameters (in key=value pairs, like a webform).

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body LinkType JSON array with the necessary link type information or key=value pairs. See the model for the exact specifications.
name string
inward string
outward string
editable bool
optional *LinksApiStoreLinkTypeOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiStoreLinkTypeOpts struct

Name Type Description Notes

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

Return type

LinkTypeSingle

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]

StoreTransactionLink

TransactionLinkSingle StoreTransactionLink(ctx, body, linkTypeId, linkTypeName, inwardId, outwardId, notes, optional) Create a new link between transactions

Store a new link between two transactions. For this end point you need the journal_id from a transaction.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body TransactionLinkStore JSON array with the necessary link type information or key=value pairs. See the model for the exact specifications.
linkTypeId string
linkTypeName string
inwardId string
outwardId string
notes string
optional *LinksApiStoreTransactionLinkOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiStoreTransactionLinkOpts struct

Name Type Description Notes

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

Return type

TransactionLinkSingle

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]

UpdateLinkType

LinkTypeSingle UpdateLinkType(ctx, body, name, inward, outward, id, optional) Update existing link type.

Used to update a single link type. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory. You cannot update some of the system provided link types, indicated by the editable=false flag when you list it.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body LinkTypeUpdate JSON array or formdata with updated link type information. See the model for the exact specifications.
name string
inward string
outward string
id string The ID of the link type.
optional *LinksApiUpdateLinkTypeOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiUpdateLinkTypeOpts struct

Name Type Description Notes

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

Return type

LinkTypeSingle

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]

UpdateTransactionLink

TransactionLinkSingle UpdateTransactionLink(ctx, body, linkTypeId, linkTypeName, inwardId, outwardId, notes, id, optional) Update an existing link between transactions.

Used to update a single existing link.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body TransactionLinkUpdate JSON array or formdata with updated link type information. See the model for the exact specifications.
linkTypeId string
linkTypeName string
inwardId string
outwardId string
notes string
id string The ID of the transaction link.
optional *LinksApiUpdateTransactionLinkOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LinksApiUpdateTransactionLinkOpts struct

Name Type Description Notes

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

Return type

TransactionLinkSingle

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]