Skip to main content
phoss SMP exposes a standards-based REST API for reading and managing SMP data. Three protocol variants share the same URL paths but use different XML namespaces:
VariantConfig valueXML namespace
Peppol SMP 1.xsmp.rest.type = peppolhttp://busdox.org/serviceMetadata/publishing/1.0/
OASIS BDXR SMP 1.0smp.rest.type = bdxrhttp://docs.oasis-open.org/bdxr/ns/SMP/1/ServiceMetadata
OASIS BDXR SMP 2.0smp.rest.type = bdxr (with BDXR2 path prefix)http://docs.oasis-open.org/bdxr/ns/SMP/2/ServiceMetadata
The active variant is controlled by the smp.rest.type property in application.properties. Peppol SMP 1.x is the default.
BDXR SMP 2.0 endpoints are served under the /bdxr-smp-2/ path prefix for GET requests. PUT and DELETE write endpoints use the same paths as Peppol SMP.

Base URL

All endpoints are relative to your SMP server’s public URL:
https://smp.example.org
Configure the public URL with:
smp.publicurl = https://smp.example.org

Core SMP endpoints

MethodPathAuthDescription
GET/{ServiceGroupId}NoGet service group and document type list
PUT/{ServiceGroupId}YesCreate or update a service group
DELETE/{ServiceGroupId}YesDelete a service group and all its metadata
GET/{ServiceGroupId}/services/{DocumentTypeId}NoGet service metadata (endpoints) for a document type
PUT/{ServiceGroupId}/services/{DocumentTypeId}YesCreate or update service metadata
DELETE/{ServiceGroupId}/services/{DocumentTypeId}YesDelete service metadata for a document type
DELETE/{ServiceGroupId}/servicesYesDelete all service metadata for a service group
GET/businesscard/{ServiceGroupId}NoGet business card
PUT/businesscard/{ServiceGroupId}YesCreate or update business card
DELETE/businesscard/{ServiceGroupId}YesDelete business card
POST/businesscard/{ServiceGroupId}/pushYesPush business card to Peppol Directory

Custom properties endpoints (since v8.1.0)

MethodPathAuthDescription
GET/{ServiceGroupId}/custompropertiesOptionalGet all custom properties (public only if unauthenticated)
GET/{ServiceGroupId}/customproperties/{PropertyName}OptionalGet a single custom property
PUT/{ServiceGroupId}/custompropertiesYesReplace all custom properties
PUT/{ServiceGroupId}/customproperties/{PropertyType}/{PropertyName}YesSet a single custom property
DELETE/{ServiceGroupId}/custompropertiesYesDelete all custom properties
DELETE/{ServiceGroupId}/customproperties/{PropertyName}YesDelete a single custom property

Utility and administrative endpoints

MethodPathAuthDescription
GET/complete/{ServiceGroupId}NoGet complete service group including all service metadata
GET/list/{UserId}YesList all service groups owned by a user
GET/servicegroupids/allYesList all service group IDs registered on this SMP (since v8.1.0)
GET/smp-status/NoHealth and status information (disabled by default)
GET/ping/NoLiveness probe

Remote query API (disabled by default)

The remote query API allows external SMP lookups through this server. It is disabled by default for security. Enable with: smp.rest.remote.queryapi.disabled = false
MethodPathAuthDescription
GET/smpquery/{ServiceGroupId}NoRemote lookup: list document types for a participant
GET/smpquery/{ServiceGroupId}/{DocumentTypeId}NoRemote lookup: get service metadata
GET/businesscardquery/{ServiceGroupId}NoRemote lookup: get business card

Exchange API (since v5.6.0)

The exchange API provides bulk import/export of SMP data in XML format.
MethodPathAuthDescription
GET/exchange/export/all/xml/v1YesExport all data as XML
GET/exchange/export/byowner/{UserId}/xml/v1YesExport all data owned by a user
GET/exchange/export/specific/{ServiceGroupId}/xml/v1YesExport a single service group
GET/exchange/export/outboundmigip/xml/v1YesExport outbound migrations in progress
PUT/exchange/import/xml/v1/{UserId}YesImport XML data under the specified user

Migration API (since v5.6.0)

Participant migration allows transferring a service group from one SMP to another within the Peppol network.
MethodPathAuthDescription
PUT/migration/outbound/start/{ServiceGroupId}YesStart outbound migration
PUT/migration/outbound/cancel/{ServiceGroupId}YesCancel outbound migration
PUT/migration/outbound/finalize/{ServiceGroupId}YesFinalize outbound migration
PUT/migration/inbound/{ServiceGroupId}/{MigrationKey}YesAccept inbound migration
PUT/migration/inboundYesAccept inbound migration from XML body

Identifier formats

Participant identifier (ServiceGroupId)

Participant identifiers use the format scheme::value where scheme and value are separated by a double colon:
iso6523-actorid-upis::0088:5060210000007
When used in a URL path, the :: separator and any / characters within the identifier must be URL-encoded:
iso6523-actorid-upis%3A%3A0088%3A5060210000007
Tomcat requires additional configuration to allow encoded slashes (%2F) in URLs. Add encodedSolidusHandling="decode" to the Connector element in server.xml. For Tomcat versions below 10, set the JVM property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true.

Document type identifier (DocumentTypeId)

Document type identifiers also use the scheme::value format:
busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1

Content types

All endpoints that accept a request body expect application/xml or text/xml. All endpoints that return a body respond with application/xml.

HTTP status codes

CodeMeaning
200 OKRequest succeeded
400 Bad RequestMalformed identifier or inconsistent payload
401 UnauthorizedMissing or invalid credentials
403 ForbiddenAuthenticated user does not own the service group
404 Not FoundService group, document type, or business card not found
500 Internal Server ErrorUnexpected server-side error

Error responses

Error responses are plain-text HTTP responses with an appropriate status code. The response body contains a human-readable error message. No structured XML error envelope is used.

Rate limiting

phoss SMP has no built-in rate limiting. If you need rate limiting, configure it at the reverse proxy layer (for example, nginx or Apache).

API variants in depth

The default variant. Uses XML types from the busdox.org namespace. Responses to GET requests are signed with the SMP’s private key using XML-DSig. This is the variant required for connectivity in the Peppol network.See Peppol service groups and Peppol service metadata for endpoint details.
The OASIS standardised version of the Peppol SMP specification. Uses the http://docs.oasis-open.org/bdxr/ns/SMP/1/ServiceMetadata namespace. Responses to GET requests are also signed.See BDXR service groups and BDXR service metadata.
The newer OASIS version. GET requests for service groups and service metadata use the /bdxr-smp-2/ path prefix. Uses the http://docs.oasis-open.org/bdxr/ns/SMP/2/ServiceMetadata namespace. Responses are unsigned.See BDXR service groups and BDXR service metadata.

Build docs developers (and LLMs) love