Ticketing
This service queues the PNR for ticketing within the Partner's internal system.
To check the ticket issuance result (and retrieve the ticket number) from TTN's side, there are two options:
- Polling: TTN will use the Retrieve method (
/json/orderDetail) every 5 minutes until the ticket number is obtained. - Callback: Once the ticket is issued or failed, the Partner will send an Ticket Issue Notify callback to TTN (
Webhook URL). More information here - Ticket Issue Notify.
Endpoint
Method: POST
URL: /json/ticketing
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ authentication | Object | Yes | Authentication details |
| └ partnerId | String | Yes | Partner Id |
| └ sign | String | Yes | Signature for the request |
| └ ticketing | Object | Yes | |
| └ orderNum | String | Yes | Unique order number on the Partner side |
Request Example
json
{
"authentication": {
"partnerId": "{{PARTNER_ID}}",
"sign": "{{SIGN}}"
},
"ticketing": {
"orderNum": "917661326265357401"
}
}Response Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ errorCode | String | Yes | Error code, refer to Error Code List |
| └ errorMsg | String | Yes | Error message |
| └ data | Object | Yes | |
| └ orderNum | String | No | Unique order number on the Partner side |
| └ orderAmount | Integer | No | Order Amount |
Response Example
json
{
"errorCode": "0",
"errorMsg": "ok",
"data": {
"orderNum": "917661326265357401",
"orderAmount": 33.96
}
}Error Code List
| errorCode | errorMsg | 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 |
| B009 | Order status is invalid | Order status is invalid |
| B010 | Order number not exist | Order number does not exist |
| B022 | Ticketing failed | Balance left is not enough to pay the order |
| B024 | Order has been paid | Order has already been paid. No need to pay again |