Skip to main content

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


NameDescriptionRequiredType
additionalInformationAdditional information about the policyNot Requiredobject
assetsAssets information of the policy. Refer to /policies for available assets. Default: [] RequiredArray of Object
businessTypePolicy business type. Enum: "NEW_BUSINESS" "CROSS_SELLING" "RENEWAL"Not Requiredstring
businessCategoryBusiness category of the policy. Default is LOCAL. Enum: "LOCAL" "GLOBAL"Not Requiredstring
coverTypeBusiness category of the policy. Default is LOCAL. Enum: "LOCAL" "GLOBAL"Not Requiredstring
currencyPolicy currency code. Refer to/currencies for available currencies. Enum: "GHS" "GBP" "USD" "EUR"Not Requiredstring
endDatePolicy end date in iso8601 formatNot Requiredstring
notesAdditional notes about the policyNot Requiredstring
originatingStaffIdThe 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 Requiredstring
policyNoOptional policy numberNot Requiredstring
policyTypeType of policy. Enum: "AUTO" "BANKERS_INDEMNITY" "BLANKET_BOND" "BONDS" "BOILER_OR_PRESSURE_VESSEL" "BURGLARY" "BUSINESS_INTERRUPTION"Not Requiredstring
premiumPolicy premiumNot Requirednumber
productIdProduct id of the policyNot Requiredstring

Response

CodeDescription
201Details of the newly added item
409Unauthorized

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": [
+ {...}
]
}
...
]