#
Pagero Interchange and HTTP client solutions
#
Introduction
Hypertext Transfer Protocol Secure (HTTPS) is an extension of HTTP.
HTTPS is a widely used secure transfer protocol that is encrypted using transport layer security (TLS).
#
What we offer
We offer both an HTTP endpoint called
The Pagero Interchange is a simple API in order to enable use-cases that don't need the full functionality that our REST APIs offer.
More information about our full set of APIs can be found in the REST APIs section.
#
Prerequisites
Prior to being able to utilize the Pagero HTTP offering, your internal integration solution needs to support the sending of data through an HTTP client or being able to receive data through an HTTP server.
When ordering the HTTP Connectivity Setup, either from Pagero Store or by your sales representative, and the setup has been finalized by Pagero you will receive an interconnect specification with the connectivity details.
#
Security
Security is achieved by using transport layer security (TLS).
TLS encrypts the connection and makes sure that only Pagero Online or the receiving server can read the transferred data.
#
Supported TLS versions and cipher suites
For more information about supported TLS versions and cipher suites, please see the following section.
#
Pagero Interchange
#
How to send
An HTTP request is sent to the
#
Authentication method
We support two methods of authentication.
- Basic authentication (username/password)
- Token based authentication via OAuth2
More info about token authentication can be found in the API authentication section.
All available OAuth2 grant types listed here are support in our Interchange API as well, i.e. authorization code grant with PKCE, authorization code grant without PKCE and resource owner password credentials grant.
#
Response
For each request, a response will be given according to standard HTTP protocol responses.
#
Success
For a successful request, Pagero Online will return HTTP response code 200
.
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2022 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2022 19:15:56 GMT
Content-Length: 88
Content-Type: text/html
Connection: Closed
#
Error
Depending on the error, HTTP response codes 4xx
or 5xx
will be given.
HTTP/1.1 400 Bad Request
Date: Sun, 18 Oct 2022 10:36:20 GMT
Server: Apache/2.2.14 (Win32)
Content-Length: 230
Content-Type: text/html; charset=iso-8859-1
Connection: Closed
For additional information, see HTTP protocol level response.
#
Endpoint URL
The endpoint URLs consist of protocol + hostname + subpath.
The subpath consists of
https://www.pageroonline.com/incoming/{authMethod}/default/{documentType}/{sendMode}
*only applicable for token authentication.
#
Document types
The subpath in the URL consists of document type to be sent, send mode and the previously mentioned authentication method, if applicable.
The following table shows the possible document types.
#
Send modes
Send mode is set as part of the subpath in the endpoint URL. For more information about what different send modes is supported, see send mode section.
#
Endpoint URL examples
https://www.pageroonline.com/incoming/default/invoice/prod
https://www.pageroonline.com/incoming/tokenauth/default/invoice/prod
#
Headers
The Pagero Interchange endpoint make use of the following HTTP headers.
Note
The list of headers we support may be extended in the future.
#
Example request
Example of an UBL XML invoice sent to Pagero Online using HTTPS with the x-interchange-id
-header as described above.
POST incoming/default/invoice/test HTTP/1.1
x-interchange-id: Invoice-1234567890
Content-Type: application/xml
Content-Length: 151
Host: www.pageroonline.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5 (Java/1.7.0_72)
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID>1234567890</cbc:ID>
<!-- Omitted for clarity -->
</Invoice>
#
HTTP client solution
Pagero HTTP client is a simple client posting the business document in the body of the HTTP request.
#
Authentication method
Our HTTP client supports the following methods of authentication.
- Basic authentication (username/password)
- Token authentication via OAuth2
- Mutual authentication via client certificate
#
Headers
We can configure any specific HTTP header/s you may require.
#
Static content
We can set any static content you may require.
There is no real limitation on how many separate headers we can configure.
#
Dynamic content
We can also use business document content to set dynamic content in HTTP headers.
Of course, a prerequisite for this is that the data needs to exist in the business document in order for it to be able to be fetched and added as an HTTP header.
#
Settings
We support a variety of HTTP settings in our HTTP client - please let us know what you need when ordering the setup.
#
Attachment handling
This section shows available options for sending and receiving attachments with Pagero Interchange and HTTP client solution.
For more information about attachments, please see the attachment section.
#
Embedded in the format
Transfer of the attachment can also be done by embedding the attachment in the business document if the document format you send supports it.
There are several ways to embed an attachment but the most common one is to encode the attachment using base64 and add to the business document according to format specification.
#
Batched
There are several different ways to batch files, one of the most common alternatives is to compress the files into a zip file. Please note that even though all files are batched and sent as one file there would still need to be a file naming convention inside the zip file to match attachments to the main document.
We recommend sending one business document with corresponding attachments per batched file. We do not recommend sending several business documents within the same file.