SPI Insurances
Create Cart Insurance
post /cart-insurancesMake query to create cart insurance options for products in the cart.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo).
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo).
ID of the register.
ID of the request.
The cart insurance object consisting of an array of items (products) with their respective insurance options.
Successful. Returns a CartInsurance object, including details of insurance options, applicable to the cart.
{ "id": "123e4567-e89b-12d3-a456-426614174000", "crm_channel_id": "custom-crm", "customer_id": "123456789", "currency_code": "USD", "items": [ { "id": "1", "sku": "234.788.14", "name": "iPhone 15", "variant_text": "Space Grey", "product_group": "Mobile Phones", "quantity": 1, "total": "1299.00", "additional_data": { "item-serial": "123456789", "item-imei": "98765432" } } ]}
{ "id": "123e4567-e89b-12d3-a456-426614174000", "items": [ { "id": "1", "sku": "234.788.14", "insurance_options": [ { "type": "none", "sku": "0", "name": "No Insurance", "product_group": "", "unit_price": "0.00", "sales_taxes": [] }, { "type": "insurance", "sku": "987-12", "name": "12 Months", "product_group": "Tech Insurance", "unit_price": "39.90", "sales_taxes": [ { "name": "Regular VAT", "amount": "7.98", "percentage": 25 } ], "additional_data": { "insurance-period": "12" } }, { "type": "insurance", "sku": "987-24", "name": "24 Months", "product_group": "Tech Insurance", "unit_price": "59.90", "sales_taxes": [ { "name": "Regular VAT", "amount": "11.98", "percentage": 25 } ], "additional_data": { "insurance-period": "24" } } ], "policyholder_info": { "name": "required", "personal_id": "required", "address": "required", "comment": "optional" } } ]}
HTTP Status Code Summary | |
---|---|
201 | Successful. Returns a CartInsurance object, including details of insurance options, applicable to the cart. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
403 | User is not authorized to perform operation. |
500 | Internal Server Error. |
502 | Bad Gateway. |
Objects
CartInsuranceobject
The object containing the current cart in the POS that insurance options should be returned for.
The ID for the product insurance options, unique identifier. Sitoo POS will send cart ID for this field.
The ID for the CRM channel that the customer belongs to.
The ID for the customer associated with the purchase.
Currency used for the cart (3-letter ISO 4217).
Cart items (products) in the cart.
CartItemobject
The object holding a cart item for a product to be insured.
The ID used to identify the specific product item in the cart. Sitoo POS will send the cart item ID for this field.
Stock Keeping Unit (SKU) for the cart item.
The name of the product.
Product variant data for the product.
Name of the product group for this cart item.
Quantity for the cart item.
Total amount to pay for the cart item incl. VAT (after discounts have been applied).
Additional data that is associated with the cart item (product).
Insurance options for this cart item.
Policy holder info that should be collected for the policyholder of this insurance.
InsuranceOptionobject
An object containing an insurance for a product.
The type of insurance option.
VALUES |
---|
none |
insurance |
Stock keeping unit (SKU) for this insurance option. Unique value to identify the insurance option.
The name of the insurance option.
Product variant data for the insurance option.
Name of the product group for the insurance option.
Price per unit for the insurance option incl. sales tax (VAT). What the customer will pay for the insurance option. The value must be greater than or equal to "0.00". The zero value, "0.00", is used for the insurance type none
.
Sales taxes included per unit.
Additional data that will be added to order items if the insurance is purchased.
Moneystring
PolicyHolderInfoobject
Object holding the definition of what information that needs to be collected for the policyholder of the insurance.
Full name of the policyholder.
Personal ID (SSN or similar) for the policyholder.
Full address for the policyholder.
Mobile phone number for the policyholder.
Email for the policyholder.
A note regarding the policyholder or the insurance instance.
PolicyHolderInfoCollectionModestring
An enumerated value indicating how the type of information should be collected for the policyholder of an insurance.
not-collected
Not requested from policyholderrequired
Needs to be providedoptional
Can be optionally provided
SalesTaxobject
The sales tax object.
The name of the tax.
The amount of tax.
The tax percentage.
ErrorCodestring
Error code describing the data and depending on value, the error_data
property will contain the following
additional information:
Error code Additional info field-missing field
field-unknown field
field-readonly field
field-type field
field-validation field
version-invalid none condition-failed none other none
ErrorMessageobject
Error object returned when a request is not successful.
ID of request.
The error code returned.
A string map with fields depending on the error_code
. The field message
is always available.