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
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ authentication | Object | Yes | Authentication details |
| └ partnerId | String | Yes | Partner Id |
| └ sign | String | Yes | Signature for the request |
| └ data | Object | Yes | |
| └ searchKey | String | Yes | Unique search identification from Shopping API. |
| └ solutionId | String | Yes | Unique 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ errorCode | String | Yes | Error code |
| └ errorMsg | String | Yes | Error message. If return to "OK", order cancels successfully |
| └ data | Object | Yes | |
| └ penalties | [String] | Yes | Penalties are ordered by time of journey segments. Using "\n" as a line break |
| └ remark | String | No | If 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 codes | Error messages | Description |
|---|---|---|
| 0 | ok | Request has been processed successfully |
| S001 | System error | System error |
| P001 | - | Wrong parameter |
| B002 | Partner is not exists | PartnerID does not exist |
| B003 | Illegal sign | Illegal sign. Please check your signature |
| B023 | Penalty failed | Collecting fare rule failed |