Cart / checkout quote and risk check
Path: /go/packageOpenApiWeb/OpenApiV2/CalcPrice
Section titled “Path: /go/packageOpenApiWeb/OpenApiV2/CalcPrice”A mixed quoting endpoint: it supports warranty quotes on the product detail page, shipping-protection cart quotes, and warranty cart quotes (pass the corresponding warranty plan).
The trial calculation includes risk control. If the endpoint returns an error, treat the quote as failed and shipping protection as unavailable. You may also call it without the shipping-protection checkbox to fetch the price.
For the full field reference see API reference · CalcPrice.
Notes:
- European storefront prices commonly include tax, while US storefront prices commonly exclude it.
orderInfo.totalPayPricemeans the amount actually paid for the order’s goods. - Example convention on this page:
totalPayPrice = totalPrice − preferentialPrice(tax and shipping are passed separately viataxPrice/shipPriceand are not counted intotalPayPrice). orderInfo.totalPayPriceis the CalcPrice quote basis and should be provided.preferentialPriceonly describes the discount amount; it is optional, and callers should not invent a discount value merely to satisfy the request.- Item-row JSON keys
ItemPicInfoMainandPropertiesare PascalCase. - Select the warranty plan via
ppVariant.properties(e.g."Plan ID": "2 Years"); no field of the requestppVariantis validated as required, so sending onlypropertiesfor a specific plan is valid. - For warranty results read
data.ppComputeResult.oVariants[].ppVariants: the fields areoSkuId/ppVariants/price(notoSku/ppVariantItems/priceString). - Risk control: purchasing is allowed only when
rcActionisaccept.
Request examples:
Section titled “Request examples:”Shipping-protection quote request
Section titled “Shipping-protection quote request”{ "userId": "VIPER3", "userEmail": "VIPER3@qq.com", "orderInfo": { "orderId": "", "currency": "USD", "totalPrice": "150.00", "preferentialPrice": "50.00", "taxPrice": "0.00", "shipPrice": "0.00", "totalPayPrice": "100.00" }, "buyerIp": "113.89.35.162", "cartToken": "cart_7f3c9a21-b4e8-4d0f-9a1c-6e2d8b5f0a13", "isShippingProtectionOpen": true}Shipping-protection quote request (max coverage)
Section titled “Shipping-protection quote request (max coverage)”{ "userId": "VIPER3", "userEmail": "VIPER3@qq.com", "orderInfo": { "orderId": "", "currency": "USD", "totalPrice": "5050.00", "preferentialPrice": "10.00", "taxPrice": "0.00", "shipPrice": "0.00", "totalPayPrice": "5040.00", "payTime": "" }, "buyerIp": "113.89.35.162", "cartToken": "cart_7f3c9a21-b4e8-4d0f-9a1c-6e2d8b5f0a13", "isShippingProtectionOpen": true}Extended-warranty quote request
Section titled “Extended-warranty quote request”Use this endpoint for warranty quotes on the product page and in the cart.
{ "userId": "VIPER3", "userEmail": "VIPER3@qq.com", "orderInfo": { "currency": "USD", "totalPrice": "200", "preferentialPrice": "10", "taxPrice": "5", "shipPrice": "20", "totalPayPrice": "190", "itemList": [ { "itemId": "97760109-16ad-40c9-9385-caba381a26aa", "skuId": "sku1", "variantId": "var1", "itemName": "Variant 1", "ItemPicInfoMain": [ "https://xxxxxxxxx/pic1", "https://xxxxxxxxx/pic2" ], "currency": "USD", "unitNum": "2", "unitPrice": "100", "preferentialPrice": "0", "totalPrice": "200", "totalPayPrice": "200", "Properties": { "otherKey1": "1", "otherKey2": "2" } } ] }}Extended-warranty quote request with a specific plan
Section titled “Extended-warranty quote request with a specific plan”{ "userId": "VIPER3", "userEmail": "VIPER3@qq.com", "orderInfo": { "currency": "USD", "totalPrice": "200", "preferentialPrice": "10", "taxPrice": "5", "shipPrice": "20", "totalPayPrice": "190", "itemList": [ { "itemId": "97760109-16ad-40c9-9385-caba381a26aa", "skuId": "sku1", "variantId": "var1", "itemName": "Variant 1", "ItemPicInfoMain": [ "https://xxxxxxxxx/pic1", "https://xxxxxxxxx/pic2" ], "currency": "USD", "unitNum": "2", "unitPrice": "100", "preferentialPrice": "0", "totalPrice": "200", "totalPayPrice": "200", "Properties": { "otherKey1": "1", "otherKey2": "2" }, "ppVariant": { "properties": { "Plan ID": "2 Years" } } } ] }}Combined warranty + shipping-protection quote request
Section titled “Combined warranty + shipping-protection quote request”{ "userId": "VIPER3", "userEmail": "VIPER3@qq.com", "orderInfo": { "currency": "USD", "totalPrice": "200", "preferentialPrice": "10", "taxPrice": "5", "shipPrice": "20", "totalPayPrice": "190", "itemList": [ { "itemId": "97760109-16ad-40c9-9385-caba381a26aa", "skuId": "sku1", "variantId": "var1", "itemName": "Variant 1", "ItemPicInfoMain": [ "https://xxxxxxxxx/pic1", "https://xxxxxxxxx/pic2" ], "currency": "USD", "unitNum": "2", "unitPrice": "100", "preferentialPrice": "0", "totalPrice": "200", "totalPayPrice": "200", "Properties": { "otherKey1": "1", "otherKey2": "2" }, "ppVariant": { "properties": { "Plan ID": "2 Years" } } } ] }, "isShippingProtectionOpen": true}Response examples:
Section titled “Response examples:”Shipping-protection quote response
Section titled “Shipping-protection quote response”{ "errCode": 0, "errMsg": "success", "data": { "rcResult": { "disRcId": "", "rcState": 0, "rcAction": "accept", "rcMsg": "Pass", "rcInfo": {} }, "spComputeResult": { "disComputeId": "xcp-00222550000000000508824155", "computeState": 0, "computeMsg": "success", "currency": "USD", "currencySymbol": "", "totalPrice": "2", "extId": "" }, "ppComputeResult": null }}Shipping-protection quote response — over max coverage
Section titled “Shipping-protection quote response — over max coverage”{ "errCode": 801027, "errMsg": "Quote error errCode: 801027, errMsg: shipping-protection price exceeds the maximum coverage; coverage is temporarily unavailable", "data": null}Extended-warranty quote response
Section titled “Extended-warranty quote response”{ "errCode": 0, "errMsg": "success", "data": { "rcResult": { "disRcId": "", "rcState": 0, "rcAction": "accept", "rcMsg": "Pass", "rcInfo": {} }, "spComputeResult": { "disComputeId": "xcp-00222550000000000508825155", "computeState": 0, "computeMsg": "Shipping protection not selected", "currency": "", "currencySymbol": "", "totalPrice": "0.00", "extId": "" }, "ppComputeResult": { "disComputeId": "xcp-00222550000000000508825155", "computeState": 0, "computeMsg": "", "extId": "", "oVariants": [ { "oItemId": "97760109-16ad-40c9-9385-caba381a26aa", "oVariantId": "var1", "oSkuId": "sku1", "ppVariants": [ { "variantId": "", "name": "1 Year", "price": "1.9999", "currency": "USD", "currencySymbol": "", "properties": { "Plan ID": "1 Year", "Product": "Variant 1", "Reference": "97760109-16ad-40c9-9385-caba381a26aa" } }, { "variantId": "", "name": "2 Years", "price": "3.9998", "currency": "USD", "currencySymbol": "", "properties": { "Plan ID": "2 Years", "Product": "Variant 1", "Reference": "97760109-16ad-40c9-9385-caba381a26aa" } } ] } ] } }}Extended-warranty quote response — specific plan
Section titled “Extended-warranty quote response — specific plan”{ "errCode": 0, "errMsg": "success", "data": { "rcResult": { "disRcId": "", "rcState": 0, "rcAction": "accept", "rcMsg": "Pass", "rcInfo": {} }, "spComputeResult": { "disComputeId": "xcp-00222550000000000508825255", "computeState": 0, "computeMsg": "Shipping protection not selected", "currency": "", "currencySymbol": "", "totalPrice": "0.00", "extId": "" }, "ppComputeResult": { "disComputeId": "xcp-00222550000000000508825255", "computeState": 0, "computeMsg": "", "extId": "", "oVariants": [ { "oItemId": "97760109-16ad-40c9-9385-caba381a26aa", "oVariantId": "var1", "oSkuId": "sku1", "ppVariants": [ { "variantId": "", "name": "2 Years", "price": "3.9998", "currency": "USD", "currencySymbol": "", "properties": { "Plan ID": "2 Years", "Product": "Variant 1", "Reference": "97760109-16ad-40c9-9385-caba381a26aa" } } ] } ] } }}Combined warranty + shipping-protection quote response
Section titled “Combined warranty + shipping-protection quote response”{ "errCode": 0, "errMsg": "success", "data": { "rcResult": { "disRcId": "", "rcState": 0, "rcAction": "accept", "rcMsg": "Pass", "rcInfo": {} }, "spComputeResult": { "disComputeId": "xcp-00222550000000000508825355", "computeState": 0, "computeMsg": "success", "currency": "USD", "currencySymbol": "", "totalPrice": "3.3", "extId": "" }, "ppComputeResult": { "disComputeId": "xcp-00222550000000000508825355", "computeState": 0, "computeMsg": "", "extId": "", "oVariants": [ { "oItemId": "97760109-16ad-40c9-9385-caba381a26aa", "oVariantId": "var1", "oSkuId": "sku1", "ppVariants": [ { "variantId": "", "name": "2 Years", "price": "3.9998", "currency": "USD", "currencySymbol": "", "properties": { "Plan ID": "2 Years", "Product": "Variant 1", "Reference": "97760109-16ad-40c9-9385-caba381a26aa" } } ] } ] } }}