National API - Port API (1.0.17)

Download OpenAPI specification:

PortAPI is a rest full API for Finnish ports to send statistics data over to Nemo for Maritime statistics purpose and to request data for traffic taking place in Finnish ports. The National API now uses MIG 1.0.0.0 and 2.0.0.0 versions.

You can find the information needed to make a valid request at the address https://fintraffic-vts.github.io/mnsw/ :
- National rules and EMSA rules, conditions and guidelines
- List of data elements suggested by Finnish authorities to use, whn submitting formalities
- MIG JSON schema definitions
- Nemo codelists
- Guides

Each request to the API must be authenticated with a JWT token. The token must be obtained from the IDP (Identity Provider) using the client credentials flow.
How to get JWT token for port organization

curl -X POST 'https://<IDP>/realms/nemo/protocol/openid-connect/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'client_id=<client_id>' \
  -d 'client_secret=<secret>' \
  -d 'grant_type=client_credentials'

IDP - DEV: mnsw-dev.mnsw.fi/keycloak
IDP - TST: mnsw-tst.mnsw.fi/keycloak
IDP - STG: mnsw-stg.mnsw.fi/keycloak
IDP - PRD: mnsw.mnsw.fi/keycloak

Example request with CURL:

curl --request GET 'https://mnsw-dev.mnsw.fi/port-api/v1/ports/data?endDate=2025-08-22&startDate=2025-08-01' \
--header 'Authorization: Bearer <access_token>' 

Ports

The national port API will enable ports to send statistics data over to Nemo for Maritime statistics purpose and to request data for traffic taking place in Finnish ports. The API access and documentation will be shared by Fintraffic and is not publicly available compared to national declarant API. Ports should have the following formalities available and the data they have: ATA, ATD, CGA, CGD, COA, CWA, CWD, HZA, HZD, MDH, MTS, NOA, NOD, PXA, PXD, SEC, SRV, VID, WAR and WAS

Post statistics from a port

Send statistics data for its own port to Nemo for Maritime statistics purposes.

Request Body schema: application/json
required

Statistics data

required
object (Mlt2StatisticsReportHeaderData)
required
Array of objects (Mlt2StatisticsPortCallInformationInner)

Responses

Request samples

Content type
application/json
Example

success_request

{
  • "reportHeaderData": {
    },
  • "portCallInformation": [
    ]
}

Response samples

Content type
application/json
{
  • "eventType": "MLT2",
  • "messageStatus": "Success",
  • "reportedError": { }
}

Get port data

Request port formalities data for traffic taking place in Finnish ports. If necessary, data can be queried for the desired period. Returns all saved formalities from the following formalities: ATA, ATD, CGA, CGD, COA, CWA, CWD, HZA, HZD, MDH, MTS, NOA, NOD, PXA, PXD, SEC, SRV, VID, WAR and WAS

query Parameters
startDate
string <date>
Examples:
  • startDate=2025-08-26 - success_request
  • startDate=2025-07-02 - error_400_request

Searching by eta, where the date starts with the value of startDate. Format in YYYY-MM-DD.

endDate
string <date>
Examples:
  • endDate=2025-11-22 - success_request
  • endDate=2025-06-12 - error_400_request

Searching by eta, where the date ends with the value of endDate. Format in YYYY-MM-DD

Responses

Response samples

Content type
application/json

success_request

[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Ships

Port authorities can search and get ship information.

Get list of all ship data including certificates

Get Ship data with SID, SHP and certificate data. Search by ship name, IMO number, call sign, cfr number, eni number, MMSI number or other unique ID.

query Parameters
callSignId
string
Example: callSignId=OJCS

Ships call sign.

imoId
string
Example: imoId=8715259

Ships IMO number.

name
string
Example: name=SILJA SERENADE

Name of the ship.

cfrId
string

Community Fleet Register Number (EU fishing ships).

eniId
string

European Number of Identification for inland ships.

mmsiId
string
Example: mmsiId=230184000

Ships MMSI number.

otherId
string

Another unique ID if no IMO/MMSI are assigned.

Responses

Response samples

Content type
application/json

success

[
  • {
    }
]

Get ship identifiers

Search by ESD ID, ship name, imo number, mmsi number or call sign

query Parameters
search
required
string
Example: search=9691503

search parameter

Responses

Response samples

Content type
application/json

success

{
  • "id": "d256d3e3-6465-4824-b855-7eb1ac7905ec",
  • "name": "AMIRA SARA",
  • "callsignid": "8PBE6",
  • "mmsiid": "314573000",
  • "imoid": "9691503",
  • "esdid": "ESDID0000000005"
}