Introduction
Portbase offers various protocols to exchange messages between your internal system and the Port Community System (PCS). This article explains how to send and retrieve messages via the sFTP protocol.
An overview of the other protocols can be found here
Before you start
In this article, we assume that:
- Your organisation already has an sFTP connection, or our colleagues from Integration Services have contacted you to set it up. No connection yet? Then first read this article about requesting a system interface.
- You are responsible as a technical administrator for creating and managing system interfaces, and have access to the application System Interfaces (EDIFACT/XML) in the PCS. No access yet? Then check this article on how to gain access to the application.
Managing the connection
Managing your AS2 and sFTP connections is done via the PCS service System Interfaces (EDIFACT/XML). You can find this in the Port Community System (PCS).
In the article managing sFTP system interface you can read how to do this.
Technical requirements
- The Portbase sFTP services only accept push/pull. This means you are responsible for placing and retrieving files in the folders.
- Messages in the folder cur (upload and download) are automatically deleted after 7 days.
- The maximum file size is 4 MB.
- The PCS sFTP server is accessible via sftp://messaging2.pcs.portbase.com. You can log in with the provided username and your SSH key pair, via port 22. You manage your connections with Portbase in the System Interfaces Portal, via PCS.
Performance
For the best performance, we recommend using multiple parallel uploads and downloads (also known as channels or sessions) within a single connection. Our server supports a maximum of 10 parallel transfers per connection.
This method is faster than opening multiple separate connections without using parallel transfers.
Upload procedure
- Upload your file to the folder upload/tmp/.
- Once the upload is complete, move the file to upload/new/.
- After a short time, the PCS system picks up the file for distribution and processing and moves it to the folder upload/cur/. After 7 days, the file is automatically deleted.
Why this procedure?
Uploading to /tmp first and then moving to /new once the upload is complete prevents our system from picking up incomplete files. Using the /new folder confirms that a file is ready to be retrieved. Similarly, moving to the /cur folder is our confirmation that your file has been retrieved for distribution within Portbase.
Download procedure
- Check the folder download/new/ for new files.
- Download these files and move them to download/cur/ when you are done or delete them directly. After 7 days, the files in download/cur/ are automatically deleted.
Why this procedure?
Using the /new directory confirms that a file is ready to be retrieved and there is no risk of retrieving a partial upload. Moving the file to the /cur folder is your confirmation that the file has been retrieved for distribution/processing. The /tmp directory is used by Portbase for uploading (partial) files and is not intended for customer use.
Testing the connection
Check if you can connect from your sFTP client to the Portbase sFTP server and contact Portbase to check the connection from Portbase to your sFTP server.
If you have questions about your sFTP system interface with Portbase, please contact us via integration@portbase.com
Related to