I am developing for the

market, looking for the

API Documentation.

Home

>

API Products

>

Hong Kong - Insurance API Documentation

Insurance

Summary

This API returns customer’s source accounts eligible for insurance booking.

The Insurance API uses the authorization_code grant type, for authorization details CLICK HERE

Want to try this API out on our Playground?

Go play now
Endpoints on this page
post /v1/insurance/bookings CustomerInsuranceBooking
get /v1/insurance/bookings/sourceAccounts InsuranceSourceAccountEligibility

CustomerInsuranceBooking

post /v1/insurance/bookings
Description

This API will debit the customer and pass the policy details to insurance host.

Header Parameters
Authorization
string required
The most recent Authorization token. This will have the format Bearer + {space} + {accessToken}. Example: Bearer KGNsaWVudF9pZDpjbGllbnRfc2VjcmV0KQ==.
uuid
string required
128 bit random UUID generated uniquely for every request.
Accept
string required
Content-Type that are acceptable for the response.
client_id
string required
Client ID generated during application registration.
Content-Type
string required
application/json
clientDetails
string Optional
This field is used to capture device,browser and network information. Refer the developer portal for more information.These are the fields which will be passed as part of the header devicePrint,deviceTokenCookie,userIpAddress,userAgent,hardwareId,simId,deviceModel,deviceName,deviceOsName,deviceOsVersion,multitaskingSupportFlag,languageSupport,wifiMacAddress,cellTowerId,locationAreaCode,rsaApplicationKey,wapClientId,mobileCarrierCode,mobileCountryCode,osId,geoLongitude,geoLatitude,geoHorizontalAccuracy,geoAltitude,geoAltitudeAccuracy,geoSpeed,geoTimestamp,geoStatus,basicServiceSetId,signalStrength,wifiChannel,serviceSetId
Body Parameters
CustomerInsuranceBookingRequest
required
CustomerInsuranceBookingRequest
Show schema
  • cURL
  • Ruby
  • Python
  • PHP
  • Java
  • Node
  • Go
  • Swift

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Responses
200

Successful operation.
This operation returns no content.
400

fatalinvalidRequestMissing or invalid parameters
errorinsufficientFundInsufficient fund
errortempServiceSuspensionDueToNaturalCalamityTemporary service suspension due to natural calamities
errorinvalidAccountStatusAccount status is invalid
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for post /v1/insurance/bookings
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
401

errorunAuthorizedAuthorization credential is missing or invalid
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for post /v1/insurance/bookings
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
403

erroraccessNotConfiguredAccess is not configured for this resource
errormfaRequiredMFA is required
errortransactionDeniedTransaction is denied
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for post /v1/insurance/bookings
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
500

fatalserverUnavailableThe request failed due to an internal error
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for post /v1/insurance/bookings
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}

InsuranceSourceAccountEligibility

get /v1/insurance/bookings/sourceAccounts
Description

This API returns customer’s source accounts eligible for insurance booking.

Header Parameters
Authorization
string required
The most recent Authorization token. This will have the format Bearer + {space} + {accessToken}. Example: Bearer KGNsaWVudF9pZDpjbGllbnRfc2VjcmV0KQ==.
uuid
string required
128 bit random UUID generated uniquely for every request.
Accept
string required
Content-Type that are acceptable for the response.
client_id
string required
Client ID generated during application registration.
clientDetails
string Optional
This field is used to capture device,browser and network information. Refer the developer portal for more information.These are the fields which will be passed as part of the header devicePrint,deviceTokenCookie,userIpAddress,userAgent,hardwareId,simId,deviceModel,deviceName,deviceOsName,deviceOsVersion,multitaskingSupportFlag,languageSupport,wifiMacAddress,cellTowerId,locationAreaCode,rsaApplicationKey,wapClientId,mobileCarrierCode,mobileCountryCode,osId,geoLongitude,geoLatitude,geoHorizontalAccuracy,geoAltitude,geoAltitudeAccuracy,geoSpeed,geoTimestamp,geoStatus,basicServiceSetId,signalStrength,wifiChannel,serviceSetId
  • cURL
  • Ruby
  • Python
  • PHP
  • Java
  • Node
  • Go
  • Swift

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Example Request

Responses
200

Successful operation.
Definitions
  • sourceAccounts
      • sourceAccountId
        • The primary identifier for ownership of an account.The source account identifier in encrypted format.
        • type : string
      • displaySourceAccountNumber
        • A masked account number/last four(4) digits of source account number that can be displayed to the customer
        • type : string
      • sourceAccountCurrencyCode
        • The currency code of the source account in ISO 4217 format
        • type : string
      • accountGroup
        • Account Group associated with the source Account. This is a reference data field. Please use /v1/utilities/referenceData/{accountGroup} resource to get valid value of this field with description.
        • type : string
      • availableBalance
        • The available balance including any pending or in progress deposits and withdrawals
        • type : number
        • format : double
      • localCurrencyAvailableBalance
        • Available balance in local currency. Applicable only if the source account is in foreign currency.
        • type : number
        • format : double
      • localCurrencyCode
        • The currency code for local country in ISO 4217 format. Applicable only if the source account is in foreign currency.
        • type : string
  • nextStartIndex
    • The start index of the next subset of payees.
    • type : string
Example Response for get /v1/insurance/bookings/sourceAccounts
{
    "sourceAccounts": {
        "sourceAccountId": 123,
        "displaySourceAccountNumber": "XXXXX2364",
        "sourceAccountCurrencyCode": "SGD",
        "accountGroup": "SAVINGS",
        "availableBalance": 531123.356,
        "localCurrencyAvailableBalance": 5000.25,
        "localCurrencyCode": "AUD"
    },
    "nextStartIndex": 25
}
204

TypeCodeDetails
SuccessNo Content
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Example Response for get /v1/insurance/bookings/sourceAccounts
[]
400

TypeCodeDetails
invalidinvalidRequestMissing or invalid Parameters
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for get /v1/insurance/bookings/sourceAccounts
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
401

errorunAuthorizedAuthorization credentials are missing or invalid
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for get /v1/insurance/bookings/sourceAccounts
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
403

erroraccessNotConfiguredAccess is not configured for this resource
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for get /v1/insurance/bookings/sourceAccounts
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}
500

fatalserverUnavailableThe request failed due to an internal error
Definitions
  • type
    • Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again
    • enum : Array
    • type : string
  • code
    • Error code which qualifies the error
    • type : string
  • details
    • Human readable explanation specific to the occurrence of the problem
    • type : string
  • location
    • The name of the field that resulted in the error
    • type : string
  • moreInfo
    • URI to human readable documentation of the error
    • type : object
  • required
    • type
    • code
Response Schema for get /v1/insurance/bookings/sourceAccounts
{
    "properties": {
        "type": {
            "description": "Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again",
            "enum": [
                "error",
                "warn",
                "invalid",
                "fatal"
            ],
            "type": "string"
        },
        "code": {
            "description": "Error code which qualifies the error",
            "type": "string"
        },
        "details": {
            "description": "Human readable explanation specific to the occurrence of the problem",
            "type": "string"
        },
        "location": {
            "description": "The name of the field that resulted in the error",
            "type": "string"
        },
        "moreInfo": {
            "description": "URI to human readable documentation of the error",
            "type": "object"
        }
    },
    "required": [
        "type",
        "code"
    ]
}