getProduct
Get Home Insurance Product Detail
Obtain detailed information on a single home insurance product offered openly to the market
/insurance/home/products/{productId}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://data.holder.com.au/cds-au/v1/insurance/home/products/{productId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HomeApi;
import java.io.File;
import java.util.*;
public class HomeApiExample {
public static void main(String[] args) {
HomeApi apiInstance = new HomeApi();
String productId = productId_example; // String | ID of the specific product requested
String xV = xV_example; // String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
String xMinV = xMinV_example; // String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
try {
InsuranceHomeProductResponse result = apiInstance.getProduct(productId, xV, xMinV);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HomeApi#getProduct");
e.printStackTrace();
}
}
}
import io.swagger.client.api.HomeApi;
public class HomeApiExample {
public static void main(String[] args) {
HomeApi apiInstance = new HomeApi();
String productId = productId_example; // String | ID of the specific product requested
String xV = xV_example; // String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
String xMinV = xMinV_example; // String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
try {
InsuranceHomeProductResponse result = apiInstance.getProduct(productId, xV, xMinV);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HomeApi#getProduct");
e.printStackTrace();
}
}
}
String *productId = productId_example; // ID of the specific product requested
String *xV = xV_example; // Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
String *xMinV = xMinV_example; // Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. (optional)
HomeApi *apiInstance = [[HomeApi alloc] init];
// Get Home Insurance Product Detail
[apiInstance getProductWith:productId
xV:xV
xMinV:xMinV
completionHandler: ^(InsuranceHomeProductResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CdrExperimantalHomeInsuranceApi = require('cdr_experimantal_home_insurance_api');
var api = new CdrExperimantalHomeInsuranceApi.HomeApi()
var productId = productId_example; // {{String}} ID of the specific product requested
var xV = xV_example; // {{String}} Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
var opts = {
'xMinV': xMinV_example // {{String}} Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getProduct(productId, xV, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getProductExample
{
public void main()
{
var apiInstance = new HomeApi();
var productId = productId_example; // String | ID of the specific product requested
var xV = xV_example; // String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
var xMinV = xMinV_example; // String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. (optional)
try
{
// Get Home Insurance Product Detail
InsuranceHomeProductResponse result = apiInstance.getProduct(productId, xV, xMinV);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling HomeApi.getProduct: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiHomeApi();
$productId = productId_example; // String | ID of the specific product requested
$xV = xV_example; // String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
$xMinV = xMinV_example; // String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
try {
$result = $api_instance->getProduct($productId, $xV, $xMinV);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling HomeApi->getProduct: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HomeApi;
my $api_instance = WWW::SwaggerClient::HomeApi->new();
my $productId = productId_example; # String | ID of the specific product requested
my $xV = xV_example; # String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
my $xMinV = xMinV_example; # String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
eval {
my $result = $api_instance->getProduct(productId => $productId, xV => $xV, xMinV => $xMinV);
print Dumper($result);
};
if ($@) {
warn "Exception when calling HomeApi->getProduct: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.HomeApi()
productId = productId_example # String | ID of the specific product requested
xV = xV_example # String | Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
xMinV = xMinV_example # String | Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. (optional)
try:
# Get Home Insurance Product Detail
api_response = api_instance.get_product(productId, xV, xMinV=xMinV)
pprint(api_response)
except ApiException as e:
print("Exception when calling HomeApi->getProduct: %s\n" % e)
Parameters
Name | Description |
---|---|
productId* |
String
ID of the specific product requested
Required
|
Name | Description |
---|---|
x-v* |
String
Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)
Required
|
x-min-v |
String
Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder must respond with a 406 Not Acceptable.
|
Responses
Status: 200 - Successful response
Name | Type | Format | Description |
---|---|---|---|
x-v | String | The [version](#response-headers) of the API end point that the data holder has responded with. |