Skip to content

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:

  1. Polling: TTN will use the Retrieve method (/json/orderDetail) every 5 minutes until the ticket number is obtained.
  2. 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

ParameterTypeRequiredDescription
authenticationObjectYesAuthentication details
  └ partnerIdStringYesPartner Id
  └ signStringYesSignature for the request
ticketingObjectYes
  └ orderNumStringYesUnique order number on the Partner side

Request Example

json
{
  "authentication": {
    "partnerId": "{{PARTNER_ID}}",
    "sign": "{{SIGN}}"
  },
  "ticketing": {
    "orderNum": "917661326265357401"
  }
}

Response Parameters

ParameterTypeRequiredDescription
└ errorCodeStringYesError code, refer to Error Code List
└ errorMsgStringYesError message
dataObjectYes
  └ orderNumStringNoUnique order number on the Partner side
  └ orderAmountIntegerNoOrder Amount

Response Example

json
{
  "errorCode": "0",
  "errorMsg": "ok",
  "data": {
    "orderNum": "917661326265357401",
    "orderAmount": 33.96
  }
}

Error Code List

errorCodeerrorMsgDescription
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
B009Order status is invalidOrder status is invalid
B010Order number not existOrder number does not exist
B022Ticketing failedBalance left is not enough to pay the order
B024Order has been paidOrder has already been paid. No need to pay again

TTN Octo API documentation