Pagero Network API (1.0.1)

Download OpenAPI specification:Download

The 'Network' API provides various functionalities, including searching for trading partners in Pagero’s global registry and managing your company’s connections to other businesses within the network.

Concepts

Company

A Company in the Pagero Network owns and administrates one or more TradingPartners. Sometimes called a Pagero Customer.

Trading Partner

A TradingPartner is an entity that you can send/receive documents to/from. A TradingPartner is stored in Pagero's public registry.

The main components of a trading partner are:

  • Name

  • Trading Partner Ids. For example GLN, Australian Business Number, Finnish OVT. At the moment we only support 5 legacy id types (Organization number, VAT registration number, GLN, OVT, IBAN) but in the future this will be extended.

  • A list of documents that can be sent/received. For example Invoice, Order, or Catalogue.

Trading partners in Pagero's public registry that are located behind other service providers are administrated by Pagero Support. Pagero Customers can suggest new trading partners in Pagero Network.

A TradingPartnerId has a property usedForRouting, that states whether the specific TradingPartnerId will be used to identify the TradingPartner when a document sender or recipient is identified in the document delivery process. A TradingPartnerId not used for routing will only be used to search for a TradingPartner in the Pagero Network for other purposes than routing and to enrich the business document after the TradingPartner has been identified by other Ids.

A Company may set up more than one TradingPartner when it, for example, has several departments that independently send and receive documents. These trading partners can, for example, have the same organisation numbers but different GLN numbers.

Service Provider

A ServiceProvider is a document broker (like Pagero) that route documents to receivers while following laws and regulations in the countries they operate in.

Trading Partner Connection

A trading partner connection connects an owning trading partner and a connected party that is either a TradingPartner or Consumer.

The connection has information about:

  • What documents that can be transferred

  • How they are transferred

  • Extra information that is passed along (like buyer and supplier numbers)

The connection contains connected documents. One list with ConnectedSendDocuments and one list with ConnectedReceiveDocuments.

Connected Documents

A connected document is a document exchange that is setup for a specific document type in a connection. Take for example a connection between Company A (Pagero Customer) and Company B, if A want to send orders to company B then a request to connect document is sent to B for B to receive orders.

A connected document is either a ConnectedSendDocument or a ConnectedReceiveDocument:

  • A ConnectedSendDocument means that the connection owner has been approved to send documents of a specific type to the connected party.

  • A ConnectedSendDocument contains a serviceProviderConfig property that is mandatory since it is required for sending a business document to the correct ServiceProvider with correct transport configuration (communication, filenames, distribution of attachments, etc).

  • A ConnectedReceiveDocument means that the connection owner has approved the connected party to send documents of a specific type to the connection owner.

  • A ConnectedReceiveDocument does not require any ServiceProviderConfig since it will receive business documents via the ServiceProviderConfig that is used in the ConnectedSendDocument by the sending TradingPartner. But the receiving TradingPartner defines which ServiceProviderConfig are available for its' receiving SupportedDocuments.

Notice that company B might be located behind another service provider than Pagero and there might be communication details that needs to be setup at the other service provider. This connection setup is referred to as a Routing.

A ConnectDocumentRequest is used when setting up a connection that has to be done manually, either by setting up a routing or by approving the connection.

The following request types are defined:

  • NoRequest This request is sent when the owner wants to establish a connection but the related trading partner has opted out from approving the establishment of a new connection.

  • SendApprovalRequest This request is sent from the receiving party to the sending party to signal that the receiving party wants to receive documents from the sending party. This request must be sent when the sending trading partner demands approval before a new connected document is created.

  • ReceiveApprovalRequest This request is sent from the sending party to the receiving party to ask the receiver to accept documents from the sending party. This request must be sent when the receiving trading partner demands approval before a new connected document is created.

  • RoutingByPageroRequest Pagero will together with the service provider configure how the documents will be transferred.

  • RoutingByReceiverRequest The reciever will configure the setup themself in their service provider system.

A ConnectDocumentRequest can be omitted when no explicit approval is required by the connected trading partner for setting up a new connection. If both trading partners in the connection are Pagero Customers they will each get a ConnectedSendDocument and ConnectedReceiveDocument as appropriate.

After one or more documents have been connected one can start to transfer documents. See ConnectedSendDocuments and ConnectedReceiveDocuments for details.

Connection Requirements

Before setting up a new document exchange with a connected party one need to fetch the requirements and make sure they are fulfilled.

The requirements include information like

  • What kind of request to make (see request types above)
  • Service provider ids that has to be defined
  • Other requirements stated by the trading partner

The kind of request to be make is decided by the connectionRequirement property and they are handled like this

  • The NoRequirement means that no connection needs to be established or requested before the documents can be exchanged. The connection will be automatically created when the first document is transfered.

  • The ReceiveApprovalRequirement means that a ReceiveApprovalRequest should be sent.

  • The SendApprovalRequirement means that a SendApprovalRequest should be sent.

  • The RoutingByPageroRequirement means that a RoutingByPageroRequest should be sent.

  • The RoutingByReceiverRequirement means that a RoutingByReceiverRequest should be sent.

In addition, the IdAtServiceProviderRequirement should be taken into account when sending to a service provider for the first time.

Error handling and Error Codes

This section provides a detailed description of the different types of Errors that might occur when using the Pagero Network API. The different errors will be sent back as specific error codes that should be handled by the API integrator for the best user experience. Certain types of errors might have the same HTTP response code but depending on the error code within the Error it could either be that the API integrator is the causing the error or the end user.

In addition, since an API request could result in multiple Errors being sent back, it could also potentially be that different errors have different HTTP response codes associated with the error code within the Error. In case multiple errors are sent back where two or more Errors have different HTTP response codes then the HTTP response code returned back will always be Bad Request (400).

Error structure explained

This section describes the structure of the Error that will be sent back if an error occurs when sending requests to the Pagero Network API. The Error structure follows and extends the Pagero REST API Guidelines for errors.

Property Occurrence Description
errorCode Optional The unique errorCode for an error (see next section for more details).
The errorCode might be missing in certain cases if the error occurs before it reaches the Pagero Network API.
description Optional A human readable and localized message explaining the error. The language is controlled by the prioritized supported
language stated within the Accept-Language header in the HTTP request. The description might be missing in certain
cases if the error occurs before it reaches the Pagero Network API.
technicalMessage Mandatory A message in English with a technical explanation of the error.
errorParameters Optional Parameters related to the errorCode. These parameters can be used to more specifically pinpoint an errorCode to a
specific input field or used as parameters in translations, etc. The errorParameters might be missing in certain cases
if the error occurs before it reaches the Pagero Network API or if the errorCode has no specified parameters.

Error Codes Explained

This section describes the different error codes that can be returned back within an Error response. The table below lists each error code with its error parameters, who owns the problem if it occurs and a description that explains what caused the error.

Error Code Error Params HTTP Response Code Problem Owner Description
ConflictingCompanySupportedDocument direction; docType Conflict Integrator A company can only have one trading partner with a specific supported document type and direction.
ConnectedReceiveDocumentDeleteNotAllowed Bad Request Integrator You can't delete a ConnectedReceiveDocument that does not have status Approved or Deleted
ConnectedSendDocumentDeleteNotAllowed Bad Request Integrator You can't delete an already deleted or inactivated ConnectedSendDocument.
ConnectedReceiveDocumentAlreadyExists owningTpId; connectedTpId Conflict Integrator A ConnectedReceiveDocument already exists between the owning trading partner and connected trading partner.
ConnectedReceiveDocumentExists Bad Request Integrator ConnectedReceiveDocument already exists
ConnectedReceiveDocumentNotFound Not Found Integrator ConnectedReceiveDocument not found
ConnectedSendDocumentAlreadyExists owningTpId; connectedTpId Conflict Integrator A ConnectedSendDocument already exists between the owning trading partner and connected trading partner.
ConnectedSendDocumentExists Bad Request Integrator ConnectedSendDocument already exists
ConnectedSendDocumentIdInvalid urlId; jsonId Bad Request Integrator The ConnectedSendDocument id in the url does not match the id in the provided ConnectedSendDocument json payload.
ConnectedSendDocumentNotFound Not Found Integrator ConnectedSendDocument not found
ConnectedSendDocumentNotLong Bad Request Integrator The id of the connected TradingPartner provided in json payload must be a Long.
ConnectionAlreadyExists owningTpId; connectedTpId Conflict Integrator A Connection already exists between the owning TradingPartner and the connected TradingPartner.
ConnectionByTradingPartnerNotFound Not Found Integrator No connection found between trading partners.
ConnectionNotFound connectionId Not Found Integrator Trading partner connection not found by the provided connection id.
ConnectionOptionNotFound documentType Bad Request Integrator Connection option not found for document type.
DeleteRequestNotAllowed requestStatus Bad Request Integrator The status of the request does not allow deletion of it.
DisablingUsedForRoutingNotAllowed idType Bad Request Integrator Disabling UsedForRouting is not allowed for idType. Disabling UsedForRouting is only allowed on UNDEFINED_ORGNR and UNDEFINED_VAT.
ExactlyOneDefaultTradingPartnerIdPerIdTypeRequired idType Conflict Integrator Exactly one default id per id type is required.
IdAtServiceProviderMissing documentType Bad Request Integrator The IdAtServiceProvider is not defined for the provided document type.
IncorrectRequestType requirement; requestType Bad Request Integrator The connection request sent to the trading partner is not one of the allowed types stated in the connection options (/trading-partners/{id}/connection-options-to/{targetTradingPartnerId}).
IncorrectRequestTypeForDirection Bad Request Integrator The connection request has incorrect request type for this document direction.
IncorrectRequestTypeSendApproval Bad Request Integrator A send approval request can only be sent to a company behind Pagero.
InternalServerError correlationid Internal Server Error Pagero There was an unexpected problem within the API and it will be solved by Pagero. If the problem persists, please contact Pagero using the email address provided below.
InvalidBooleanValue paramName Bad Request Integrator A specific parameter must be a boolean.
InvalidDirectionValue paramName Bad Request Integrator The Direction value must be either Send or Receive.
InvalidDocumentType docType Bad Request Integrator The document type specified is invalid.
InvalidEmail email Bad Request End User The email address is invalid.
InvalidIdType idType Bad Request Integrator The id type for TradingPartnerId is invalid.
InvalidIntegerValue paramName Bad Request Integrator A specific parameter must be an integer.
InvalidJsonPayload Bad Request Integrator The provided json payload in the request is invalid.
InvalidLongValue paramName Bad Request Integrator A specific parameter must be a long.
MandatoryParameterMissing paramName Bad Request Integrator A mandatory parameter is not provided.
MissingJsonPayload Bad Request Integrator The required json payload is missing.
MultipleParamValuesNotAllowed paramName Bad Request Integrator A specific parameter can not be repeated.
NoServiceProviderConfigForSupportedDocument docType Bad Request Integrator The ServiceProviderConfig is not defined and no default found to receive document type.
NoSupportedDocumentForIdAtServiceProvider direction; docType Conflict Integrator The IdAtServiceProvider has no corresponding supported document.
NoSupportedDocumentForServiceProviderConfig docType Conflict Integrator No SupportedReceiveDocument for document type exists for ServiceProviderConfig.
NoUniqueTradingPartnerIdDefined Bad Request End User No unique trading partner id defined.
OnlyOneDefaultServiceProviderAllowed docType Conflict Integrator SupportedReceiveDocument for document type should have exactly one default ServiceProviderConfig.
OnlyOneDefaultTransportConfigAllowed Bad Request Integrator There can be only one defaultTransportConfig in ServiceDetail
OnlyOneOverriddenIdPerIdTypeAllowedForEachSupportedDocument idType Conflict Integrator Only one overridden id per id type is allowed for each supported document.
OverriddenIdMustReferenceNonDefaultTradingPartnerId Conflict Integrator Overridden trading partner ids must reference a non default trading partner id for the same id type.
OutdatedVersion crudOp; entity Conflict Integrator The request to update an entity/resource failed because the version is stale. The entity/resource needs to be fetch again before update is allowed.
PermissionDenied Forbidden Integrator Permission denied.
ReceivingDocumentNotSupportedForConnectedTradingPartner tpName; documentType Bad Request Integrator The connected trading partner does not support receiving the requested document type.
ReceivingDocumentNotSupportedByOwningTradingPartner documentType Bad Request Integrator The connected document is not supported by the requesting trading partner and should not be allowed to connect until this is activated as supported document.
RequestNotFound requestId Not Found Integrator Request with id {{requestId}} not found
SendingDocumentNotSupportedForConnectedTradingPartner tpName; documentType Bad Request Integrator The connected document is not supported by the connected trading partner and should not be possible for the end user to choose.
SendingDocumentNotSupportedByOwningTradingPartner documentType Bad Request Integrator Sending this specific document type is not is not supported by the sending trading partner. It should first be activated as a supported document in the sending company's sending capabilities in their profile.
ServiceProviderConfigInvalid id; docType Conflict Integrator ServiceProviderConfig is not valid for the specified ServiceProvider and document type.
ServiceProviderConfigNotDefined Bad Request Integrator The ServiceProviderConfig is not defined
ServiceProviderNotFound id Not Found Integrator The service provider with id does not exist.
SpecificTradingPartnerConflictingId idType; idValue Conflict End User Another trading partner with TradingPartnerId used for routing exists.
SupportedReceiveDocumentNotFoundForCompany cpId; documentType Not Found Integrator Unable to find receiving supported document for company and document type.
SupportedReceiveDocumentNotFoundForTradingPartner tpId; documentType Not Found Integrator Unable to find receiving supported document for trading partner and document type.
SupportedSendDocumentNotFoundForCompany cpId; documentType Not Found Integrator Unable to find sending supported document for the requested company and document type.
SupportedSendDocumentNotFoundForTradingPartner tpId; documentType Not Found Integrator Unable to find sending supported document for the requested trading partner and document type.
TradingPartnerConflictingIds tpIds Conflict End user The business identifier (gln, vat, etc) provided by the end user is already used by another trading partner.
TradingPartnerIdInvalid idType; idValue Bad Request End user The business identifier (gln, vat, etc) provided by the end user was invalid.
TradingPartnerIdMissing Bad Request Integrator Trading partner's resource id has not been sent as a parameter in the request.
TradingPartnerNotACompany tpIds Not Found Integrator Trading partner requested through a company id does not belong to company and cannot be requested.
TradingPartnerNotBehindServiceProvider tpName; spId Bad Request Integrator The connected trading partner does not exist behind the provided service provider
TradingPartnerNotFound id Not Found Integrator Trading partner with the specified id could not be found
TransportConfigNotAvailable documentType; spName Bad Request Integrator The provided transport configuration id is not available for the requested document type and service provider.
TransportConfigNotValidForServiceProviderConfig id Not Found Integrator The defaultTransportConfigOverride is not valid for the ServiceProviderConfig

available-documents

Operations on available documents

List all available documents for a trading partner

Gets a list of all available documents a TradingPartner can have as supported documents.

Responses

Response Schema: application/json
Array ()
documentType
required
string
direction
required
string
Enum: "Send" "Receive"

Response samples

Content type
application/json
[
]

connect-document-requests

Operations on requests to connect documents

Get all requests to connect documents

query Parameters
owningTradingPartnerId
required
string

The TradingPartner to get ConnectDocumentRequests for. If no TradingPartner is specified, ConnectDocumentRequests are returned for all TradingPartners the calling user has access to.

connectedTradingPartnerId
string

Id of the TradingPartner that is the target of the wanted ConnectDocumentRequests.

requestDirection
string
Enum: "Send" "Receive"

Specify whether to get incoming or outgoing ConnectDocumentRequests. If direction is not specified, both incoming and outgoing ConnectDocumentRequests are returned.

unansweredRequestsOnly
boolean

If true, only unanswered ConnectDocumentRequests are returned. If false, both answered and unanswered ConnectDocumentRequests are returned. The default value is true.

searchTerm
string

Return only ConnectDocumentRequests that match the search term. The search string will be matched against the name of the TradingPartner the ConnectDocumentRequest was sent to or received from.

documentType
string

The document type the request is for

direction
string (Direction)
Enum: "Send" "Receive"

The direction of the document type in the request.

offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer >= 0

The maximum number of items in the collection resource response.

Responses

Response Schema: application/json
required
object (CollectionMetadata)
required
Array of ReceiveApprovalRequest (object) or SendApprovalRequest (object) or RoutingByPageroRequest (object) or RoutingByReceiverRequest (object) (ConnectDocumentRequest)

Response samples

Content type
application/json
{
}

Delete a connected document request

Delete a ConnectDocumentRequest. It is only possible to delete sent ConnectDocumentRequests that have not already been responded to.

path Parameters
id
required
string

The id of the ConnectDocumentRequest

Responses

Response samples

Content type
application/json
[
]

Respond to a connect document request

path Parameters
id
required
string

The id of the ConnectDocumentRequest

Request Body schema: application/json

The response of the connect document request

action
required
string
Enum: "Approve" "Reject"

How to respond to the request. Should be either 'Approve' or 'Reject'.

message
string

A message to send to the requester.

Responses

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
[
]

connected-receive-documents

Operations on connected receive documents

Connect new exchange for receiving documents

Connect a new document exchange to the connected party.

path Parameters
id
required
string

The TradingPartnerConnection id

Request Body schema: application/json
One of
objectType
required
string
Value: "ConnectedReceiveDocumentSetup"
documentType
required
string

The document type that the requesting TradingPartner wants to receive from the requested TradingPartner.

Responses

Response Schema: application/json
id
required
string
automatedApproval
required
boolean

When a TradingPartner has no requirement for connecting to it, then no ConnectedSendDocument or ConnectedReceiveDocument might be created as part of the setup. But when sending the first document a ConnectedSendDocument or ConnectedReceiveDocument will be automatically created as part of the document exchange, in order to prevent disruptions of already established connections if the TradingPartner changes the ConnectedReceiveRequirement in the future.

documentType
required
string
status
required
string
Enum: "Approved" "Rejected" "Deleted" "WaitingForYou" "WaitingForOtherParty" "WaitingForRouting"

The status of the ConnectedReceiveDocument. Shows whether it is approved, rejected, canceled or waiting for approval or routing.

Request samples

Content type
application/json
Example
{
}

Response samples

Content type
application/json
{
}

Delete a connected receive document

path Parameters
id
required
string

The ConnectedReceiveDocument id

Responses

Response samples

Content type
application/json
[
]

connected-send-documents

Operations on connected send documents

Connect new exchange for sending documents

Connect a new document exchange to the connected party.

path Parameters
id
required
string

The TradingPartnerConnection id

Request Body schema: application/json

The ConnectedSendDocument to create

One of
objectType
required
string
Value: "ConnectedSendDocumentSetup"
documentType
required
any

The document type that the requesting TradingPartner wants to send to the requested TradingPartner.

object (ServiceProviderReference)

A reference to a ServiceProvider

object (TransportConfigReference)

A reference to a TransportConfig

Responses

Response Schema: application/json
id
required
string
automatedApproval
required
boolean

When a TradingPartner has no requirement for connecting to it, then no ConnectedSendDocument or ConnectedReceiveDocument will be created as part of the setup. But when sending the first document a ConnectedSendDocument or ConnectedReceiveDocument will be automatically created as part of the document exchange, in order to prevent disruptions of already established connections if the TradingPartner changes the ReceiveRequirement in the future.

documentType
required
string
object

A reference to a ServiceProvider

object

A reference to a TransportConfig

enabled
required
boolean

If enabled is set to false, no documents will be delivered through this ConnectedSendDocument. Can be used to temporarily inactivate a ConnectedSendDocument in order to send documents through other delivery services instead like print or email distribution.

status
required
string
Enum: "Approved" "Rejected" "Deleted" "WaitingForYou" "WaitingForOtherParty" "WaitingForRouting"

The status of the ConnectedSendDocument. Shows whether it is approved, rejected, canceled or waiting for approval or routing.

Request samples

Content type
application/json
Example
{
}

Response samples

Content type
application/json
{
}

Update a connected send document

Updates the enable setting on a ConnectedSendDocument.

path Parameters
id
required
string

The ConnectedSendDocument id

Request Body schema: application/json

The updated ConnectedSendDocument

enabled
required
boolean

If enabled is set to false, no documents will be delivered through this ConnectedSendDocument. Can be used to temporarily inactivate a ConnectedSendDocument in order to send documents through other delivery services instead like print or email distribution.

Responses

Response Schema: application/json
id
required
string
automatedApproval
required
boolean

When a TradingPartner has no requirement for connecting to it, then no ConnectedSendDocument or ConnectedReceiveDocument will be created as part of the setup. But when sending the first document a ConnectedSendDocument or ConnectedReceiveDocument will be automatically created as part of the document exchange, in order to prevent disruptions of already established connections if the TradingPartner changes the ReceiveRequirement in the future.

documentType
required
string
object

A reference to a ServiceProvider

object

A reference to a TransportConfig

enabled
required
boolean

If enabled is set to false, no documents will be delivered through this ConnectedSendDocument. Can be used to temporarily inactivate a ConnectedSendDocument in order to send documents through other delivery services instead like print or email distribution.

status
required
string
Enum: "Approved" "Rejected" "Deleted" "WaitingForYou" "WaitingForOtherParty" "WaitingForRouting"

The status of the ConnectedSendDocument. Shows whether it is approved, rejected, canceled or waiting for approval or routing.

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Delete a connected send document

path Parameters
id
required
string

The ConnectedSendDocument id

Responses

Response samples

Content type
application/json
[
]

connections

Operations on trading partner connections

Retrieve a trading partner connection

path Parameters
id
required
string

The TradingPartnerConnection id

Responses

Response Schema: application/json
id
required
string
buyerAndSupplierIds
required
Array of strings
owningTradingPartnerId
required
string

The TradingPartner that owns the Connection

required
Array of objects (ConnectedSendDocument)
required
Array of objects (ConnectedReceiveDocument)
required
object

Response samples

Content type
application/json
{
}

Update a trading partner connection

Update buyer and supplier ids on a Trading Partner Connection

path Parameters
id
required
string

TradingPartnerConnection id

Request Body schema: application/json

The TradingPartnerConnection

buyerAndSupplierIds
required
Array of strings

Responses

Response Schema: application/json
id
required
string
buyerAndSupplierIds
required
Array of strings
owningTradingPartnerId
required
string

The TradingPartner that owns the Connection

required
Array of objects (ConnectedSendDocument)
required
Array of objects (ConnectedReceiveDocument)
required
object

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Delete a trading partner connection

path Parameters
id
required
string

The TradingPartnerConnection id

Responses

Response samples

Content type
application/json
[
]

Fetch a connection by the connected trading partner's id

Gets a TradingPartnerConnection owned by a specific TradingPartner that matches the given trading partner id.

path Parameters
id
required
string

Id of the TradingPartner that owns the TradingPartnerConnection.

connectedTradingPartnerId
required
string

Id of the connected TradingPartner.

Responses

Response Schema: application/json
id
required
string
buyerAndSupplierIds
required
Array of strings
owningTradingPartnerId
required
string

The TradingPartner that owns the Connection

required
Array of objects (ConnectedSendDocument)
required
Array of objects (ConnectedReceiveDocument)
required
object

Response samples

Content type
application/json
{
}

Create a new connection

path Parameters
id
required
string

Id of the TradingPartner that owns the connection.

Request Body schema: application/json
connectedTradingPartnerId
required
string

Id of the TradingPartner to connect to.

buyerAndSupplierIds
required
Array of strings

Buyer and Supplier ids for the connection.

Responses

Response Schema: application/json
id
required
string
buyerAndSupplierIds
required
Array of strings
owningTradingPartnerId
required
string

The TradingPartner that owns the Connection

required
Array of objects (ConnectedSendDocument)
required
Array of objects (ConnectedReceiveDocument)
required
object

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Search for connections owned by a specific trading partner

Gets Connectionss owned by a specific TradingPartner that matches the search parameters. If no parameters are given, all connections are returned.

path Parameters
id
required
string

Id of the TradingPartner that owns the potential TradingPartnerConnections.

query Parameters
documentType
string

If specified, only TradingPartnerConnections where this document type is connected, will be returned.

direction
string (Direction)
Enum: "Send" "Receive"

If specified, only TradingPartnerConnections where this document type is connected, will be returned.

searchTerm
string

The search term to use. May be a TradingPartner name or identifier (organization number, VAT number etc.). May also be a buyer or supplier number.

offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer >= 0

The maximum number of items in the collection resource response.

Responses

Response Schema: application/json
required
object (CollectionMetadata)
required
Array of objects (Trading partner connections)

Response samples

Content type
application/json
{
}

Get all connection options for connections between two trading partners

Gets collections of ConnectedSendDocumentOptions and ConnectedReceiveDocumentOptions containing information needed when creating new document exchanges from a specific TradingPartner to a target TradingPartner.

path Parameters
id
required
string

Id of the TradingPartner that wants to create a new document exchange.

targetTradingPartnerId
required
string

Id of the TradingPartner to establish a document exchange with.

Responses

Response Schema: application/json
required
Array of objects (ConnectedSendDocumentOption)
required
Array of objects (ConnectedReceiveDocumentOption)

Response samples

Content type
application/json
{
}

trading-partners

Operations on trading partners

Get the trading partner related to a company

path Parameters
id
required
string

Company id

Responses

Response Schema: application/json
id
required
string
version
required
integer

States the current version of the TradingPartner

companyId
string

The id of the company owning the TradingPartner.

name
required
string
department
string
unitNumber
string
required
Array of objects (TradingPartnerId) non-empty
required
object (Address)
required
object (Contact)
required
Array of objects (SupportedSendDocument)
required
Array of objects (SupportedReceiveDocument)

Response samples

Content type
application/json
{
}

Get trading partner by id

path Parameters
id
required
string

The TradingPartner id

Responses

Response Schema: application/json
id
required
string
version
required
integer

States the current version of the TradingPartner

companyId
string

The id of the company owning the TradingPartner.

name
required
string
department
string
unitNumber
string
required
Array of objects (TradingPartnerId) non-empty
required
object (Address)
required
object (Contact)
required
Array of objects (SupportedSendDocument)
required
Array of objects (SupportedReceiveDocument)

Response samples

Content type
application/json
{
}

Update a trading partner

path Parameters
id
required
string

The TradingPartner id

Request Body schema: application/json

The TradingPartner

version
required
integer

States the current version of the TradingPartner

name
required
string
department
string
unitNumber
string
required
Array of objects (TradingPartnerId) non-empty
required
object (Address)
required
object (Contact)
required
Array of objects (SupportedSendDocument)
required
Array of objects (SupportedReceiveDocument)

Responses

Response Schema: application/json
id
required
string
version
required
integer

States the current version of the TradingPartner

companyId
string

The id of the company owning the TradingPartner.

name
required
string
department
string
unitNumber
string
required
Array of objects (TradingPartnerId) non-empty
required
object (Address)
required
object (Contact)
required
Array of objects (SupportedSendDocument)
required
Array of objects (SupportedReceiveDocument)

Request samples

Content type
application/json
{
}

Response samples

Content type
application/json
{
}

Search for trading partners, with possible accompanying connections

Gets TradingPartners that match the search parameters. If there is a connection from the owning trading partner to a trading partner in the search result, that connection is returned along with the trading partner.

query Parameters
owningTradingPartnerId
required
string

Id of the TradingPartner that owns the potential Connections.

documentType
string

The document type that the returned TradingPartners must support.

direction
string (Direction)
Enum: "Send" "Receive"

The direction of the document type that the TradingPartners must support.

searchTerm
string

The search term to use. May be a TradingPartner name or identifier (organization number, VAT number etc.). May also be a buyer or supplier number.

offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer >= 0

The maximum number of items in the collection resource response.

Responses

Response Schema: application/json
required
object (CollectionMetadata)
required
Array of any (Search result)

Response samples

Content type
application/json
{
}

service-providers

Get all service providers

Gets all ServiceProviders available.

Responses

Response Schema: application/json
Array ()
id
required
string
name
required
string
required
Array of objects (ServiceDetail)
Array of objects (ServiceProviderReference)

Response samples

Content type
application/json
[
]

Get all supported id types

Gets all supported id types. A country code filter can be provided to get the id types that are supported for a specific country.

query Parameters
countryCode
string

If specified, only id types that are supported in a specific country will be returned.

Responses

Response Schema: application/json
Array ()
type
required
string

The Type of the TradingPartnerId. Country specific ids will start with country code + colon

vat
required
boolean

The id type is a vat number

legalEntityIdentifier
required
boolean

If true, the id type is a legal entity identifier that can be shared between several Trading Partners. Only one of those Trading Partners can have usedForRouting set to true. It will not be possible to add several ids with the same type on a Trading Partner for ids with legalEntityIdentifier set. If false, the id type can not be shared between Trading Partners and usedForRouting will always be true. It will be possible to add additional ids with the same type on a Trading Partner and then overriding specific Supported Documents on the Trading Partners to use the additional id instead of the default one (if enabled on the Trading Partner).

Response samples

Content type
application/json
[
]