Files
fin-tracker/app/packages/api_client/doc/ImportsApi.md
T
Dmitry ccd06f32f7 chore(app): сгенерированный Dart-клиент
just gen-client — покрывает links, cashflow-broker, ручные цены,
imports/pending, goals/income/rebalance/tax/benchmarks.
2026-09-19 10:46:09 +03:00

6.4 KiB

fintracker_api.api.ImportsApi

Load the API package

import 'package:fintracker_api/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
importsCommit POST /api/v1/imports/{import_id}/commit Commit
importsCreate POST /api/v1/imports Create
importsDelete DELETE /api/v1/imports/{import_id} Delete
importsGet GET /api/v1/imports/{import_id} Get
importsList GET /api/v1/imports List

importsCommit

ImportResult importsCommit(importId, commitRequest)

Commit

Write the file's events into the ledger and rebuild every metric.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getImportsApi();
final int importId = 56; // int | 
final CommitRequest commitRequest = ; // CommitRequest | 

try {
    final response = api.importsCommit(importId, commitRequest);
    print(response);
} on DioException catch (e) {
    print('Exception when calling ImportsApi->importsCommit: $e\n');
}

Parameters

Name Type Description Notes
importId int
commitRequest CommitRequest

Return type

ImportResult

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

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

importsCreate

ImportPreview importsCreate(file, accountId, parser)

Create

Upload a report, parse it and show what committing it would do. Writes no event.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getImportsApi();
final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | the report itself
final int accountId = 56; // int | target account, if known
final String parser = parser_example; // String | force a parser from registry.names()

try {
    final response = api.importsCreate(file, accountId, parser);
    print(response);
} on DioException catch (e) {
    print('Exception when calling ImportsApi->importsCreate: $e\n');
}

Parameters

Name Type Description Notes
file MultipartFile the report itself
accountId int target account, if known [optional]
parser String force a parser from registry.names() [optional]

Return type

ImportPreview

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, application/problem+json

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

importsDelete

importsDelete(importId)

Delete

Drop an uncommitted import. A committed one stays: raw_* is append-only.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getImportsApi();
final int importId = 56; // int | 

try {
    api.importsDelete(importId);
} on DioException catch (e) {
    print('Exception when calling ImportsApi->importsDelete: $e\n');
}

Parameters

Name Type Description Notes
importId int

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

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

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

importsGet

ImportPreview importsGet(importId)

Get

The preview again — recomputed for an uncommitted import, replayed for a committed one.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getImportsApi();
final int importId = 56; // int | 

try {
    final response = api.importsGet(importId);
    print(response);
} on DioException catch (e) {
    print('Exception when calling ImportsApi->importsGet: $e\n');
}

Parameters

Name Type Description Notes
importId int

Return type

ImportPreview

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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

importsList

List importsList(status, limit, offset)

List

Newest imports first, with the counters each was committed with.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getImportsApi();
final String status = status_example; // String | uploaded | parsed | committed | failed
final int limit = 56; // int | 
final int offset = 56; // int | 

try {
    final response = api.importsList(status, limit, offset);
    print(response);
} on DioException catch (e) {
    print('Exception when calling ImportsApi->importsList: $e\n');
}

Parameters

Name Type Description Notes
status String uploaded parsed
limit int [optional] [default to 50]
offset int [optional] [default to 0]

Return type

List<ImportSummary>

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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