NAV
Shell HTTP JavaScript Ruby Python PHP Java Go

enBed - Client v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Modules:

Base URLs:

Auth

Generate Auth Token

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/auth/generate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/auth/generate HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "password": "test",
  "username": "xyz"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/auth/generate',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/auth/generate',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/auth/generate', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/auth/generate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/auth/generate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/auth/generate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/auth/generate

Generate Auth Token

Body parameter

{
  "password": "test",
  "username": "xyz"
}

Parameters

Name In Type Required Description
body body object false none
» password body string false none
» username body string false none

Example responses

Generate Auth Token

{
  "accessToken": "<access_token which is used as bearer token>",
  "expiresIn": 1800,
  "refreshExpiresIn": 863999,
  "refreshToken": "<refresh_token>"
}

Responses

Status Meaning Description Schema
200 OK Generate Auth Token Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» accessToken string false none none
» expiresIn number false none none
» refreshExpiresIn number false none none
» refreshToken string false none none

Response Headers

Status Header Type Format Description
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Transfer-Encoding string none
200 Vary string none

Refresh Auth Token

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/auth/refresh \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/auth/refresh HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "refresh_token": "refresh_token that you received along with while generating auth token"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/auth/refresh',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/auth/refresh',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/auth/refresh', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/auth/refresh', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/auth/refresh");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/auth/refresh", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/auth/refresh

Refresh Auth Token

Body parameter

{
  "refresh_token": "refresh_token that you received along with while generating auth token"
}

Parameters

Name In Type Required Description
body body object false none
» refresh_token body string false none

Example responses

Refresh Auth Token

{
  "accessToken": "<access_token which is used as bearer token>",
  "expiresIn": 1800,
  "refreshExpiresIn": 863999,
  "refreshToken": "<refresh_token>"
}

Responses

Status Meaning Description Schema
200 OK Refresh Auth Token Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» accessToken string false none none
» expiresIn number false none none
» refreshExpiresIn number false none none
» refreshToken string false none none

Configure

Get List of Unselected Products

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/products/unselected \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/products/unselected HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/products/unselected", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/products/unselected',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/products/unselected', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/products/unselected', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/products/unselected");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/products/unselected", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/products/unselected

Get List of Unselected Products

Example responses

Get List of Unselected Products

{
  "products": [
    {
      "benefits": [
        {
          "benefit": "B1",
          "description": "This is benefit 1",
          "id": "593c0017-63fb-4374-ba79-87e4cdbb8889",
          "included": true
        },
        {
          "benefit": "B2",
          "description": "Benefit ho toh aisa ho",
          "id": "974eac44-f077-41dc-a83e-1452bad0953a",
          "included": false
        }
      ],
      "category": "",
      "commissionPercentage": 0,
      "duration": 0,
      "ensureditSellingPrice": 400,
      "id": "60727ab5-05c8-4431-adb0-e7a278ace186",
      "name": "P1",
      "paymentMethods": "{}",
      "source": {
        "id": "1bbbbbbd-688f-4a17-8e9d-b1176086203b",
        "logo": "https://eit-enbed-public-predev.s3.ap-south-1.amazonaws.com/SOURCES/5346100d-f681-42b3-84e3-0e3518a8135f/logo.png",
        "name": "S1"
      },
      "validity": {
        "active": true,
        "validFrom": "2023-08-28 12:12:43.399751 +0000 UTC",
        "validTill": ""
      }
    },
    {
      "benefits": [],
      "category": "",
      "commissionPercentage": 0,
      "duration": 0,
      "ensureditSellingPrice": 100,
      "id": "b1bdb902-8524-4f13-8483-033e094bd8aa",
      "name": "RSA Base Plus",
      "paymentMethods": "{}",
      "source": {
        "id": "9c4daa49-a056-4da7-b7f0-6ecd264501bf",
        "logo": "https://eit-enbed-public-predev.s3.ap-south-1.amazonaws.com/SOURCES/5346100d-f681-42b3-84e3-0e3518a8135f/logo.png",
        "name": "Across Assist"
      },
      "validity": {
        "active": true,
        "validFrom": "2023-08-28 12:11:23.166154 +0000 UTC",
        "validTill": ""
      }
    },
    {
      "benefits": [
        {
          "benefit": "B3",
          "description": "One more benefit",
          "id": "4a39c4cb-7f84-4d46-b33c-b501ff205825",
          "included": true
        },
        {
          "benefit": "Benefit 4",
          "description": "Get an extended warranty for 2 years.",
          "id": "35d04c7a-8a39-48c1-9d66-40778834f43e",
          "included": true
        }
      ],
      "category": "",
      "commissionPercentage": 0,
      "duration": 0,
      "ensureditSellingPrice": 100,
      "id": "41779e9e-b245-494c-8684-b5580a91a67b",
      "name": "Sample Product",
      "paymentMethods": "{}",
      "source": {
        "id": "1bbbbbbd-688f-4a17-8e9d-b1176086203b",
        "logo": "https://eit-enbed-public-predev.s3.ap-south-1.amazonaws.com/SOURCES/5346100d-f681-42b3-84e3-0e3518a8135f/logo.png",
        "name": "S1"
      },
      "validity": {
        "active": true,
        "validFrom": "2023-07-01 15:04:05 +0000 UTC",
        "validTill": ""
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Get List of Unselected Products Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» products [object] false none none
»» benefits [object] false none none
»»» benefit string false none none
»»» description string false none none
»»» id string false none none
»»» included boolean false none none
»» category string false none none
»» commissionPercentage number false none none
»» duration number false none none
»» ensureditSellingPrice number false none none
»» id string false none none
»» name string false none none
»» paymentMethods string false none none
»» source object false none none
»»» id string false none none
»»» logo string false none none
»»» name string false none none
»» validity object false none none
»»» active boolean false none none
»»» validFrom string false none none
»»» validTill string false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Get List of Selected Products

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/products/selected \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/products/selected HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/products/selected", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/products/selected',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/products/selected', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/products/selected', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/products/selected");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/products/selected", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/products/selected

Get List of Selected Products

Example responses

Get List of Selected Products

{
  "products": [
    {
      "benefits": [
        {
          "benefit": "B1",
          "description": "This is benefit 1",
          "id": "593c0017-63fb-4374-ba79-87e4cdbb8889",
          "included": false
        }
      ],
      "category": "TEST",
      "commissionPercentage": 0,
      "duration": 365,
      "ensureditSellingPrice": 299,
      "id": "42960034-1518-4609-a7d4-3a0884de3b68",
      "name": "P3",
      "organizationSellingPirce": 300,
      "paymentMethods": "{}",
      "source": {
        "id": "1bbbbbbd-688f-4a17-8e9d-b1176086203b",
        "logo": "https://eit-enbed-public-predev.s3.ap-south-1.amazonaws.com/SOURCES/5346100d-f681-42b3-84e3-0e3518a8135f/logo.png",
        "name": "S1"
      },
      "validity": {
        "active": true,
        "validFrom": "2023-08-28 12:12:43.399751 +0000 UTC",
        "validTill": ""
      }
    }
  ],
  "totalCount": 1
}

Responses

Status Meaning Description Schema
200 OK Get List of Selected Products Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» products [object] false none none
»» benefits [object] false none none
»»» benefit string false none none
»»» description string false none none
»»» id string false none none
»»» included boolean false none none
»» category string false none none
»» commissionPercentage number false none none
»» duration number false none none
»» ensureditSellingPrice number false none none
»» id string false none none
»» name string false none none
»» organizationSellingPirce number false none none
»» paymentMethods string false none none
»» source object false none none
»»» id string false none none
»»» logo string false none none
»»» name string false none none
»» validity object false none none
»»» active boolean false none none
»»» validFrom string false none none
»»» validTill string false none none
» totalCount number false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Select Products

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/products/select \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/products/select HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "products": [
    {
      "id": "41779e9e-b245-494c-8684-b5580a91a67b",
      "organization_selling_price": 450
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/products/select',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/products/select',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/products/select', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/products/select', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/products/select");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/products/select", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/products/select

Select Products

Body parameter

{
  "products": [
    {
      "id": "41779e9e-b245-494c-8684-b5580a91a67b",
      "organization_selling_price": 450
    }
  ]
}

Parameters

Name In Type Required Description
body body object false none
» products body [object] false none
»» id body string false none
»» organization_selling_price body number false none

Example responses

Select Products

{}

Responses

Status Meaning Description Schema
200 OK Select Products Inline

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Policy Store

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/policy-stores \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/policy-stores HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/policy-stores", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/policy-stores',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/policy-stores', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/policy-stores', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/policy-stores");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/policy-stores", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/policy-stores

Policy Store

It will give a paginated list of all policies(either sold or in pending state)

Parameters

Name In Type Required Description
query query string false Any keyword to search for
page_number query string false Pagination Page Number
size query string false Pagination Page Size
from_date query string false none
till_date query string false none
status query string false PROPOSAL_SUBMITTED
sold_via query string false none

Example responses

Policy Store

{
  "policyStores": [
    {
      "amount": 299,
      "certificateNumber": "",
      "id": "3371d93e-8409-476d-95d8-6a23896d0613",
      "product": {
        "name": "P3"
      },
      "productSource": {
        "name": "S1"
      },
      "proposalForm": {
        "FIRST_NAME": "Nitigya"
      },
      "quoteForm": null,
      "soldBy": "5fefc363-7eb8-41bc-929b-31559fb7f460",
      "soldVia": "",
      "status": "PROPOSAL_SUBMITTED",
      "updatedAt": "2023-08-28T18:09:21.846040Z"
    }
  ],
  "totalCount": 1
}

Responses

Status Meaning Description Schema
200 OK Policy Store Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» policyStores [object] false none none
»» amount number false none none
»» certificateNumber string false none none
»» id string false none none
»» product object false none none
»»» name string false none none
»» productSource object false none none
»»» name string false none none
»» proposalForm object false none none
»»» FIRST_NAME string false none none
»» quoteForm any false none none
»» soldBy string false none none
»» soldVia string false none none
»» status string false none none
»» updatedAt string false none none
» totalCount number false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Sell

Save Proposal Form

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/policy-stores \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/policy-stores HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "product_id": "3bb8e416-d2e5-415e-a026-a83a0220db89",
  "proposal_form": {
    "ADDRESS_LINE_1": "TEST",
    "ADDRESS_LINE_2": "TEST",
    "CHASSIS_NUMBER": "TEST",
    "CITY": "TEST",
    "COLOR": "TEST",
    "EMAIL": "nitigya@ensuredit.com",
    "ENGINE_NUMBER": "TEST",
    "FIRST_NAME": "TestUser1",
    "GENDER": "Male",
    "LAST_NAME": "User1",
    "MAKE": "TEST",
    "MOBILE_NO": "7426876599",
    "MODEL": "TEST",
    "NOMINEE_DOB": "Sep 4, 2023",
    "NOMINEE_NAME": "TEST",
    "NOMINEE_RELATIONSHIP": "Friend",
    "PINCODE": "TEST",
    "START_DATE": "Sep 4, 2023",
    "STATE": "TEST",
    "VARIANT": "TEST",
    "VEHICLE_REGISTRATION_NUMBER": "TEST",
    "VEHICLE_STATUS": "New",
    "VEHICLE_TYPE": "2W"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/policy-stores',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/policy-stores',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/policy-stores', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/policy-stores', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/policy-stores");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/policy-stores", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/policy-stores

Save Proposal Form

Body parameter

{
  "product_id": "3bb8e416-d2e5-415e-a026-a83a0220db89",
  "proposal_form": {
    "ADDRESS_LINE_1": "TEST",
    "ADDRESS_LINE_2": "TEST",
    "CHASSIS_NUMBER": "TEST",
    "CITY": "TEST",
    "COLOR": "TEST",
    "EMAIL": "nitigya@ensuredit.com",
    "ENGINE_NUMBER": "TEST",
    "FIRST_NAME": "TestUser1",
    "GENDER": "Male",
    "LAST_NAME": "User1",
    "MAKE": "TEST",
    "MOBILE_NO": "7426876599",
    "MODEL": "TEST",
    "NOMINEE_DOB": "Sep 4, 2023",
    "NOMINEE_NAME": "TEST",
    "NOMINEE_RELATIONSHIP": "Friend",
    "PINCODE": "TEST",
    "START_DATE": "Sep 4, 2023",
    "STATE": "TEST",
    "VARIANT": "TEST",
    "VEHICLE_REGISTRATION_NUMBER": "TEST",
    "VEHICLE_STATUS": "New",
    "VEHICLE_TYPE": "2W"
  }
}

Parameters

Name In Type Required Description
body body object false none
» product_id body string false none
» proposal_form body object false none
»» ADDRESS_LINE_1 body string false none
»» ADDRESS_LINE_2 body string false none
»» CHASSIS_NUMBER body string false none
»» CITY body string false none
»» COLOR body string false none
»» EMAIL body string false none
»» ENGINE_NUMBER body string false none
»» FIRST_NAME body string false none
»» GENDER body string false none
»» LAST_NAME body string false none
»» MAKE body string false none
»» MOBILE_NO body string false none
»» MODEL body string false none
»» NOMINEE_DOB body string false none
»» NOMINEE_NAME body string false none
»» NOMINEE_RELATIONSHIP body string false none
»» PINCODE body string false none
»» START_DATE body string false none
»» STATE body string false none
»» VARIANT body string false none
»» VEHICLE_REGISTRATION_NUMBER body string false none
»» VEHICLE_STATUS body string false none
»» VEHICLE_TYPE body string false none

Example responses

Save Proposal Form

{
  "amount": 100,
  "id": "db730dd5-07da-4a81-b1c4-a98162133630",
  "status": "PROPOSAL_SUBMITTED"
}

Responses

Status Meaning Description Schema
200 OK Save Proposal Form Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» amount number false none none
» id string false none none
» status string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Get List of Selling Products

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/products/buyable \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/products/buyable HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
    "size":10, // page size
    "page_number":1, // page number
    "search":"", // search by name, source, etc
    "pre_quote": {
        "PAY_MODE": "TAD",
        "X": "xxxx",
        "Y": "xxxx"
    },
    "include_actual_price": true // by default, it's false
}
';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/products/buyable',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/products/buyable',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/products/buyable', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/products/buyable', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/products/buyable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/products/buyable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/products/buyable

Get List of Selling Products

Body parameter

"{\n    \"size\":10, // page size\n    \"page_number\":1, // page number\n    \"search\":\"\", // search by name, source, etc\n    \"pre_quote\": {\n        \"PAY_MODE\": \"TAD\",\n        \"X\": \"xxxx\",\n        \"Y\": \"xxxx\"\n    },\n    \"include_actual_price\": true // by default, it's false\n}\n"

Parameters

Name In Type Required Description
size query string false none
page_number query string false none

Example responses

Get List of Selling Products

{
  "products": [
    {
      "benefits": [],
      "category": "Test",
      "duration": 365,
      "id": "2c7a1f2c-3843-4045-9fbc-912190892626",
      "name": "Hospi-Cash",
      "paymentMethods": "{}",
      "price": 10,
      "source": {
        "id": "1bbbbbbd-688f-4a17-8e9d-b1176086203b",
        "logo": "https://eit-enbed-public-predev.s3.ap-south-1.amazonaws.com/SOURCES/5346100d-f681-42b3-84e3-0e3518a8135f/logo.png",
        "name": "S1"
      },
      "startingFromPrice": 10
    }
  ],
  "totalCount": 1
}

Responses

Status Meaning Description Schema
200 OK Get List of Selling Products Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» products [object] false none none
»» benefits [any] false none none
»» category string false none none
»» duration number false none none
»» id string false none none
»» name string false none none
»» paymentMethods string false none none
»» price number false none none
»» source object false none none
»»» id string false none none
»»» logo string false none none
»»» name string false none none
»» startingFromPrice number false none none
» totalCount number false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Get Product Proposal Fields

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/proposal-fields \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/proposal-fields HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/proposal-fields", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/proposal-fields',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/proposal-fields', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/proposal-fields', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/proposal-fields");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/proposal-fields", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/proposal-fields

Get Product Proposal Fields

Get product proposal fields - details required of policy holder

Parameters

Name In Type Required Description
product_id query string false Required

Example responses

Get Product Proposal Fields

{
  "productId": "3bb8e416-d2e5-415e-a026-a83a0220db89",
  "proposalFields": [
    {
      "fieldOrder": 1,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "FIRST_NAME",
        "fieldType": "string",
        "id": "76d71a0e-f409-41dd-b737-2b8a13beec5a",
        "label": "First Name",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 2,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "LAST_NAME",
        "fieldType": "string",
        "id": "be9c0ee7-590d-429e-a135-614fe8831c18",
        "label": "Last Name",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 3,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "EMAIL",
        "fieldType": "string",
        "id": "dd8fdeb7-b9d7-4923-ad01-456a0b19d2b8",
        "label": "Email",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 4,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "MOBILE_NO",
        "fieldType": "string",
        "id": "8e016457-3943-4176-a766-9b29a9e79f02",
        "label": "Mobile Number",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 5,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "ADDRESS_LINE_1",
        "fieldType": "string",
        "id": "d4d16993-74fb-444c-9d6a-57a28b7caca4",
        "label": "Address Line 1",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 6,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "ADDRESS_LINE_2",
        "fieldType": "string",
        "id": "0097b63f-6cac-4e7a-bf1e-f0e188196a51",
        "label": "Address Line 2",
        "locked": false,
        "mandatory": false,
        "options": []
      }
    },
    {
      "fieldOrder": 7,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "CITY",
        "fieldType": "string",
        "id": "59c5dcb7-65d0-4185-8b7f-e885505938b3",
        "label": "City",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 8,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "STATE",
        "fieldType": "string",
        "id": "9255d260-cb66-4c56-acde-0c396d35abcd",
        "label": "State",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 9,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "PINCODE",
        "fieldType": "string",
        "id": "ed6e6f48-5071-424b-b4c8-83f9aad3393b",
        "label": "Pincode",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 10,
      "proposalField": {
        "category": "PERSONAL_DETAILS",
        "fieldKey": "GENDER",
        "fieldType": "dropdown",
        "id": "d46a249b-3d04-4d4c-8a41-306bbfcbd37d",
        "label": "Gender",
        "locked": false,
        "mandatory": false,
        "options": [
          {
            "Male": "Male"
          },
          {
            "Other": "Other"
          },
          {
            "Female": "Female"
          }
        ]
      }
    },
    {
      "fieldOrder": 11,
      "proposalField": {
        "category": "NOMINEE_DETAILS",
        "fieldKey": "NOMINEE_NAME",
        "fieldType": "string",
        "id": "fe2ab493-a380-45ec-b6d5-fc46bbc9bb63",
        "label": "Nominee Name",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 12,
      "proposalField": {
        "category": "NOMINEE_DETAILS",
        "fieldKey": "NOMINEE_RELATIONSHIP",
        "fieldType": "dropdown",
        "id": "fa79d6a1-b51e-4100-84a8-11697d70bfff",
        "label": "Nominee Relationship",
        "locked": false,
        "mandatory": true,
        "options": [
          {
            "Son": "Son"
          },
          {
            "Other": "Other"
          },
          {
            "Father": "Father"
          },
          {
            "Friend": "Friend"
          },
          {
            "Mother": "Mother"
          },
          {
            "Spouse": "Spouse"
          },
          {
            "Daughter": "Daughter"
          }
        ]
      }
    },
    {
      "fieldOrder": 13,
      "proposalField": {
        "category": "NOMINEE_DETAILS",
        "fieldKey": "NOMINEE_DOB",
        "fieldType": "date",
        "id": "14d4cffd-b567-42f5-854a-83ba032da962",
        "label": "Nominee Date of Birth",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 14,
      "proposalField": {
        "category": "PLAN_DETAILS",
        "fieldKey": "START_DATE",
        "fieldType": "date",
        "id": "8184dc5f-e73d-442e-ba3f-ace9a51aa047",
        "label": "Start Date",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 16,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "VEHICLE_STATUS",
        "fieldType": "dropdown",
        "id": "ce68ea59-ba20-4c13-a582-5d84547e8000",
        "label": "Vehicle Status",
        "locked": false,
        "mandatory": true,
        "options": [
          {
            "New": "New"
          },
          {
            "Old": "Old"
          }
        ]
      }
    },
    {
      "fieldOrder": 17,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "VEHICLE_TYPE",
        "fieldType": "dropdown",
        "id": "4258690a-8b3b-4092-9d36-b15c0fec02ce",
        "label": "Vehicle Type",
        "locked": false,
        "mandatory": true,
        "options": [
          {
            "2W": "2W"
          },
          {
            "4W": "4W"
          },
          {
            "CV": "CV"
          }
        ]
      }
    },
    {
      "fieldOrder": 18,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "MAKE",
        "fieldType": "string",
        "id": "03b61586-5bb7-4ee9-ba16-586145cdea2b",
        "label": "Make",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 19,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "MODEL",
        "fieldType": "string",
        "id": "243b790e-bb2f-4f3d-828f-112320fe93c3",
        "label": "Model",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 20,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "VARIANT",
        "fieldType": "string",
        "id": "59134c0e-60e1-4e7e-add8-43b842003e29",
        "label": "Variant",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 21,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "COLOR",
        "fieldType": "string",
        "id": "ff7c6d00-2905-49c9-a815-0049358c042c",
        "label": "Color",
        "locked": false,
        "mandatory": false,
        "options": []
      }
    },
    {
      "fieldOrder": 22,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "ENGINE_NUMBER",
        "fieldType": "string",
        "id": "cfcf7afd-f66c-48cf-b224-c8b0692ab7bb",
        "label": "Engine Number",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 23,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "CHASSIS_NUMBER",
        "fieldType": "string",
        "id": "a4b45024-70b0-41e0-9178-20f0a8a9fc1c",
        "label": "Chassis Number",
        "locked": false,
        "mandatory": true,
        "options": []
      }
    },
    {
      "fieldOrder": 24,
      "proposalField": {
        "category": "VEHICLE_DETAILS",
        "fieldKey": "VEHICLE_REGISTRATION_NUMBER",
        "fieldType": "string",
        "id": "c20d5500-a6a4-40cf-9d1b-79084047d2d6",
        "label": "Registration Number",
        "locked": false,
        "mandatory": false,
        "options": []
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Get Product Proposal Fields Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» productId string false none none
» proposalFields [object] false none none
»» fieldOrder number false none none
»» proposalField object false none none
»»» category string false none none
»»» fieldKey string false none none
»»» fieldType string false none none
»»» id string false none none
»»» label string false none none
»»» locked boolean false none none
»»» mandatory boolean false none none
»»» options [any] false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Transfer-Encoding string none
200 Vary string none

Buy Product

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/products/buy/client \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/products/buy/client HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
    "policy_id": "1134fada-1ef4-4916-aeae-0eedb67fe6ba",
    "payment_details": {
        "transaction_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
        //...other details
    }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/products/buy/client',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/products/buy/client',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/products/buy/client', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/products/buy/client', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/products/buy/client");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/products/buy/client", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/products/buy/client

Buy Product

Body parameter

"{\n    \"policy_id\": \"1134fada-1ef4-4916-aeae-0eedb67fe6ba\",\n    \"payment_details\": {\n        \"transaction_id\": \"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx\",\n        //...other details\n    }\n}"

Parameters

Name In Type Required Description
body body object false none
» payment_details body object false none
»» amount body number false none
»» transaction_id body string false none
» policy_id body string false none

Example responses

Buy Product

{
  "amount": 130,
  "certificateNumber": "TEST_POLICY",
  "transactionId": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
}

Already sold

{
  "code": 2,
  "details": [],
  "message": "Product is already sold for this policy_id"
}

Responses

Status Meaning Description Schema
200 OK Buy Product Inline
500 Internal Server Error Already sold Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» amount number false none none
» certificateNumber string false none none
» transactionId string false none none

Status Code 500

Name Type Required Restrictions Description
» code number false none none
» details [any] false none none
» message string false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none
500 Content-Length string none
500 Date string none
500 Vary string none

Download Certificate Pdf

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch(
  "https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download",
  {
    method: "GET",

    headers: headers,
  }
)
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/policy-stores/{id}/certificate/download", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/policy-stores/{id}/certificate/download

Download Certificate PDF

Parameters

Name In Type Required Description
id path string true none

Example responses

Download Certificate PDF

{
  "presignedLink": "https://eit-enbed-data-predev.s3.ap-south-1.amazonaws.com/CERTIFICATES/WD8F2qNfHK.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA42WKAWNOMODMGDUH%2F20230719%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20230719T071010Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=c57db1d74fbdd869574cdf0e2db72d9365d6b0c336cb00017abaa23c86283602"
}

Responses

Status Meaning Description Schema
200 OK Download Certificate PDF Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» presignedLink string false none none

Response Headers

Status Header Type Format Description
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Claims

Get Claims by Policy Number or Policy Id

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/claims \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/claims HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/claims", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/claims',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/claims', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/claims', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/claims");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/claims", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/claims

Get Claims by PolicyNumber/PolicyId

Parameters

Name In Type Required Description
policyNumber query string false optiona
policyStoreId query string false optional

Example responses

Get Claims by PolicyNumber

{
  "claims": [
    {
      "createdAt": "2023-09-26T12:37:24.831935Z",
      "id": "dd8ab4c6-468c-4e72-9b6b-a77a05503ca9",
      "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
      "policyStoreId": "1134fada-1ef4-4916-aeae-0eedb67fe6ba",
      "status": "REQUESTED",
      "updatedAt": "2023-09-26T12:37:24.831935Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Get Claims by PolicyNumber Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» claims [object] false none none
»» createdAt string false none none
»» id string false none none
»» organizationId string false none none
»» policyStoreId string false none none
»» status string false none none
»» updatedAt string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Raise Claim Request

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/claims \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/claims HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/claims',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/claims',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/claims', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/claims', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/claims");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/claims", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/claims

Raise claim request

Body parameter

{
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7"
}

Parameters

Name In Type Required Description
body body object false none
» policyStoreId body string false none

Example responses

Raise claim request

{
  "createdAt": "2023-09-27T12:28:24.245517Z",
  "id": "9996c449-d945-4361-aedd-09e726c9d790",
  "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7",
  "status": "REQUESTED",
  "updatedAt": "2023-09-27T12:28:24.245517Z"
}

Responses

Status Meaning Description Schema
200 OK Raise claim request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» createdAt string false none none
» id string false none none
» organizationId string false none none
» policyStoreId string false none none
» status string false none none
» updatedAt string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Get Claim by Id

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/claims/{id} \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/claims/{id} HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/claims/{id}", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/claims/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/claims/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/claims/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/claims/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/claims/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/claims/{id}

Get Claim by Id

Parameters

Name In Type Required Description
id path string true none

Example responses

Get Claim by Id

{
  "createdAt": "2023-09-26T12:37:24.831935Z",
  "id": "dd8ab4c6-468c-4e72-9b6b-a77a05503ca9",
  "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
  "policyStoreId": "1134fada-1ef4-4916-aeae-0eedb67fe6ba",
  "status": "REQUESTED",
  "updatedAt": "2023-09-26T12:37:24.831935Z"
}

Responses

Status Meaning Description Schema
200 OK Get Claim by Id Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» createdAt string false none none
» id string false none none
» organizationId string false none none
» policyStoreId string false none none
» status string false none none
» updatedAt string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Cancellations

Get Cancellation by Policy Number or Policy Store Id

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/cancellations \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/cancellations HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/cancellations", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/cancellations',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/cancellations', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/cancellations', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/cancellations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/cancellations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/cancellations

Get Cancellations by PolicyNumber/PolicyStoreId

Parameters

Name In Type Required Description
policyStoreId query string false optional
policyNumber query string false none

Example responses

Get Cancellations by PolicyNumber/PolicyStoreId

{
  "cancellations": [
    {
      "createdAt": "2023-09-27T11:36:56.706870Z",
      "id": "41543f8c-6a68-4123-9103-b0ddb97bad60",
      "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
      "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7",
      "refundAmount": 109.200005,
      "updatedAt": "2023-09-27T11:36:56.706870Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Get Cancellations by PolicyNumber/PolicyStoreId Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» cancellations [object] false none none
»» createdAt string false none none
»» id string false none none
»» organizationId string false none none
»» policyStoreId string false none none
»» refundAmount number false none none
»» updatedAt string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none

Raise Cancellation Request

Code samples

# You can also use wget
curl -X POST https://api-uat.ensuredit.com/enbed/v1/cancellations \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api-uat.ensuredit.com/enbed/v1/cancellations HTTP/1.1
Host: api-uat.ensuredit.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api-uat.ensuredit.com/enbed/v1/cancellations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api-uat.ensuredit.com/enbed/v1/cancellations',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api-uat.ensuredit.com/enbed/v1/cancellations', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api-uat.ensuredit.com/enbed/v1/cancellations', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/cancellations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-uat.ensuredit.com/enbed/v1/cancellations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /enbed/v1/cancellations

Raise cancellation request

Body parameter

{
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7"
}

Parameters

Name In Type Required Description
body body object false none
» policyStoreId body string false none

Example responses

Raise cancellation request

{
  "createdAt": "2023-09-27T12:28:24.245517Z",
  "id": "9996c449-d945-4361-aedd-09e726c9d790",
  "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7",
  "refundAmount": "109.007",
  "updatedAt": "2023-09-27T12:28:24.245517Z"
}

Responses

Status Meaning Description Schema
200 OK Raise cancellation request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» createdAt string false none none
» id string false none none
» organizationId string false none none
» policyStoreId string false none none
» refundAmount string false none none
» updatedAt string false none none

Get Cancellation by Id

Code samples

# You can also use wget
curl -X GET https://api-uat.ensuredit.com/enbed/v1/cancellations/{id} \
  -H 'Accept: application/json'

GET https://api-uat.ensuredit.com/enbed/v1/cancellations/{id} HTTP/1.1
Host: api-uat.ensuredit.com
Accept: application/json

const headers = {
  Accept: "application/json",
};

fetch("https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}", {
  method: "GET",

  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-uat.ensuredit.com/enbed/v1/cancellations/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /enbed/v1/cancellations/{id}

Get Cancellation by Id

Parameters

Name In Type Required Description
id path string true none

Example responses

Get Cancellation by Id

{
  "createdAt": "2023-09-27T11:36:56.706870Z",
  "id": "41543f8c-6a68-4123-9103-b0ddb97bad60",
  "organizationId": "de60eeac-77b3-4585-aafa-c3cdb543a5f7",
  "policyStoreId": "a1216e34-0149-40c2-a26c-be659985c0f7",
  "refundAmount": 109.200005,
  "updatedAt": "2023-09-27T11:36:56.706870Z"
}

Responses

Status Meaning Description Schema
200 OK Get Cancellation by Id Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» createdAt string false none none
» id string false none none
» organizationId string false none none
» policyStoreId string false none none
» refundAmount number false none none
» updatedAt string false none none

Response Headers

Status Header Type Format Description
200 Connection string none
200 Content-Length string none
200 Date string none
200 Grpc-Metadata-Content-Type string none
200 Vary string none