Flight Delay Notification

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.

HeaderExpected Value
Cermati-SignatureRefer to Signature section
Content-Typeapplication/json

Body

The following are the details of the request body of the webhook.

Object FieldsTypeRequiredDescription
refNostringyes/noUnique identifier from the partner, this must be unique per application.
Mandatory if the orderId is not filled
orderIdstringyes/noThe order ID of the application in partner’s side.
Mandatory if the refNo is not filled
trxIdstringyesApplication transaction id
tripsobject[]yesList of trips included under the same order ID. Refer to Trip Object
benefitClaimsobject[]yesThe benefits that can be claimed by the customer. Refer to Benefit Claim Object
updatedAtstringyesTimestamp of the status change occured (ISO 8601 format with timezone)

Shared Object Models

Trip Object

Object FieldsTypeRequiredDescription
tripIdstringyesUnique identifier associated with the trip. Accepts alphanumeric without special characters.
tripTypeenumyesType of trip, options available:
TRAIN
FLIGHT
tripLegsobject[]yesTrip legs taken for a trip. Must contain at least 1 leg. Refer to Trip Leg Object

Trip Leg Object

Object FieldsTypeRequiredDescription
tripNostringyesTrip Number can be mapped into Flight Number, Train Number
tripNamestringyesTrip name associated with bus name, train name or airline name e.g. Taksaka Luxury, Argo Parahyangan, Citilink, Garuda Indonesia
classstringyesCabin class e.g. Economy, Business, Executive, First class
originobjectyesLocation origin, refer to Location Object
destinationobjectyesLocation destination, refer to Location Object
departureTimestringyesScheduled trip departure time (ISO 8601 format with timezone)
arrivalTimestringyesScheduled trip arrival time (ISO 8601 format with timezone)
actualDepartureTimestringyesActual trip departure time (ISO 8601 format with timezone)
actualArrivalTimestringnoActual trip arrival time (ISO 8601 format with timezone)
isDelayedDeparturebooleanyesThe flag to indicate whether the flight leg departure is delayed or not
isDelayedArrivalbooleannoThe flag to indicate whether the flight leg arrival is delayed or not

Location Object

Object FieldsTypeRequiredDescription
codestringyesCan follow standard IATA airport code for flight, or station code for train
typeenumyesIndicating the location type options available:
STATION
AIRPORT
namestringnoName of the location

Benefit Claim Object

Object FieldsTypeRequiredDescription
typestringyesThe type of benefit that can be claimed
compensationValuenumbernoThe compensation value that can be claimed
claimUrlstringyesLink for the customer to claim the insurance benefit.
The URL will be valid for 24 hours.
termsAndConditionsUrlstringnoLink 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.