Ticket Notify
Partner will send issue callback when the tickets are issued, orderStatus = ISSUED. In another case, if the request was rejected, a rejected orderStatus would be provided - RSV_FAIL
INFO
Basically, the verification of ticket issuance on the TTN side is done by a repeated request to /json/orderDetail. However, there is the required alternative way: the partner can send a callback to notify TTN about the successful or unsuccessful ticket issuance.
INFO
TTN provides the webhook/URL dynamically in the /preciseBooking response via the notifyUrl parameter, so no hardcoding is required on the partner's side. To enable this, the partner must provide their credentials, and TTN will configure the returned notifyUrl value accordingly.
Endpoint
Method: POST
URL: Webhook URL - TTN will send the Webhook URL in the /json/preciseBooking request - notifyUrl input parameter.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ type | String | Yes | Type for issue callback - "ticketing_status" |
| └ orderNum | String | Yes | Unique order number on the Partner side |
| └ orderStatus | String | Yes | Order Status, refer to Order Status List. Success issue - "ISSUED". Failed issue - "RSV_FAIL" |
| └ callbackMessage | String | No | Detailed information about callback request (e.g. Rejected by Airline) |
Success issue Request Example
{
"type": "ticketing_status",
"orderNum": "917736761358533701",
"orderStatus": "ISSUED",
"callbackMessage": null
}Failed issue Request Example
{
"type": "ticketing_status",
"orderNum": "917736761358533701",
"orderStatus": "RSV_FAIL",
"callbackMessage": "Rejected by Airline"
}TIP
It is important that the corresponding status is reflected immediately in the response to the /orderDetail request.
Response Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ success | Boolean | Yes | Handling status. Success issue - true. Failed issue - false |
| └ message | String | No | Issue message (returned only when success = false; contains error details) |
Success Response Example
{
"success": true
}Failed Response Example
{
"success": false,
"message": "Order number is not found"
}