Add product options to cart with an existing order line.
This endpoint allows adding additional product options like engraving, customizations or additional services to an existing product in the cart. <br /><br /> Below you'll find a sample request for adding two product options (engraving and font type) to a cart with id C1234, to order line with LineItemId "a43707ab-1ebf-4114-8c48-eb0374932a4c", which in this case is a diamond ring. <br /> The product options "P3" and "P5" should be valid SKUs for products in Omnium, with product type set to <code>ProductOption</code>. <br /> The price for the product option will set from A: a specific price set in the parameter price, as displayed below. B: The price specified for the product option. C: The price specified for the product matching the sku.
POST /api/carts/AddProductOptionsItemToCart
{
{
"cartId": "C1234", // The unique identifier of the cart
"parentLineItemId": "a43707ab-1ebf-4114-8c48-eb0374932a4c", // The ID of the existing order line to which product options are added
"productOptions": [
{
"skuId": "P3", // SKU ID of the product option
"title": "Font type", // Name of the product option
"value": "Big and bold" // The selected option value
"price": 199 // Optional: If you do not et the price in the request, the price will be fetched from the product in Omnium
},
{
"skuId": "P5",
"title": "Engraving",
"value": "omnium4ever"
},
{
"skuId": "P8" // It would often be sufficient to only use the skuId. The price and values would then fall back to the product option or the store product
}
]
}
}
This would add three additional order lines to the cart, which would result in a diamond ring engraved with "omnium4ever" with font type "Big and bold", and also the option "P8" which in this case is an ultra nice gift box 💍 <br />
Request
- Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
- URL: https://api.omnium.no/api/Cart/AddProductOptionsItemToCart
- Auth: API key in header Authorization
Request body
Response
Item is added and updated cart is returned
Changes
No recorded changes to this operation across all 1 revision of this API.