AI translation
This page was translated from German with AI. If in doubt, the German original applies.
REST / JSON¶
The REST API is the access path for all languages without an official SDK. It is available in production — but does not cover the full gRPC feature set. What is missing is described under Limits of the REST path; read that before you commit to REST as your only access path.
The reference at openapi.live.zedal.de is generated directly from the running system and is therefore always up to date; it shows the operations the environment offers, ordered by services and groups. The OpenAPI document itself (OpenAPI 3.0.3) is available at openapi.live.zedal.de/openapi.yaml and can be loaded directly into code generators such as openapi-generator or NSwag.
Call format¶
The paths follow the fully qualified gRPC method name:
Example:
POST /infotech.zedal.bxa.diwass.v1.api.CompanyDocumentApi/CreateSubmission HTTP/1.1
Host: openapi.test.zedal.de
Authorization: Bearer <access-token>
provider_id: <provider_id>
Content-Type: application/json
{ "…": "…" }
provider_id is mandatory on every call
The provider_id header belongs on every request — including the login, which does not
carry a token yet. If it is missing, the gateway responds with HTTP 501 and a body like
{"code":12,"message":"Bad gRPC response. HTTP status code: 404"}. This message mentions neither
the header nor the word “provider” and reliably points you in the wrong direction.
You get the same response with a valid provider ID that belongs to a different environment:
the IDs differ per environment, and DiscoveryApi/ListProvider returns the cross-environment
directory on every host — so an ID listed there is not automatically valid on the host you are
currently addressing.
Rule of thumb for troubleshooting: 501 almost always means provider_id, not “operation not
implemented”.
The HTTP verb is not always POST. It comes from the google.api.http annotation of the respective proto method; in practice, POST, GET, PATCH, DELETE and PUT occur. Read operations are mostly GET, with the parameters in the query string. Which verb applies to an operation is stated in the reference — do not guess it from the method name.
Resource paths, not resource design
The paths are deliberately RPC-style rather than resource-oriented. There is no /notifications/{id} — the operation is named the way the gRPC method is named. Each REST operation therefore corresponds to exactly one gRPC method. The reverse does not hold: there are gRPC methods without a REST route (see Limits of the REST path).
Authentication¶
Three stages, identical for REST and gRPC:
sequenceDiagram
participant App as Your application
participant Z as ZEDAL
App->>Z: ListProvider (without token, without provider_id)
Z-->>App: Provider directory
App->>Z: IssueRefreshToken (credentials + app token)
Z-->>App: Refresh token
App->>Z: RequestAccess (Bearer refresh token)
Z-->>App: Access token + NEW refresh token
Note over App,Z: This invalidates the old refresh token
App->>Z: Business call (Bearer access token)
| Step | Operation | Authorization | provider_id |
|---|---|---|---|
| 0 — Determine the provider | DiscoveryApi/ListProvider |
— | — |
| 1 — Login | AuthApi/IssueRefreshToken |
— | required |
| 2 — Get access | AuthApi/RequestAccess |
Bearer refresh token | required |
| 3 — Business call | every other operation | Bearer access token | required |
DiscoveryApi/ListProvider is the only operation that requires neither a token nor provider_id.
It is therefore the natural starting point: query the directory first, then log in with the
matching provider ID.
The login carries the account’s UsernameCredentials and, in addition, the app token you receive at registration. Processes without a user skip login and refresh with an API key: in RequestAccess, they exchange an API key together with the app token (apiKeyCredentials) directly for an access token, without a refresh token — see Getting started → Processes without a user.
Token rotation — every RequestAccess invalidates the old refresh token
Step 2 always returns a new refresh token, and the previous one loses its validity. Your application must persist the new token before it makes the next business call. If you keep using the original token, you are locked out after the first refresh and have to log in again.
For processes running in parallel, this means: one component refreshes, all others use the result. Two simultaneous RequestAccess calls with the same refresh token invalidate each other.
Some operations additionally require a scope (for example usermgt for the administrative operations of the AuthApi). Scopes are tied to the app token and the subscriber assignment and are carried as a claim in the access token — they are not requested per call.
Errors¶
gRPC status codes are mapped to HTTP status codes; the response body carries the error details. For error handling, distinguish between two levels:
- Transport level — HTTP status and gRPC status. Tells you whether the call arrived and was permitted.
- Business level — rejections from DiWaSS with their own error codes such as
WASTE_CLASSIFICATION_INVALID_CODE. Such an error can be contained in an HTTP 200 response, because the call was technically successful. See Error codes.
Limits of the REST path¶
Not every gRPC method has a REST route. The routes are created from the google.api.http annotations of the protos — whatever is not annotated there does not exist via REST; the OpenAPI specification is authoritative. Via REST you can store and import documents (DocumentApi/ImportTransportDocument, ImportToDocument, ImportDocumentToFileArea), take incoming entries over (ImportTransportDocumentFromInbox, ImportDocumentToFileAreaFromInbox), read documents (ExportCurrentDocument) and send them (SendDocument, GetTransferDetails), and list inventory, file area, inbox and templates (QueryApi/ListTransportDocuments, ListFileAreaDocuments, ListInboxDocuments, ListTransportTemplates); an example is in the BMU guide. Missing are:
| Missing via REST | Consequence |
|---|---|
RemoveDocumentsFromInbox, SetInboxDocumentsRead: the route does not accept identifiers |
incoming entries taken over cannot be removed from the inbox |
ImportDocumentToFileFromInbox, ImportToDocumentInFileFromInbox, ImportNewDocumentToFileFromInbox |
incoming entries cannot be taken over into a specific file |
DeliverDocument, FindFilesToDocument |
no granting of permissions when sending, no search for files related to a document |
CreateNewFile, GrantAccessToFile, MergeFiles, MoveDocumentToFile and further file operations of the FileApi |
files cannot be created, shared or restructured |
QueryApi/ListFiles |
files cannot be listed |
Via REST, the inbox cannot be emptied
The inbox import is the delivery path for changes that come from outside — requests for additional information from authorities, decisions, responses to requests for change. Via REST you can list incoming entries (QueryApi/ListInboxDocuments with removed = false), take them over and read them, but not remove them. An entry that has not been removed appears again in the next run; if you take it over again, a further version of the same document is created.
For the complete run including removal: the .NET SDK or gRPC directly. If you stay with REST, keep track of the entries taken over yourself, for example by their identifier, and do not take any over twice. The procedure is described under Calls and synchronization.
Streaming¶
The REST/JSON path is unary — one request, one response. Server streaming is not available via REST, not even as Server-Sent Events.
If you need streaming, you have two options: native gRPC, or gRPC-Web via the same openapi.* host — there, server streaming responses are delivered incrementally.
Headers¶
Custom HTTP headers are passed on as gRPC metadata. To correlate your calls, set clientName and clientVersion as HTTP headers, with the same values you provided at registration; they end up in the server-side logs.
Two headers are relevant for every call:
| Header | When | If missing |
|---|---|---|
Authorization: Bearer <token> |
from step 2 of authentication | 401 |
provider_id: <id> |
always, including at login | 501 with gRPC code 12 |
Code generation¶
The OpenAPI document is complete and self-contained — client code generators handle it without any rework:
openapi-generator generate \
-i https://openapi.live.zedal.de/openapi.yaml \
-g python \
-o ./zedal-client
For production builds, pin a downloaded copy of the document instead of generating directly against the URL — otherwise your generated client changes with the next platform release.
Next¶
- Samples — runnable Python code: log in, query the inbox
- Getting started — access, first call
- Field rules — what the schema does not tell you
- gRPC — streaming and type safety