Show/Hide Toolbars

How to set up Ongoing Purchase

Request definition

Figure 7, Create a Service Provider - step 2 - Request definition. Not all the Variables may be listed

Figure 7, Create a Service Provider - step 2 - Request definition. Not all the Variables may be listed

Attributes

Decimal Separator

Optional

Explanation:Decimal separator to be used in the request.

Path

Mandatory

Explanation:Path to the SOA service.

Post Format

Mandatory

Explanation:Post format for the request. See SOA specifications Online Purchase Transfer.

The Post Format shall have a format that match the Service Request Type.

The {nn} variables will be replaced with data from the database when sending the request. The meaning of each variable is explained next to the Post Format box.

It is allowed to add fixed values to the request. See the JOSN example where e.g. the sellingPointID is set to WTP app.

Request Content Type

Optional

Explanation:Select content type. If empty then content type “application/x-www-form-urlencoded” is used for REST.

Service Request Type

Mandatory

Values:JSON
XML

Use HTTP PUT at update

Optional

Explanation:Normally HTTP POST is used but if it is an update of an Ongoing Purchase it is possible to use HTTP PUT when accessing the SOA service.

Web Service Type

Mandatory

Explanation:Type of web service, REST or SOAP.

 

Example in XML format

<m:OngoingPurchase xmlns:m="http://xxx.mipermit.net">
  <m:Parking>
    <m:PurchaseGuid>{0}</m:PurchaseGuid>
    <m:TerminalGuid>{1}</m:TerminalGuid>
    <m:TerminalID>{2}</m:TerminalID>
    <m:ArticleID>{3}</m:ArticleID>
    <m:TariffPackageID>{4}</m:TariffPackageID>
    <m:VAT>{5}</m:VAT>
    <m:Amount>{6}</m:Amount>
    <m:Currency>{7}</m:Currency>
    <m:CreateDate>{8}</m:CreateDate>
    <m:StartDate>{9}</m:StartDate>
    <m:EndDate>{10}</m:EndDate>
    <m:Code>{11}</m:Code>
  </m:Parking>
</m:OngoingPurchase>

 

Example in JSON format

{{ "providerId": "cale",
"transactionId": "{0}",
"productDescription": "Parking rights via cale app",
"sellingPointId": "WTP app",
"sellingPointLocation": "{2}",
"areaManagerId": "KK",
"areaId": "{12}",
"vehicleId": "{11}",
"validityBegin": "{9}",
"validityEnd": "{10}",
"validityCancelled": false,
"validityHours": "0-24",
"prid": "{26}"
}}

 

Response definition

The response can be sent in 3 formats:

Figure 8, Create a Service Provider - step 3 - Response definition. Select service Response Type

Figure 8, Create a Service Provider - step 3 - Response definition. Select service Response Type

The HTTP option does not need any additional configuration

After selecting options 2 or 3 the section will refresh with additional fields

The table below the format images describes the fields available

Figure 9, Create a Service Provider - step 3 - Response definition JSON

Figure 9, Create a Service Provider - step 3 - Response definition JSON

Figure 10, Create a Service Provider - step 3 - Response definition XML

Figure 10, Create a Service Provider - step 3 - Response definition XML

Attribute

Explanation

Service Response Type

HTTP Status Code

JSON

XML

Response Node XPath

XPath for response.

Response External ID Attribute

Name for attribute that contains external id for response.

Response External ID Validation Value

This value is used to validate the external id in the response from the third party service.

If set, the "Response External ID Validation Value" should equal the value of the External ID received in the service response otherwise the call will be seen as unsuccessful.

Response External Description Attribute

Name for attribute that contains external description for response.

Response Result Code Attribute

Name for attribute that contains external code for response.