swagger: "2.0" info: title: "Hermes SMP migration key API" description: "

Business Context

API Documentation

This documentation describes the REST interface for the exchanges between the HSMP and a client wishing to retrieve a migration key in order to take over a Peppol participant.
This process is part of the Peppol SML specification. But the actual exchange of the migration key part is left to specific implementation, as described in this extract of the SML specification:

Another set of steps relating to SMPs and the SML relates to the migration of the metadata about a participant from one SMP to another SMP (for example, the participant decides to change suppliers for this function). There are interfaces to the SML to support migrations of this kind, which imply following a sequence of steps along the lines shown in figure 4. In this sequence, the original SMP receives a request from a participant to migrate its metadata to a new SMP (a step that is done out-of-band: there are no interfaces defined in these specifications for this). The SMP generates a Migration Key which is a unique string containing characters and numbers only, with a maximum length of 24 characters. The original SMP invokes the PrepareToMigrate operation of the SML and then passes the migration key to the new SMP (the key passing is an out-of-band step not defined in these specifications). When the new SMP has created the relevant metadata for the participant, it signals that it is taking over by invoking the Migrate operation of the SML, which then causes the DNS record(s) for that participant ID to be updated to point at the new SMP. Once this switch is complete, the original SMP can remove the metadata which it holds for the participant.

Mutual TLS authentication

In order to call the API, the access point must use a valid Peppol certificate to perform a mutula TLS authentication: Swagger is not able to specify security based on mutual TLS authentication, therefore the security part is left empty in the endpoint documentation.

User blacklisting

HSMP allows a maximum of XX queries per day coming from a single certificate. If the limit is reached, the certificate is permanently baned. Access point may send a email request to BOSA support in order to to unblock the certificate.

API DNS and IP's

The DNS entries are done for the following domains: TEST SMK : smp.acc-hermes-belgium.be PROD SML : smp.hermes-belgium.be

Changes

1.0.0

The first release was done as parto f the initial development of the HSMP. Its purpose was to enable the BOSA intelligent web form to gather and distribute the migration key.

2.0.0beta

Following up on Access Points feedback, BOSA decided to provide a public API for Access Point to automate Participant migration.
Here is the list of changes:
" version: 2.0.0 Beta host: smp.hermes-belgium.be schemes: - https paths: /MigrationRecords: get: summary: "Returns the migration keys for a list of participants; requires mutual TLS authentication." operationId: "MigrationRecords" consumes: - "application/xml" produces: - "application/xml" parameters: - in: "body" name: "body" description: "A list of up to 10 participants" required: true schema: $ref: "#/definitions/Participants" responses: 200: description: Ok schema: $ref: "#/definitions/MigrationRecords" x-401-HSMP-802: description: No certificate supplied with the request x-401-HSMP-803: description: Error while parsing client certificate x-401-HSMP-804: description: Certificate expired or not yet valid x-401-HSMP-805: description: Certificate cannot be trusted by PEPPOL trustStore x-401-HSMP-806: description: Certificate environment does not match with requested environment (test or prod) x-401-HSMP-808: description: Certificate is not a PEPPOL ACCESS POINT certificate x-404-HSMP-001: description: Invalid or non-existing enterprise number + id x-404-HSMP-002: description: Inactive enterprise number + id x-404-HSMP-003: description: Already migrated + id x-429-HSMP-004: description: Blacklisted. Please contact BOSA x-500-HSMP-999: description: The service encountered an internal error definitions: Participants: type: "object" required: - "participant" properties: participant: type: "array" xml: name: "Participant" wrapped: false items: $ref: "#/definitions/Participant" xml: name: "Participants" Participant: type: "string" example: "0978645312" xml: name: "Participant" MigrationRecords: type: "object" required: - "migration" properties: migration: type: "array" xml: name: "MigrationRecord" wrapped: false items: $ref: "#/definitions/MigrationRecord" xml: name: "MigrationRecords" MigrationRecord: type: "object" required: - "participant" - "key" properties: participant: $ref: "#/definitions/Participant" key: $ref: "#/definitions/MigrationKey" xml: name: "MigrationRecord" MigrationKey: type: "string" example: "Hms20BE-K-{%~siJ9QNf=e0x" xml: name: "MigrationKey"