Link Insurance Plan and Coverage to Booking Activity API
Link Insurance Plan and Coverage to Booking Activity API EndpointLink Insurance Plan and Coverage to Booking Activity
This endpoint links the proposed insurance coverage to an existing booking activity. If any insurance is already linked, it will be switched to the newly proposed insurance coverage.
PUT
/v1/booking/{bookingId}/insurance/link
Request Content Type
application/json
Response Content Type
application/json
Request Header
-
Authorization: X-API-Key string required
X-API-Key is a string of letters and numbers used to authenticate and control access to the API. It can be generated in the StoRegister management application.
URL Query Parameters:
-
bookingId unique-identifier required
bookingId refers to an activity ID of the specific booking.
Request Body:
-
insuranceId unique-identifier required
The unique identifier of the proposed insurance plan and coverage to be linked. -
priceId unique-identifier required
The unique identifier of the proposed insurance coverage premium to be linked.
Response Payload:
-
succeeded boolean
Indicates whether the request to link insurance to the booking activity was successful. -
status string
Describes the status of the request (e.g., "SUCCESS"). -
data unique-identifier
Upon successful operation, this property holds the unique identifier of the booking ID. If the operation is not successful, the value isnull
. -
errors null
Holds error information if applicable. It is null for successful requests.
Request Header
Authorization: X-API-Key --api-key--
API Request
{
"insuranceId": "0351226f-c41c-42f1-abaa-3cb41f856cfc",
"priceId": "80c0d891-9020-4eba-9a4f-dae6e205e1c4"
}
API Response
{
"data": "4AF3E793-9BF1-4BB5-B555-B19861A86437",
"succeeded": true,
"status": "SUCCESS",
"errors": null
}
Error Codes
-
INVALID_INPUT_PARAM
INVALID_INPUT_PARAM refers to input details provided as null. -
INVALID_PARAM_INSURANCE_ID
INVALID_PARAM_INSURANCE_ID refers to invalid insurance ID. -
INVALID_PARAM_INSURANCE_PREMIUM_REVISION_INFO_ID
INVALID_PARAM_INSURANCE_PREMIUM_REVISION_INFO_ID refers to invalid insurance price ID. -
INVALID_PARAM_ACTIVITY_INFO_ID
INVALID_PARAM_ACTIVITY_INFO_ID refers to invalid booking(activity) ID. -
NO_RECORDS_FOUND
NO_RECORDS_FOUND means there is no relevant information found. -
FAILED
FAILED refers to an unsuccessful API call. -
SOMETHING_WENT_WRONG
SOMETHING_WENT_WRONG refers to technical glitch. Please contact administrator.