Files
Holzleitner-Lieferservice-App/packages/holzleitner_api/doc/AdminApi.md
Dennis Nemec a9bf8ecdd1 Final commit.
2026-06-01 17:12:28 +02:00

7.6 KiB

holzleitner_api.api.AdminApi

Load the API package

import 'package:holzleitner_api/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
deliveredBelegnummern GET /admin/delivered-belegnummern Liefert die Belegnummern ausgelieferter (abgeschlossener) Lieferungen, deren Liefermail noch nicht versendet wurde (`mail_sent_at IS NULL`). „Ausgeliefert" = es existiert ein Abschluss. Mit `day` (DD-MM-YYYY) nur Abschlüsse dieses Berliner Kalendertages; ohne `day` alle offenen (über alle Tage) — so bleiben Belege über Mitternacht nicht hängen.
importErp POST /admin/import-erp Stößt den ERP-Import für ein Datum an und liefert die Zusammenfassung.
markMailSent POST /admin/mark-mail-sent Markiert die Liefermails der angegebenen Belegnummern als versendet (`mail_sent_at = now()`, nur wo noch offen). Vom Mailclient aufzurufen, NACHDEM ERPframe die Mails erfolgreich verschickt hat — danach erscheinen die Belege nicht mehr in `GET /admin/delivered-belegnummern`.
pushCompletion POST /admin/push-completion Stößt das ERP-Rückschreiben eines bereits lokal abgeschlossenen Lieferabschlusses erneut an (idempotenter Retry, falls der automatische Push beim Abschluss fehlschlug).

deliveredBelegnummern

DeliveredBelegnummernResponse deliveredBelegnummern(day)

Liefert die Belegnummern ausgelieferter (abgeschlossener) Lieferungen, deren Liefermail noch nicht versendet wurde (mail_sent_at IS NULL). „Ausgeliefert" = es existiert ein Abschluss. Mit day (DD-MM-YYYY) nur Abschlüsse dieses Berliner Kalendertages; ohne day alle offenen (über alle Tage) — so bleiben Belege über Mitternacht nicht hängen.

Example

import 'package:holzleitner_api/api.dart';
// TODO Configure API key authorization: admin_api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKeyPrefix = 'Bearer';

final api = HolzleitnerApi().getAdminApi();
final String day = day_example; // String | Tag DD-MM-YYYY; ohne Angabe ALLE offenen Belege

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

Parameters

Name Type Description Notes
day String Tag DD-MM-YYYY; ohne Angabe ALLE offenen Belege [optional]

Return type

DeliveredBelegnummernResponse

Authorization

admin_api_key

HTTP request headers

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

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

importErp

ImportSummary importErp(date)

Stößt den ERP-Import für ein Datum an und liefert die Zusammenfassung.

Example

import 'package:holzleitner_api/api.dart';
// TODO Configure API key authorization: admin_api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKeyPrefix = 'Bearer';

final api = HolzleitnerApi().getAdminApi();
final String date = date_example; // String | Ziel-Tourdatum YYYY-MM-DD (Default: heute)

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

Parameters

Name Type Description Notes
date String Ziel-Tourdatum YYYY-MM-DD (Default: heute) [optional]

Return type

ImportSummary

Authorization

admin_api_key

HTTP request headers

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

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

markMailSent

MarkMailSentResponse markMailSent(markMailSentRequest)

Markiert die Liefermails der angegebenen Belegnummern als versendet (mail_sent_at = now(), nur wo noch offen). Vom Mailclient aufzurufen, NACHDEM ERPframe die Mails erfolgreich verschickt hat — danach erscheinen die Belege nicht mehr in GET /admin/delivered-belegnummern.

Example

import 'package:holzleitner_api/api.dart';
// TODO Configure API key authorization: admin_api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKeyPrefix = 'Bearer';

final api = HolzleitnerApi().getAdminApi();
final MarkMailSentRequest markMailSentRequest = ; // MarkMailSentRequest | 

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

Parameters

Name Type Description Notes
markMailSentRequest MarkMailSentRequest

Return type

MarkMailSentResponse

Authorization

admin_api_key

HTTP request headers

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

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

pushCompletion

pushCompletion(deliveryId)

Stößt das ERP-Rückschreiben eines bereits lokal abgeschlossenen Lieferabschlusses erneut an (idempotenter Retry, falls der automatische Push beim Abschluss fehlschlug).

Example

import 'package:holzleitner_api/api.dart';
// TODO Configure API key authorization: admin_api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('admin_api_key').apiKeyPrefix = 'Bearer';

final api = HolzleitnerApi().getAdminApi();
final String deliveryId = deliveryId_example; // String | UUID der abgeschlossenen Lieferung

try {
    api.pushCompletion(deliveryId);
} catch on DioException (e) {
    print('Exception when calling AdminApi->pushCompletion: $e\n');
}

Parameters

Name Type Description Notes
deliveryId String UUID der abgeschlossenen Lieferung

Return type

void (empty response body)

Authorization

admin_api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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