GET Insurance by id, context, contextId

Overview

Retrieve Insurance on a Booking by Insurance ID

Request

GET /[context]/[contextId]/Insurance/[id]

Request Information

Request Parameters

Name
Type
Requirement
Description
context
String
Mandatory
Context in Request URI should be 'bookings'
contextId
Integer
Mandatory
ContextId in Request URI should be Booking ID
id
Integer
Mandatory
ID of the insurance

Response Information

Response Properties

Name
Type
Description
insuranceName
String
Name of Insurance Product
supplierName
String
Name of the Insurance Supplier
policyName
String
Policy Name
policyNumber
String
Policy Number the Insurance
policyDetails
String
Policy Details of the Insurance
duration
String
Number of days for Insurance
numberOfInfants
Integer
Number of infants
numberOfChildren
Integer
Number of children
numberOfAdults
Integer
Number of adults
totalPrice
Decimal
Total gross price for all customers on insurance
currency
String
Currency of the insurance amount
validToDate
String
Valid To Date
validFromDate
String
Valid From Date
dateOfIssue
String
Date Issued
customers
HrefWrapper
URI used to retrieve all customers on insurance
customerStatuses
Key Value Pair
Key/value pairs indicating the number of customers 
per status on the insurance; e.g.: 
{
''confirmed'': 2,
''cancelled'': 1
}
customerStatusIds
List<CustomerStatuses>
List of customer statuses along with url for each customer on that status
id
Integer
ID of the resource
href
String
URI of the resource
sequence
Int64
Sequence of product

Customers

Name
Type
Description
href
String
URI of the resource

Customerstatusids

Name
Type
Description
status
String
Customers status
customers
List<HrefWrapper>
Url of Customers in relevant status

Response Codes

HTTP status code
Description
200 OK
The resource was retrieved successfully
400 Bad Request
The resource was malformed
401 Unauthorized
Missing or invalid API key
404 Not Found
The specified resource was not found
500 Internal Server Error
An unexpected error occurred on the API server

Response Example

{
  "insuranceName": "Adult Insurance 8 days ",
  "supplierName": "Pete",
  "policyName": "Policy XYZ",
  "policyNumber": "ABC12345",
  "policyDetails": "Policy details",
  "duration": "9",
  "numberOfInfants": 1,
  "numberOfChildren": 2,
  "numberOfAdults": 3,
  "totalPrice": 185.0,
  "currency": "AUD",
  "validToDate": "2017-08-25",
  "validFromDate": "2017-08-25",
  "dateOfIssue": "2017-08-25",
  "customers": {
    "href": "/insurance/887154/customers"
  },
  "customerStatuses": {
    "confirmed": 2,
    "tentative": 1
  },
  "customerStatusIds": [
    {
      "status": "tentative",
      "customers": [
        {
          "href": "/context/5057124/customers/4945398"
        },
        {
          "href": "/context/5057124/customers/4945398"
        }
      ]
    },
    {
      "status": "tentative",
      "customers": [
        {
          "href": "/context/5057124/customers/4945398"
        },
        {
          "href": "/context/5057124/customers/4945398"
        }
      ]
    }
  ],
  "id": 887124,
  "href": "context/contextid/insurance/887124",
  "sequence": "202403312359580000"
}