Ticket Notify
INFO
Basically, the verification of ticket issuance on the TTN side is done by a repeated request to /json/orderDetail. However, there is an alternative way: the partner can send a callback to notify TTN about the successful or unsuccessful ticket issuance.
TTN will provide a webhook/URL, based on HTTP/HTTPS protocol. 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
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
json
{
"type": "ticketing_status",
"orderNum": "917736761358533701",
"orderStatus": "ISSUED",
"callbackMessage": null
}Failed issue Request Example
json
{
"type": "ticketing_status",
"orderNum": "917736761358533701",
"orderStatus": "RSV_FAIL",
"callbackMessage": "Rejected by Airline"
}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
json
{
"success": true
}Failed Response Example
json
{
"success": false,
"message": "Order number is not found"
}