Insurance API Guide
This page MUST be read in conjunction with the Insurance OpenAPI description document.
The OpenAPI document provides a machine-readable view of the example API request and response payloads included in this page, and is critical for the correct implementation of client software code.
All sample JSON objects, unless for the sake of exemplar, are shown without encapsulation as a JSON Web Token (JWT), for the sake of simplicity. Sample JSON objects are also abridged for brevity.
Sequence diagrams that cover the flows described herein and include the operations of the API Hub and Ozone Connect are provided in API Hub documentation.
1. API Flows
1.1 Step 1: Agree Insurance Consent for Data Sharing
The flow MUST begin with a User providing consent to the TPP for undertaking Insurance Quote and Data Sharing operations.
The consent required is based on the operations that are permitted:
For Insurance Quotes without Data Sharing consent must be agreed between the User and TPP. The TPP can solicit quotes from LFIs without sharing data as part of the quote operation.
For Data Sharing, with or without Quotes, consent is agreed between the User and TPP before consent is authorized at an LFI with which the User already has a relationship.
The requirements for the authorization of consent at the LFI are reflected in the narrative below.
1.2 Step 2: Authorize Insurance Data Sharing Consent
For any operations that include Data Sharing the TPP MUST:
Request the User to authorize the consent. Please refer to the Authentication and Authorization page to review the supported Authorization Flows.
Construct a Rich Authorization Request (https://www.rfc-editor.org/rfc/rfc9396) with the
authorization_detailspopulated with the User’s consentInclude an insurance consent with all the REQUIRED data permissions that the User intends to provide to the TPP.
Include a UUID v4 as the ConsentId as a unique identifier for the insurance consent.
A TPP MAY be a broker for data to other parties, so it is valid for a User to have multiple consents for the same resource(s), with different consent or authorization parameters agreed upon.
1.2.1 Security and Access Control
Authorization Code Grant
The TPP MUST use an Authorization Code grant to obtain an Access Token to access all API resources provided under an Insurance Data Sharing consent.
Client Credentials Grant
The TPP MUST use Client Credentials grant to obtain an Access Token to invoke Insurance Quote operations on behalf of the User.
The User MUST NOT be redirected to an LFI to authorize consent for an Insurance Quote operation.
1.3 Step 3: Access Data
1.2.1 Request Data
The TPP MUST have a valid Access Token from the OFP authorization server, granted under the correct scope for Insurance Data Sharing or Quotes.
The TPP MUST use the Access Token to retrieve User data or invoke Insurance Quote operations at the OFP resource server.
The OFP MUST perform Access Token introspection, ensuring the Access Token:
has not expired.
has the correct scope.
for Data Sharing, has been granted against a consent that is in a valid state for access.
The OFP must forward the request to the LFI, enriching the request with appropriate session metadata based on the implementation requirements of the OFP.
The LFI MUST return an API response when provided with a valid request from the OFP.
The OFP MUST return an API response when provided with a valid access token request from the TPP.
2. Examples
The following are non-normative examples of API access and usage of the Insurance Information API.
2.1 The TPP Redirects the User to Authorize Insurance Consent
Where the User and the TPP have agreed consent for Data Sharing a consent must be created, submitted to the OFP, and then authorized by the User at the LFI at which their insurance policies are held.
2.1.1 Request: TPP Uses Rich Authorization Request via a PAR (Pushed Authorization Request) Endpoint with the OFP to Obtain a Request URI
The Rich Authorization Request (RAR) request body is a JWT-Secured Authorization Request. A JAR is a signed JSON Web Token (JWS) that includes the following properties:
kidis a valid signing key ID for the TPP on the Open Finance Directory.issis client id (UUID v4, optionally prefixed with a URI where the client is federated by the Trust Framework).stateis a UUID v4 value.response_typeMUST becode.redirect_uriis the TPP’s redirect URI.
The authorization_details property contain the User’s insurance consent details, and a UUID v4 which is a unique identifier for the insurance consent.
The sample below shows the content of the authorization_details property, together with the content of the JAR, as a JSON object. This data will be encapsulated as a JWS when serialized, so a JSON example is provided for simplicity.
Permissions to access multiple insurance types, each with different permissions, are supported in the consent.
{
"iss": "s6BhdRkqt3",
"aud": "https://server.example.com",
"response_type": "code",
"redirect_uri": "https://openbanking.tpp1.ae/simple-redirect-url",
"scope": "insurance",
"state": "2616df22-899e-468b-b7af-927145b067cc",
"authorization_details": [
{
"ConsentId": "string",
"Permissions": [
{
"InsuranceType": "Employment",
"Permissions": [
"ReadInsurancePolicies",
"ReadCustomerBasic",
"ReadCustomerDetail"
]
}
],
"ExpirationDateTime": "2019-08-24T14:15:22Z",
"Purpose": [
"InsurancePolicyAggregation"
]
}
]
}Create the RAR Request using the signed JWT, and create a Client Assertion using the private_key_jwt Client Authentication method described in OpenID Connect and specified in the FAPI 2.0 Security Profile.
The PAR request body, shown below, includes:
The Client Assertion Type (
client_assertion_type), which must be set to the value shown in the example.The Client Assertion (
client_assertion).The RAR, encapsulated by the JAR (
request)
POST /open-finance/auth/v2.0/par HTTP/1.1
Host: auth1.openfinanceplatform.ae
Content-Type: application/x-www-form-urlencoded
Accept: application/json
client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJIUzI1NiJ9..nvY2tG7D3_ioVI55nRJ7apBzoGbP9sofMLd7Dni4YbI
&request=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImU0Y2U3N2M0OThlNzcwMDBhMjVhYTdiNDBlNGE4M2Y5In0...-2GDs2.1.2 Response: The OFP Provides the Request URI for the TPP
If the PAR request is successfully validated the request_uri parameter is returned, which must be used in the redirection to the LFI.
Header
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-cache, no-store
{
"request_uri": "urn:ietf:params:oauth:request_uri:6esc_11ACC5bwc014ltc14eY22c",
"expires_in": 600
}2.2 The TPP Redirects the User to Their LFI with the Request URI to Authorize the Consent
GET /auth?client_id=c8422787-1dff-424d-b620-356c0870bed4&request_uri=urn:ietf:params:oauth:request_uri:6esc_11ACC5bwc014ltc14eY22c
Host: openbanking.lfi.ae2.3 The User Authorizes Consent at the LFI
Please refer to the API Hub documentation for the steps implemented by the LFI to indicate consent authorization by the User.
2.4 The LFI Returns an Authorization Code to the TPP
Header
302 Found
Location: https://openbanking.tpp1.ae/simple-redirect-url?
code=ce2aeabf-599c-4475-9171-1f6d8c1a49dc
&state=2616df22-899e-468b-b7af-927145b067cc2.5 The TPP Exchanges the Authorization Code for an Insurance API Access Token with the OFP
Header
POST /token HTTP/1.1
Host: as1.openfinanceplatform.ae
Content-Type: application/x-www-form-urlencoded
Accept: application/jsonPayload
grant_type=authorization_code
&code=ce2aeabf-599c-4475-9171-1f6d8c1a49dc
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJIUzI1NiJ9.ew0KICAiaXNzIjogImM4NDIyNzg3LTFkZmYtNDI0ZC1iNjIwLTM1NmMwODcwYmVkNCIsDQogICJzdWIiOiAiYzg0MjI3ODctMWRmZi00MjRkLWI2MjAtMzU2YzA4NzBiZWQ0IiwNCiAgImF1ZCI6ICJhdXRoMS5sYWIub3BlbmJhbmtpbmcuc2EiLA0KICJqdGkiOiAiYThmZDQ2ZjctYTNiMy00MGQ5LTk2ZjctNDk1YmEyMGFiMTZmIiwNCiAgImV4cCI6IDE1MTYyMzkwMjINCn0.nvY2tG7D3_ioVI55nRJ7apBzoGbP9sofMLd7Dni4YbI
&redirect_uri=https%3A%2F%2Fopenbanking.tpp1.ae%2Fsimple-redirect-url2.6 The OFP Returns an Access Token, Refresh Token, and ID Token to the TPP
The authorization_details from the PAR request payload is returned in the body of the response from the Token endpoint (example uses an empty payload for brevity).
Header
HTTP/1.1 200 OK
Content-Type:application/jsonPayload
{
"access_token": "caa1b60d-61ff-4cd8-a4e1-2d18c8696de0",
"expires_in": 432000,
"token_type": "Bearer",
"scope": "openid%20insurance",
"state": "2616df22-899e-468b-b7af-927145b067cc",
"refresh_token": "266f5f15-eb81-4a02-bf05-e25063ca445f",
"id_token": "eyJhbGciOiJQUzI1NiIsImtpZCI6IkM4a3FRRlZoUFVOUnZTN1ljamZBSEVSTEVDZEFfamZENXJjb1NXVkMwY2sifQ...AfunjbLyzOMQXtZfAl4563cKxTYbXhzZk5IFrJ864w1aF9_XpIQe1iH5H17xIXL_1XmjbPiPMzx55025NMyDOMwPSRBDu9bIb37EyUlVVtVevxxwVeyOixcOx-NoNMHO4qTKyznhCM_oJmNmq5n8N9xSbmyJSGDIusGiiyXyNt0egnK4xkvPFwri4FJd3IUIdUWOCuUO9RlckBQottUiyo4UazrAaShpn4GIsl_1fj8U2Ga5v4t_6jRG7oEndwQoDruLrftFnwvDWJYD2NSm5LKUb2z4HTb-89aPihcGpCrSrnxqyB6kiAculoJAhZhC8TBY40G3l-6qjc5Ey71JHA",
"authorization_details": [
{}
]
}The TPP can now request insurance policy information using the access token.
2.7 Get a List of Insurance Policies
The example Data Sharing use Motor Insurance as an example.
All insurance types use the same API operation signature, as described in the Insurance OpenAPI description, which should be used as reference.
2.7.1 Request: Insurance Policies Resource
Header
GET /open-finance/insurance/v2.0/motor-insurance-policies HTTP/1.1
Host: rs1.openfinanceplatform.ae
Accept: application/json
x-fapi-interaction-id: 942a7ee7-d29a-45aa-93b7-c5f292d86602
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de02.7.2 Response: Insurance Policies Resource
Header
HTTP/1.1 200 OK
Content-Type: application/json
x-fapi-interaction-id: 942a7ee7-d29a-45aa-93b7-c5f292d86602Payload
{
"Data": {
"Policies": [
{
"InsurancePolicyId": "d330c5bb-0889-4596-86bb-17cc9a4a17b5",
"PolicyNumber": "Ghq8912mhJ-0010103",
"CoverStartDate": "2025-08-24",
"CoverStartDate": "2026-08-24",
"IssueDate": "2025-08-24",
"ExpiryDate": "2026-08-24"
}
]
},
"Links": {
"Self": "http://example.com"
},
"Meta": {}
}2.8 Get an Insurance Policy
2.8.1 Request: Insurance Policy Resource
Header
GET /open-finance/insurance/v2.0/motor-insurance-policies/176794ea-ee8c-4621-b824-b8cfa95db0ff HTTP/1.1
Host: rs1.openfinanceplatform.ae
Accept: application/json
x-fapi-interaction-id: 942a7ee7-d29a-45aa-93b7-c5f292d86602
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de02.8.2 Response: Insurance Policy Resource
Header
HTTP/1.1 200 OK
Content-Type: application/json
x-fapi-interaction-id: 942a7ee7-d29a-45aa-93b7-c5f292d86602Payload
The example below is a reduced for the sake of brevity. Data will be returned based on the permissions granted in the consent.
Please refer to the OpenAPI description for properties of the response.
{
"Data": {
"InsurancePolicyId": "942a7ee7-d29a-45aa-93b7-c5f292d86602",
"Customer": {...},
"Identity": {...},
"Employment": {...},
"Product": {...}
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-policies/176794ea-ee8c-4621-b824-b8cfa95db0ff"
},
"Meta": {}
}2.9 Get Customer Payment Details
2.9.1 Request: Customer Payment Details Resource
Header
GET /open-finance/insurance/v2.0/motor-insurance-policies/176794ea-ee8c-4621-b824-b8cfa95db0ff/payment-details HTTP/1.1
Host: rs1.openfinanceplatform.ae
Accept: application/json
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0d
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de02.9.2 Response: Customer Payment Details Resource
Header
HTTP/1.1 200 OK
Content-Type: application/json
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0dPayload
{
"Data": {
"SchemeName": "IBAN",
"Identification": "SA4420000001234567891234",
"Name": "Mr Hamad Ali"
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-policies/176794ea-ee8c-4621-b824-b8cfa95db0ff/payment-details"
}
}2.10 Create an Insurance Quote
The TPP will send each the Insurance Quote request to all LFI instances at the OFP that the User has selected or are in scope to provide a response.
TPPs require an Access Token from each LFI instance at the OFP.
TPPs can use existing policy data to construct the quote request if a User has consented to Insurance Data Sharing access.
2.10.1 Request: Access Token with Client Credentials Grant
Header
POST /token HTTP/1.1
Host: as1.openfinanceplatform.ae
Content-Type: application/x-www-form-urlencoded
Accept: application/jsonPayload
grant_type=client_credentials
&scope=insurance
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJIUzI1NiJ9...nvY2tG7D3_ioVI55nRJ7apBzoGbP9sofMLd7Dni4YbI2.10.2 Response: Access Token
Header
HTTP/1.1 200 OK
Content-Type:application/jsonPayload
{
"access_token": "caa1b60d-61ff-4cd8-a4e1-2d18c8696de0",
"expires_in": 432000,
"token_type": "Bearer",
"scope": "insurance",
}2.10.3 Request: Create an Insurance Quote
Header
POST /open-finance/insurance/v2.0/motor-insurance-quotes HTTP/1.1
Host: rs1.openfinanceplatform.ae
Accept: application/json
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0d
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de0Payload
{
"Data": {
"QuoteReference": "TPP001-2025-01-31-0a3119bf-eb1b-4f5f-a9d3-c4d13ad9adba",
"Policy": {
"InsurancePolicyType": "Conventional",
"CoverType": "Comprehensive",
"RegistrationType": "New",
"CoverStartDate": "2019-08-24",
"CoverEndDate": "2019-08-24",
"CarUsage": "Private",
"CarValuation": {
"Currency": "AED",
"Amount": "100000.00"
}
},
"VehicleDetails": {...},
"CarRegistration": {...},
"MainDriver": {...}
},
"ExistingPolicy": {...},
}
}2.10.4 Responses: Create an Insurance Quote
2.10.2.1 An Insurance Quote has been created and returned to the TPP
Header
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-cache, no-store
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0dPayload
{
"Data": {
"QuoteStatus": "Pending",
"QuoteId": "90cdde4e-4db3-4ad3-82e1-f795201fe1e6",
"QuoteReference": "TPP001-2025-01-31-0a3119bf-eb1b-4f5f-a9d3-c4d13ad9adba",
"CreationDateTime": "2019-08-24T14:15:22Z",
"ExpirationDateTime": "2019-08-24T14:15:22Z",
"PremiumTargetDateTime": "2019-08-24T14:15:22Z",
"PlanName": "Sample Motor Insurance Policy",
"LevelOfCover": "Comprehensive",
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-quotes/90cdde4e-4db3-4ad3-82e1-f795201fe1e6"
},
"Meta": {}
}2.10.2.2 A quote cannot be provided by the LFI
Header
HTTP/1.1 204 No Content
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead2.11 Accept an Insurance Quote
The Access Tokens created in Section 2.10 are assumed to be valid for this operation.
2.11.1 Request: Accept an Insurance Quote
Header
PATCH /open-finance/insurance/v2.0/motor-insurance-quotes/90cdde4e-4db3-4ad3-82e1-f795201fe1e6 HTTP/1.1
Host: rs1.lab.api.openbanking.ae
Content-Type: application/json
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead
Authorization: Bearer ad297304-1057-4c68-9e76-a96f300a27f1Payload
The payload for the patch operation MUST be a JWS, signed with the appropriate key.
The Insurance Quote request payload can optionally contain a Subscription object, allowing the TPP to receive Event Notifications when the QuoteStatus changes.
{
"iss": "s6BhdRkqt3",
"exp": "",
"nbf": "",
"message": {
"Data": {
"QuoteStatus": "Accepted",
"QuoteReference": "8d88d2cc-0e00-4d5f-88e7-b2a1e94486f0",
"InsuranceSubType": "Comprehensive",
"Premium": {...},
"Commission": {...},
"QuoteCreationDateTime": "2019-08-24T13:15:22Z",
"ExpirationDateTime": "2019-08-24T14:15:22Z",
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-quotes/90cdde4e-4db3-4ad3-82e1-f795201fe1e6"
},
"Meta": {}
}
}
2.11.2 Response: Accept an Insurance Quote
Header
HTTP/1.1 204 No Content
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead2.12 Create an Insurance Policy from a Quote
The Access Tokens created in Section 2.10 is assumed to be valid for this operation.
2.11.1 Request: Create an Insurance Policy from Quote
Header
POST /open-finance/insurance/v2.0/motor-insurance-policies HTTP/1.1
Host: rs1.openfinanceplatform.ae
Accept: application/json
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0d
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de0Payload
{
"Data": {
"QuoteId": "90cdde4e-4db3-4ad3-82e1-f795201fe1e6",
"PaymentDetails": {...}
}
}2.11.2 Response: Create an Insurance Policy from Quote
Header
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-cache, no-store
x-fapi-interaction-id: f9ccecd5-2ed1-4299-b233-7c5d8a6a2e0dPayload
{
"Data": {
"InsurancePolicyId": "d330c5bb-0889-4596-86bb-17cc9a4a17b5"
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-policies/d330c5bb-0889-4596-86bb-17cc9a4a17b5",
"CreateInsurancePolicyRedirectUrl": "http://www.lfi.ae/insurance-quotes?completionId=d330c5bb-0889-4596-86bb-17cc9a4a17b5"
},
"Meta": {}
}3. Further Examples
3.1 The TPP Queries the Insurance Resource for the Status after a User has Authorized the Consent
3.1.1 Request: Retrieve an Insurance Consent
Header
GET /open-finance/insurance/v2.0/insurance-consents/aac-1a672e83-d1e5-42bc-b8e1-60a490ec52fd HTTP/1.1
Host: rs1.openfinanceplatform.ae
Content-Type: application/json
x-fapi-interaction-id: 2e974f01-d111-4078-9a19-7a9b385e637c
Authorization: Bearer e6156449-6f27-4c42-aa5b-36602f73eac93.1.2 Response: Retrieve an Insurance Consent
Header
HTTP/1.1 200 OK
Content-Type:application/json
x-fapi-interaction-id: 2e974f01-d111-4078-9a19-7a9b385e637cPayload
{
"Data": {
"ConsentId": "6a6a826f-0930-4eb0-b365-a8eac3032828",
"CreationDateTime": "2024-06-27T15:27:13+0300",
"Status": "Authorized",
"StatusUpdateDateTime": "2024-06-27T16:27:13+0300",
"Permissions": [
{
"InsuranceType": "Employment",
"Permissions": [
"ReadInsurancePolicies",
"ReadCustomerBasic",
"ReadCustomerDetail"
]
}
],
"ExpirationDateTime": "2024-03-28T15:27:13+030",
"OpenFinanceBilling": {
"Purpose": "QuoteComparison"
}
},
"Subscription": {
"Webhook": {
"Url": "https://api.tpp1.com/webhook/callbackUrl",
"IsActive": false
}
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/insurance-consents/6a6a826f-0930-4eb0-b365-a8eac3032828"
},
"Meta": {}
}
3.2 The TPP Requests the List of Insurance Policies Using an Expired Access Token
3.2.1 Request: insurance-policies collection
Header
GET /open-finance/insurance/v2.0/motor-insurance-policies HTTP/1.1
Host: rs1.openfinanceplatform.ae
Content-Type: application/json
x-fapi-interaction-id: 9a371b79-4e79-4d7d-a77d-380c528ab8c0
Authorization: Bearer caa1b60d-61ff-4cd8-a4e1-2d18c8696de03.2.2 Response: 401 Unauthorized
Header
HTTP/1.1 401 Unauthorized
Content-Type: application/json
x-fapi-interaction-id: 9a371b79-4e79-4d7d-a77d-380c528ab8c03.3 Webhooks
The OFP supports Webhooks for Insurance Data Sharing consent changes and Insurance Quote status changes.
A general guide to Webhooks is shown in the sections below.
3.2.1 The TPP Creates an Insurance Consent Request with a Webhook Subscription
3.2.1.1 Request: Insurance Consent and Webhook Subscription
Payload
{
"typ": "JWT",
"alg": "PS256",
"kid": "e4ce77c498e77000a25aa7b40e4a83f9"
}
.
{
"iss": "s6BhdRkqt3",
"iat": 1669393154,
"exp": 1669393496,
"nbf": 1669393154,
"aud": "https://server.example.com",
"response_type": "code",
"redirect_uri": "https://openbanking.tpp1.ae/simple-redirect-url",
"scope": "insurance",
"state": "2616df22-899e-468b-b7af-927145b067cc",
"authorization_details": [
{
"Type": "urn:openfinanceuae:insurance-consent:v2.0",
"Consent": {
"ConsentId": "6a6a826f-0930-4eb0-b365-a8eac3032828",
"Permissions": [
"ReadInsurancePoliciesMotor"
],
"ExpirationDateTime": "2024-03-28T15:27:13+030",
"OpenFinanceBilling": {
"Purpose": "QuoteComparison"
}
},
"Subscription": {
"Webhook": {
"Url": "https://api.tpp1.com/webhook/callbackUrl",
"IsActive": false
}
}
}
]
}
3.2.2 The TPP updates a Webhook Subscription preference with the OFP
3.2.2.1 Request: Subscribe to Webhook events
Header
PATCH /open-finance/insurance/v2.0/insurance-consents/aac-69255d98-ab0e-4758-92a7-cacbf3073efa HTTP/1.1
Host: rs1.lab.api.openbanking.ae
Content-Type: application/json
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead
Authorization: Bearer ad297304-1057-4c68-9e76-a96f300a27f1Payload
{
"Subscription": {
"Webhook": {
"IsActive": true
}
}
}3.2.2.2 Response: Webhook events activated
Header
HTTP/1.1 204 No Content
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead3.2.3 The TPP unsubscribes their Webhook Subscription with the OFP
3.2.2.1 Request: Deactivate Webhook events
Header
PATCH /open-finance/insurance/v2.0/insurance-consents/aac-69255d98-ab0e-4758-92a7-cacbf3073efa HTTP/1.1
Host: rs1.lab.api.openbanking.ae
Content-Type: application/json
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead
Authorization: Bearer ad297304-1057-4c68-9e76-a96f300a27f1Payload
{
"Subscription": {
"Webhook": {
"IsActive": false
}
}
}3.2.2.2 Response: Webhook events deactivated
Header
HTTP/1.1 204 No Content
x-fapi-interaction-id: 3424a379-8274-4686-99bd-f420d08acead3.2.4 The TPP receives data from the OFP (specific to the consent and permissions) via its Webhook
3.2.3.1 The OFP generates a Self Signed JWT Authorization Token for Client Authentication with the TPP.
This JWT Authorization Token MUST be set in the Authorization Header.
Payload
{
"alg": "PS256",
"typ": "JOSE",
"cty": "json",
"kid": "e1be6bf3-76e6-4e53-92b9-c46423757ab1"
}
.
{
"iss": "https://openbanking.masrif-ahmar.ae",
"sub": "e75c26bf-1682-401a-a227-ec125f6636ab",
"aud": "https://api.tpp.com/webhook/callbackUrl",
"exp": 1661378066,
"iat": 1661378036,
"nbf": 1661378036,
"jti": "274aa39d-d77a-46a9-b832-b2ced47919dd"
}
.
<<signature>>3.2.3.2 Request: OFP publishes signed/encrypted data to the registered Webhook Url provided by the TPP
The example below shows a signed and encrypted payload with the JWT Authorization Token set in the Authorization Header.
Header
POST /webhook/callbackUrl HTTP/1.1
Host: api.tpp.com
x-fapi-interaction-id: 77b0e830-b095-4c6c-94e8-20f83eaa799f
Content-Type: application/jwt
Date: Wed, 24 Aug 2022 07:28:00 AST
Authorization: Bearer eyJhbGciO9.eyJzdWImlhdCI6MTUxNjIzOTAyMn0.iOeN9egThe payload is a signed and encrypted payload. The JWE contains a JWS, which contains a JSON payload.
Payload
The decrypted payload of the JWS, without the signature, is shown in the example below. The example JSON is abridged for brevity.
{
"iss": "string",
"exp": 1664950125,
"nbf": 1664950125,
"aud": [
"6uC8HSQ8C59SDSw43Cdm9YWxxjJmDV"
],
"iat": 1661378036,
"message": {
"Data": {
"PolicyType": "Motor",
"PolicyDetails": {
"InsurancePolicyId": "176794ea-ee8c-4621-b824-b8cfa95db0ff",
"CustomerId": "dcaaef9c-63cb-4c57-9f2a-a4986c4a958e"
}
},
"Links": {
"Self": "https://rs1.openfinanceplatform.ae/open-finance/insurance/v2.0/motor-insurance-policies/176794ea-ee8c-4621-b824-b8cfa95db0ff"
},
"EventMeta": {
"EventDateTime": "2022-08-24T07:28:00.556Z",
"EventResource": "insurance-policies",
"EventType": "Resource.Updated",
"ConsentId": "6a6a826f-0930-4eb0-b365-a8eac3032828"
}
}
}3.2.3.3 Response: TPP validates the Self Signed JWT Authorization Token from LFI, stores data, and acknowledges a successful response to the OFP
Header
HTTP/1.1 202 Accepted
x-fapi-interaction-id: 77b0e830-b095-4c6c-94e8-20f83eaa799f
5. OpenAPI Specification
See the Insurance OpenAPI page.
6. Notes
TPP MUST request the
ReadInsurancePoliciespermission code to ensure they can readInsurancePolicyIdvalues required to retrieve insurance policies.ReadInsurancePoliciesmust be request for each insurance type for which access is required.Customer payment details require the
ReadCustomerPaymentDetailspermission and must be specifically requested using theGET /insurance-policies/{InsurancePolicyId}/payment-detailsoperation. This is to ensure a separation of concerns between the main body of data and the payment details.
7. Security
A insurance scope is used for accessing the insurance endpoints.