Skip to content

Penalty API

The Penalty API allows to retrieve fare rules (fare notes), along with penalty details for ticket refunds and reissues/revalidation, prior to creating a booking.

Please note that fare rules can be provided as free text.

Endpoint

Method: POST

URL: /json/penalty

Request Parameters

ParameterTypeRequiredDescription
authenticationObjectYesAuthentication details
  └ partnerIdStringYesPartner Id
  └ signStringYesSignature for the request
dataObjectYes
└ searchKeyStringYesUnique search identification from Shopping API.
└ solutionIdStringYesUnique solution identification from Shopping API.

Request Example

json
{
  "authentication": {
    "partnerId": "{{PARTNER_ID}}",
    "sign": "{{SIGN}}"
  },
  "data": {
    "searchKey": "ISTLON20260814YLONIST20260822Y1100",
    "solutionId": "rmm6MrVT9sqQd6BrNDONH2MLhoKdwGcddhXh9+Wwl8soDBwvLz7qDNm0hFcAay5m8Y5MXjGhKMbeM8hbDKZVZrjalM3U3ixzSpgiWMhbc0l54Wodx2d1VRrzJw3i39+IchK14mM4usIbL83NjLAsXqKS95fnSKUwlOA4V7tOTE6RALKScJ3jiJ4/quVebRmw1Smum12qAkec11m82wghahMq9NTfh0tXP1ZBnuCK/Yot3k/qX69k/gMOyQRG6KQT/KRnH1eB3yynOaiRtpWM7hh2AvrBwwZ9I0bDHzySwhJhGJtYc4SYrmIrH22lmw9XGjQ0ego+9NM0Z3RuRFxLVpB8FHLwKQ4PPJFEO+DpXWGKnjQI0keZrRRm6kg3B6oDcBToRtVU35VBDLAm+hp39w=="
  }
}

Response Parameters

ParameterTypeRequiredDescription
└ errorCodeStringYesError code
└ errorMsgStringYesError message. If return to "OK", order cancels successfully
dataObjectYes
  └ penalties[String]YesPenalties are ordered by time of journey segments. Using "\n" as a line break
  └ remarkStringNoIf the penalties are not retrieved, remark will apply

Response Example

json
{
  "errorCode": "0",
  "errorMsg": "ok",
  "data": {
    "penalties": [
      "Refer to structured rules."
    ]
  }
}

Error Code List

Error codesError messagesDescription
0okRequest has been processed successfully
S001System errorSystem error
P001-Wrong parameter
B002Partner is not existsPartnerID does not exist
B003Illegal signIllegal sign. Please check your signature
B023Penalty failedCollecting fare rule failed

TTN Octo API documentation