This webhook notification will be triggered if one of the flights in the transportation insurance transaction has delayed departure or arrival. The delay condition may be different for each product.
Callback URL
Each partner can configure a callback URL for flight delay notification webhook.
POST {partner-url-path}
partner-url-path = URL from partner to receive webhook notification
The configuration can be done through Subscription API and Unsubscription API
Webhook Signature
Partners can optionally verify the authenticity of notifications sent by Cermati. A signature will be included in as a Cermati-Signature header request with the following format
Cermati-Signature: {prefix}={signature-value}
Example:
Cermati-Signature: v1=6ffbb59b2300aae63f272406069a9788598b792a944a07aba816edb039989a39
The prefix will be used as a versioning mechanism for the signature.
The signature value is generated using HMAC SHA256 as below.
signature = SHA256(trxId + updatedAt, secretKey)
trxId = insurance transaction ID
updatedAt = ISO Timestamp with timezone offset, of the updated status
secretKey = key will provided by Cermati during the integration process
Webhook Request
Each time a status is updated then a request with the following details will be made against the specified Callback URL.
Headers
The following are the details of the request headers of the webhook.
Header | Expected Value |
---|---|
Cermati-Signature | Refer to Signature section |
Content-Type | application/json |
Body
The following are the details of the request body of the webhook.
Object Fields | Type | Required | Description |
---|---|---|---|
refNo | string | yes/no | Unique identifier from the partner, this must be unique per application. Mandatory if the orderId is not filled |
orderId | string | yes/no | The order ID of the application in partner’s side. Mandatory if the refNo is not filled |
trxId | string | yes | Application transaction id |
trips | object[] | yes | List of trips included under the same order ID. Refer to Trip Object |
benefitClaims | object[] | yes | The benefits that can be claimed by the customer. Refer to Benefit Claim Object |
updatedAt | string | yes | Timestamp of the status change occured (ISO 8601 format with timezone) |
Shared Object Models
Trip Object
Object Fields | Type | Required | Description |
---|---|---|---|
tripId | string | yes | Unique identifier associated with the trip. Accepts alphanumeric without special characters. |
tripType | enum | yes | Type of trip, options available: TRAIN FLIGHT |
tripLegs | object[] | yes | Trip legs taken for a trip. Must contain at least 1 leg. Refer to Trip Leg Object |
Trip Leg Object
Object Fields | Type | Required | Description |
---|---|---|---|
tripNo | string | yes | Trip Number can be mapped into Flight Number, Train Number |
tripName | string | yes | Trip name associated with bus name, train name or airline name e.g. Taksaka Luxury, Argo Parahyangan, Citilink, Garuda Indonesia |
class | string | yes | Cabin class e.g. Economy, Business, Executive, First class |
origin | object | yes | Location origin, refer to Location Object |
destination | object | yes | Location destination, refer to Location Object |
departureTime | string | yes | Scheduled trip departure time (ISO 8601 format with timezone) |
arrivalTime | string | yes | Scheduled trip arrival time (ISO 8601 format with timezone) |
actualDepartureTime | string | yes | Actual trip departure time (ISO 8601 format with timezone) |
actualArrivalTime | string | no | Actual trip arrival time (ISO 8601 format with timezone) |
isDelayedDeparture | boolean | yes | The flag to indicate whether the flight leg departure is delayed or not |
isDelayedArrival | boolean | no | The flag to indicate whether the flight leg arrival is delayed or not |
Location Object
Object Fields | Type | Required | Description |
---|---|---|---|
code | string | yes | Can follow standard IATA airport code for flight, or station code for train |
type | enum | yes | Indicating the location type options available: STATION AIRPORT |
name | string | no | Name of the location |
Benefit Claim Object
Object Fields | Type | Required | Description |
---|---|---|---|
type | string | yes | The type of benefit that can be claimed |
compensationValue | number | no | The compensation value that can be claimed |
claimUrl | string | yes | Link for the customer to claim the insurance benefit. The URL will be valid for 24 hours. |
termsAndConditionsUrl | string | no | Link for viewing/downloading the applied terms and conditions |
Webhook Response
HTTP response status code from partner will be tracked and
- HTTP status code 200 will be acknowledged by Cermati as notification successfully received. No retry will be done.
- Other HTTP status code will be marked as failed and will be retried. Request will be retried up to 8 times with exponential backoff interval.