API V1

Endpoint (Staging)

https://gw-dev.saladin.vn

Endpoint (Production)

​https://gw.saladin.vn

API Details

API #0 - get access token

Purpose: The partner must call this API to get the access token to use to access Saladin's web page that is used to fulfill the passenger information.

Trigger when: Before the partner system redirects to Saladin's web page.

get
Header parameters
X-Sld-TimestampnumberRequired

Timestamp when calling request in second

X-Sld-ClientKeystringRequired

Client Key which is given to partner

X-Sld-SignaturestringRequired

Signature which is calculated by Saladin guide

Responses
200
A successful response.
application/json
get
GET /api/v1/flight-insurance/vendor/access-token HTTP/1.1
Host: 
X-Sld-Timestamp: 1
X-Sld-ClientKey: text
X-Sld-Signature: text
Accept: */*
{
  "code": 1,
  "message": "text",
  "data": {
    "token": "text",
    "expire_in": 1
  }
}

API #1 - get insurance products

  • Purpose: The partner can request this API to get available insurance product for the flight trip that the user is booking.

  • Trigger when: The partner can request this API when

    • Bookers are booking flights to get the premium and advise their customers.

    • Recalculate the premium of the insurance product after the booker issued the flight ticket.

post
Header parameters
X-Sld-TimestampnumberRequired

Timestamp when calling request in second

X-Sld-ClientKeystringRequired

Client Key which is given to partner

X-Sld-SignaturestringRequired

Signature which is calculated by Saladin guide

Body
Responses
200
A successful response.
application/json
post
POST /api/v1/flight-insurance/vendor/insurance-products HTTP/1.1
Host: 
X-Sld-Timestamp: 1
X-Sld-ClientKey: text
X-Sld-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 312

{
  "trip": {
    "total_adults": 1,
    "total_children": 1,
    "total_infants": 1
  },
  "flights": [
    {
      "depart_at": "text",
      "arrive_at": "text",
      "departure_station_code": "text",
      "destination_station_code": "text",
      "airline_code": "text",
      "flight_no": "text",
      "is_transit": "false"
    }
  ],
  "passengers": [
    {
      "full_name": "text",
      "dob": "text",
      "pax_group": "text"
    }
  ]
}
{
  "code": 1,
  "message": "text",
  "data": {
    "insur_products": [
      {
        "code": "text",
        "name": "text",
        "premium_amount": 1,
        "link_detail_info": "text"
      }
    ]
  }
}

API #2 - update policy

  • Purpose: The partner can request this API to change some insurance contract information, i.e. passenger's info, flight info,... But the change is only accepted 3 hours before departure time.

  • Trigger when:

  • Body:

put
Path parameters
policy_idstringRequired
Header parameters
X-Sld-TimestampnumberRequired

Timestamp when calling request in second

X-Sld-ClientKeystringRequired

Client Key which is given to partner

X-Sld-SignaturestringRequired

Signature which is calculated by Saladin guide

Body
product_codestringOptional
order_idstringOptional
pnrstringOptional
Responses
200
A successful response.
application/json
put
PUT /api/v1/flight-insurance/vendor/policies/{policy_id} HTTP/1.1
Host: 
X-Sld-Timestamp: 1
X-Sld-ClientKey: text
X-Sld-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 509

{
  "product_code": "text",
  "flights": [
    {
      "depart_at": "text",
      "arrive_at": "text",
      "departure_station_code": "text",
      "destination_station_code": "text",
      "airline_code": "text",
      "flight_no": "text",
      "is_transit": "false"
    }
  ],
  "customer": {
    "full_name": "text",
    "email": "text",
    "phone_no": "text",
    "dob": "text",
    "nationality": "text",
    "civil_id": "text",
    "address": "text"
  },
  "passengers": [
    {
      "full_name": "text",
      "dob": "text",
      "nationality": "text",
      "civil_id": "text",
      "email": "text",
      "phone_no": "text",
      "pax_group": "adult"
    }
  ],
  "order_id": "text",
  "pnr": "text"
}
{
  "code": 1,
  "message": "text",
  "data": {
    "policy": {
      "policy_id": "text",
      "policy_number": "text"
    },
    "new_premium_amount": 1,
    "payment_amount": 1
  }
}

API #3 - Create policy

  • Purpose: With this API, The partner can send the information about the flight to create the policy in the Saladin system.

  • Body:

post
Header parameters
X-Sld-TimestampnumberRequired

Timestamp when calling request in second

X-Sld-ClientKeystringRequired

Client Key which is given to partner

X-Sld-SignaturestringRequired

Signature which is calculated by Saladin guide

Body
product_codestringOptional
premium_amountinteger · int64Optional
order_idstringOptional
pnrstringOptional
Responses
200
A successful response.
application/json
post
POST /api/v1/flight-insurance/vendor/policies HTTP/1.1
Host: 
X-Sld-Timestamp: 1
X-Sld-ClientKey: text
X-Sld-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 528

{
  "product_code": "text",
  "premium_amount": 1,
  "flights": [
    {
      "depart_at": "text",
      "arrive_at": "text",
      "departure_station_code": "text",
      "destination_station_code": "text",
      "airline_code": "text",
      "flight_no": "text",
      "is_transit": "false"
    }
  ],
  "customer": {
    "full_name": "text",
    "email": "text",
    "phone_no": "text",
    "dob": "text",
    "nationality": "text",
    "civil_id": "text",
    "address": "text"
  },
  "passengers": [
    {
      "full_name": "text",
      "dob": "text",
      "nationality": "text",
      "civil_id": "text",
      "email": "text",
      "phone_no": "text",
      "pax_group": "adult"
    }
  ],
  "order_id": "text",
  "pnr": "text"
}
{
  "code": 1,
  "message": "text",
  "data": {
    "policy": {
      "policy_id": "text",
      "policy_number": "text"
    },
    "claim_url": "text",
    "link_detail_info": "text"
  }
}

Last updated