Skip to content

Code Lists

Philip Helger edited this page Jun 10, 2026 · 12 revisions

Code Lists

Overview

This page defines all code lists (enumerations / value sets) used across the phoss-ap data model and APIs.


Transaction Type (since v0.1.0)

Distinguishes the purpose of an outbound transaction.

Name Value Description
Business Document business_document A regular Peppol business document sent from Sender Backend to a remote AP
MLS Response mls_response A Message Level Status response sent back to the original sending AP

Document Type (since v0.1.0)

Indicates how the outbound document was submitted by the Sender Backend.

Name Value Description
Payload-only payload_only Raw business document — the AP creates the SBDH envelope
Pre-built SBD prebuilt_sbd Complete Standard Business Document with SBDH already present

Outbound Transaction Status (since v0.1.0)

Lifecycle status of an outbound transaction (business document or MLS response).

Name Value Final Description
Pending pending No Stored in DB, awaiting processing
Rejected rejected Yes Failed optional verification — no sending attempt will be made
Sending sending No AS4 sending is currently in progress
Sent sent Yes Successfully sent via AS4 and receipt confirmed — no further attempts
Failed failed No Last sending attempt failed — scheduled for retry
Permanently Failed permanently_failed Yes Max retries exhausted — no further attempts

Inbound Transaction Status (since v0.1.0)

Lifecycle status of an inbound transaction.

Name Value Final Description
Received received No Received via AS4 and stored in DB, awaiting processing
Rejected rejected Yes Failed optional verification — no forwarding attempt will be made
Forwarding forwarding No Forwarding to Receiver Backend (C3) is currently in progress
Forwarded forwarded Yes Successfully forwarded to Receiver Backend (C3)
Forward Failed forward_failed No Last forwarding attempt failed — scheduled for retry
Permanently Failed permanently_failed Yes Max retries exhausted — no further attempts

Attempt Status (since v0.1.0)

Outcome of a single sending or forwarding attempt.

Name Value Description
Success success The attempt completed successfully
Failed failed The attempt failed

Reporting Status (since v0.1.0)

Whether a Peppol Reporting record has been created for a transaction.

Name Value Description
Pending pending Reporting record has not yet been created
Reported reported Reporting record has been created

MLS Reception Status (since v0.1.0)

Status of MLS response reception for an outbound business document (as C2).

Name Value Description
Pending pending MLS response has not yet been received
Received AP received_ap MLS response received with code AP (Approved)
Received AB received_ab MLS response received with code AB (Accepted Blind)
Received RE received_re MLS response received with code RE (Rejection)
Not Applicable not_applicable MLS is not expected for this transaction (e.g., MLS response transactions)

MLS Sending Strategy (since v0.1.0)

Controls when the AP (as C3) sends an MLS response back to C2. Configured per AP instance, captured per inbound transaction at reception time. Mapped from EPeppolMLSType in peppol-commons (com.helger.peppol.sbdh.EPeppolMLSType). Values are case-sensitive. Default is ALWAYS_SEND.

Name Value Description
Failure Only FAILURE_ONLY MLS response is sent only on rejection (RE)
Always Send ALWAYS_SEND MLS response is sent for all outcomes (RE, AP, or AB)

MLS Response Code (since v0.1.0)

The response code included in an MLS message sent by C3 back to C2. Mapped from EPeppolMLSResponseCode in peppol-commons (com.helger.peppol.mls.EPeppolMLSResponseCode).

Name Value Description
Acceptance AP Message delivered towards C4 with confirmation
Acknowledging AB Message delivered towards C4 without confirmation
Rejection RE Message rejected or delivery towards C4 failed

MLS Status Reason Code (since v0.1.0)

The reason code included in an MLS rejection response line item, describing why the document was rejected. Mapped from EPeppolMLSStatusReasonCode in peppol-commons.

Name Value Description
Business Rule Violation (Fatal) BV Fatal business rule violation — document does not conform to required business rules
Business Rule Warning BW Business rule warning — non-fatal issue, may accompany a BV but cannot trigger rejection alone
Failure of Delivery FD Permanent inability to forward the document to C4 (used with error field NA)
Syntax Violation SV XML schema or syntax validation failure

Receiver Check Mode (since v0.1.3)

Controls how the AP verifies that it is the intended recipient for incoming AS4 messages by cross-checking against SMP registrations. Configured via peppol.receiver-check.mode.

Name Value Description
None none Receiver checks are disabled (default)
SMP smp Uses a fixed SMP URL for verification. Requires peppol.smp.url and phase4.endpoint.address
SML sml Uses dynamic per-participant SMP resolution via the SML derived from peppol.stage. Requires phase4.endpoint.address

Duplicate Detection Mode (since v0.1.0)

Configurable behavior when a duplicate is detected on either detection level.

Name Value Description
Reject reject Duplicate message is rejected at the AS4 level
Store and Flag store_and_flag Duplicate is stored in the DB but flagged per detection level

Forwarding Mode (since v0.1.0)

The method used to deliver received documents to the Receiver Backend. Configured per AP instance.

Name Value Description
HTTP POST (async) http_post_async SBD is POSTed to the Receiver Backend; reporting is triggered asynchronously later
HTTP POST (sync) http_post_sync SBD is POSTed to the Receiver Backend; C4 country code is returned synchronously in the response
S3 + Link s3_link SBD is stored in S3; a link/reference is forwarded to the Receiver Backend
SFTP sftp SBD is uploaded to the Receiver Backend via SFTP
Filesystem filesystem SBD is written to a local directory on the filesystem (since v0.2.0)
SPI spi SBD is forwarded by a deployment-provided IDocumentForwarderProviderSPI implementation (since v0.10.0)

Forwarding Filesystem Layout (since v0.2.0)

File layout for the filesystem forwarding mode. Controls whether files are stored in a flat directory or in per-transaction subdirectories. Configured via forwarding.filesystem.layout.

Name Value Description
Flat flat All files in a single flat directory (default)
Per-transaction per-transaction One subdirectory per transaction

C4 Country Code Determination Mode (since v0.1.3)

Additional modes for automatically determining the C4 country code during inbound forwarding. Multiple modes can be configured as a comma-separated fallback chain via forwarding.c4countrycode.modes. The asynchronous reporting API (POST /api/inbound/report) always remains available as a fallback regardless of which modes are configured.

Name Value Description
Receiver Participant ID receiver_pid Derive from the receiver's Peppol Participant Identifier scheme. The ISO 6523 code prefix is mapped to a country code via the predefined scheme registry. Only works for country-specific schemes (e.g. 0007 for Sweden); international schemes like 0088 will not yield a result.
Business Card Cache business_card Look up the country code from the receiver's Peppol Directory Business Card (fetched from SMP via SML, cached for 1 hour). Requires peppol.stage to be configured.

Submit Response Status (since v0.1.0)

Response status returned by the outbound submit APIs.

Name Value Description
Queued queued Document was accepted and stored for processing
Not Queued not_queued Document was not accepted (e.g., verification failure, shutdown in progress)

Clone this wiki locally