Skip to content
Snippets Groups Projects

Client Module

API Flow

The SdkClientFactory provides fluent API client both for Sender and Subscriber.

As the flow chart below shows, the fluent client guides through all essentials calls in order to hand in a correct ** Submission**.

Api client flow for sending a submission

For the actual sender client those calls look like this:

Workflow Java sample calls
flowchart TD

A[Create Client] --> B(Provide DestinationID)
B -->|get encryption key| C[Add Attachments]
C -->|send| D[SubmissionForPickup]
C -->|next| E[Add Data]
E -->|send| D[SubmissionForPickup]

List<File> attachments...

// Send without data
        ClientFactory.senderClient()
        .withDestination(UUID.randomUUID())
        .withAttachments(attachments)
        .submit();

// Send with data
        ClientFactory.senderClient()
        .withDestination(UUID.randomUUID())
        .withAttachments(attachments)
        .withData("some json or xml content")
        .submit();

Api client flow for subscribing to a submission

flowchart TD

A[retrieveOAuthToken] --> B(Upload)
B -->|uploadAttachment| C[Result 1]
B -->|uploadData| D[Result 2]