Skip to content
background-image background-image

Post CZ Connector

[ | version 3.0]

Connector

The connector is permitted for use of the platform background agent.

Connector processing type: Both (Row by row & Bulk), Default type: Bulk!

This connector allows to communicate with REST services of Post CZ API and its specific authentication method. More info in documentation 1 or 2.

TLS 1.3 is supported.

Using placeholders

Placeholders can be used to dynamically create content of request body or to modify configurations.

Input data can be referred by using placeholders:

  • ${input.ObjectID} will be replaced by value in ObjectID property of connector's input data
  • ${input} placeholder will be replaced by whole input data

Placeholders for body content creation

Body content can be configured directly or can be generated based on input by usage of placeholders. Final JSON or XML (based on configuration) take into account also data type of input columns. For example numbers are in JSON as numbers (without double quotes).

Assume the connector input data in the following format:

ID (Number) Name (String) Items (Complex)
1 Alice [{"ID":1},{"ID":2}]
2 Bob [{"ID":3},{"ID":4}]

Examples of using single cell placeholders for request body creation for JSON format. In this way also Complex or JSON types can be serialized.

{
  "CustomerID": ${input.ID},
  "CustomerName": ${input.Name},
  "IsActive": true,
  "ItemIDs": ${input.Items}
}

will generate request body

[
  {
    "CustomerID": 1,
    "CustomerName": "Alice",
    "IsActive": true,
    "ItemIDs": 
    [
      {"ID":1},
      {"ID":2}
    ]
  },
  {
    "CustomerID": 2,
    "CustomerName": "Bob",
    "IsActive": true,
    "ItemIDs": 
    [
      {"ID":3},
      {"ID":4}
    ]
  }
]

or whole body placeholder

${input}

will generate following request body which uses property names as column names from input schema

[
  {
    "ID": 1,
    "Name": "Alice",
    "Items":
    [
      {"ID":1},
      {"ID":2}
    ]
  },
  {
    "ID": 2,
    "Name": "Bob",
    "Items":
    [
      {"ID":3},
      {"ID":4}
    ]
  }
]

for input where just one row is present, following placeholder

${input.Items}

will generate array of rows from Complex type

[
  {"ID":1},
  {"ID":2}
]

Placeholders for other properties of configuration

For other string properties in configuration you can use single cell placeholder which can be wrapped by other text. So for endpoint you can dynamically change path of your request. But for these configuration properties placeholders are replaced just by first row of input data.

Example

api/endpoint/${input.Method}

Configuration

PostCZ API Connection configuration

API Token

Authorization and authentication by API key. This key is generated in User application. Through the administration interface, the customer has the option to invalidate the API key and issue a new one.

Secret Key

For the requests, the authorization by secret key is necessary. This secret key is generated in the user application, the secret key is not part of the request.

Testing Environment

If enabled requests are routed against testing environment https://b2b-test.postaonline.cz:444/restservices/ZSKService/v1/*

Throw Error OnNonSuccess Response

If connector should fail when response is not successful.

PostCZ API Endpoint configuration

Timeout

Define timeout in seconds. Default timeout is set to 100 seconds.

Body

Request body in which input data can be referred by using placeholders. Body is specific for selected request method. See documentation for more details.

Method

Following table shows supported request methods with links to more details about body and return types of requests:

Method Path Documentation
GET SendParcels sendParcels/idTransaction/{idTransaction} Detail
GET Stats sendParcels/stats Detail
GET ParcelDataHistory parcelDataHistory/parcelID/{parcelID} Detail
GET LetterWithCn22 letterWithCN22/idTransaction/{idTransaction} Detail
GET Location location/idContract/{idContract} Detail
POST SendParcels sendParcels Detail
POST ParcelPrinting parcelPrinting Detail
POST ParcelService parcelService Detail
POST ParcelStatus parcelStatus Detail
POST LetterWithCn22 letterWithCN22 Detail
POST Location location/idContract/{idContract} Detail
DELETE Location location/idContract/{idContract} Detail

Transaction ID

Transaction ID assigned by the B2B module.

Contract ID

ID CCK of submitter. In case of non-completion, the submitter is the caller.

Parcel ID

ID of parcel.

Date From

Date From in yyyy-MM-dd format.

Date To

Date To in yyyy-MM-dd format.

Input & Output Schema

Input

Input schema is optional

Output

The result of the API call is Base64 encoded and stored in the Content of the output schema. In addition to the content, the output also contains the StatusCode and Headers of the response. For more information about status codes, see the document HTTP response status codes. and the HTTP Headers headers.


search: exclude: true


Rest API output (ver. 2.0.0)

Column Data type Allow null Description
StatusCode string No HTTP response status code
Headers Rest API header 1.0.0 Yes Received HTTP headers as key/value pairs
Content Base64 Yes Serialized content of HTTP response into Base64
ContentText string Yes Serialized content of HTTP response into string

Rest API header (ver. 1.0.0)

Column Data type Allow null Description
Key String No Header name
Value String Yes Header value

Example output data

StatusCode: String Content: Base64 Headers: Rest API Header 1.0.0
201 ewogICAgIlN1Y2Nlc3MiOnRydWUKfQ== Output headers data

Output headers data

Key: String Value: String
Transfer-Encoding chunked
Connection keep-alive
Cache-Control private
Date Thu, 17 Feb 2022 19:58:36 GMT
Server nginx/1.14.1
X-AspNet-Version 4.0.30319
X-Powered-By ASP.NET

where decoded response Content is:

{
    "Success":true
}

Release notes

3.0.4

  • Fixed shared nuget package versions.

3.0.3

  • Fixed right processing of nullable properties.