Add Cart Items
Adds an item to the user's cart. Refer to /policies for details structure of each policy type.
NOTE:
All fields are optional since a cart item is not a completed policy yet (draft).
POST /api/v1/client/cart
Path param
authorization : *bearer
REQUEST BODY SCHEMA: application/json
Name | Description | Required | Type |
---|---|---|---|
additionalInformation | Additional information about the policy | Not Required | object |
assets | Assets information of the policy. Refer to /policies for available assets. Default: [] | Required | Array of Object |
businessType | Policy business type. Enum: "NEW_BUSINESS" "CROSS_SELLING" "RENEWAL" | Not Required | string |
businessCategory | Business category of the policy. Default is LOCAL . Enum: "LOCAL" "GLOBAL" | Not Required | string |
coverType | Business category of the policy. Default is LOCAL . Enum: "LOCAL" "GLOBAL" | Not Required | string |
currency | Policy currency code. Refer to/currencies for available currencies. Enum: "GHS" "GBP" "USD" "EUR" | Not Required | string |
endDate | Policy end date in iso8601 format | Not Required | string |
notes | Additional notes about the policy | Not Required | string |
originatingStaffId | The staff who sold the policy to the client. If null, currently logged in staff will be used. Optional if the policy is created from a client application | Not Required | string |
policyNo | Optional policy number | Not Required | string |
policyType | Type of policy. Enum: "AUTO" "BANKERS_INDEMNITY" "BLANKET_BOND" "BONDS" "BOILER_OR_PRESSURE_VESSEL" "BURGLARY" "BUSINESS_INTERRUPTION" | Not Required | string |
premium | Policy premium | Not Required | number |
productId | Product id of the policy | Not Required | string |
Response
Code | Description |
---|---|
201 | Details of the newly added item |
409 | Unauthorized |
Request Sample
Content type
application/json
[
{
"policyNo": "POL-0012",
"currency": "GHC",
"startDate": "2020-01-01T00:00:00.000Z",
"endDate": "2020-12-01T00:00:00.000Z",
"productId": "619c0911b46b424f5f3e470f",
"clientId": "619c0911b46b424f5f3e470f",
"originatingStaffId": "619c0911b46b424f5f3e470f",
"notes": "This is an auto insurance policy. It covers a car.",
"premium": 5000,
"exchangeRate": 1,
"businessType": "NEW_BUSINESS",
"businessCategory": "LOCAL",
"coverType": "COMPREHENSIVE",
"policyType": "AUTO",
"additionalInformation": {
"formSerialNumber": "AAFE123456789"
},
"assets": [ ]
}
...
]
Response Sample
Content type
application/json
[
{
"statusCode": 200,
"success": true,
"data": [
+ {...}
]
}
...
]