Skip to main content

Update Item In Cart

Update item in a client's cart. This endpoint allows you to update cart item of the client.

PATCH /api/v1/client/cart/{id}

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 a cart item given an id
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": [
+ {...}
]
}
...
]