• Register

Insurance Management

This service is used for enabling or disabling an insurance program.

Code example

Click on the buttons to view code snippet:

curl -X PATCH \
  https://apitest.network.ae/cards/:card_identifier_id/insurances/:code?card_identifier_type=EXID \
  -H 'authorization: Bearer tzhhqun37x69bspsbfbz9ek9' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'Unique-Reference-Code: EXID' \
  -H 'Financial-Id: EXID' \
  -H 'Channel-Id: EXID' \
  -d '{
  "is_active": "CANCELLED",
  "requested_by": "CARDHOLDER"
}'

import requests

url = "https://apitest.network.ae/cards/:card_identifier_id/insurances/:code?card_identifier_type=EXID"

payload = "{\n  \"is_active\": \"CANCELLED\",\n  \"requested_by\": \"CARDHOLDER\"\n}"
headers = {
  'Unique-Reference-Code': 'EXID',
  'Financial-Id': 'EXID',
  'Channel-Id': 'EXID'
}

response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.text)

setUrl('https://apitest.network.ae/cards/:card_identifier_id/insurances/:code?card_identifier_type=EXID');
$request->setMethod('PATCH');
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Unique-Reference-Code' => 'EXID',
  'Financial-Id' => 'EXID',
  'Channel-Id' => 'EXID',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
));
$request->setBody('{\n  "is_active": "CANCELLED",\n  "requested_by": "CARDHOLDER"\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"is_active\": \"CANCELLED\",\n  \"requested_by\": \"CARDHOLDER\"\n}");
Request request = new Request.Builder()
  .url("https://apitest.network.ae/cards/:card_identifier_id/insurances/:code?card_identifier_type=EXID")
  .method("PATCH", body)
  .addHeader("Unique-Reference-Code", "EXID")
  .addHeader("Financial-Id", "EXID")
  .addHeader("Channel-Id", "EXID")
  .addHeader("Content-Type", "application/json")
  .addHeader("Accept", "application/json")
  .build();
Response response = client.newCall(request).execute();

Request Parameters:

HTTP Key Type Max Description Remarks
header Unique-Reference-Code A/N 12

Unique Reference Code for identification

of each request sent to API

Mandatory
Channel-Id String 10 Requesting channel e.g. “IB” or "IVR" etc. Might change. Mandatory
Financial-Id  String 4 Source Bank Id e.g. “NIC” Mandatory
path card_identifier_id String Min – 16       Max - 19 Unique Identifier for Card Mandatory
query card_identify_type String 15 Identifier Type for Card (default EXID) Optional
body is_active String 32 CANCELLED/ACTIVE Mandatory
requested_by String 32 null/CARDHOLDER/UNDERWRITER Mandatory
Request Json
{ 
  "is_active": "CANCELLED",
  "requested_by": "CARDHOLDER"
}

Response Parameters:

Response Code Description
200 Ok
403 Insurance Program Not Allowed
404 Insurance Program Not Found.


Docs Navigation