Add to Cart with REST
With the Add to Cart REST API, developers can add a line item to an existing shopping cart, retrieve the contents of a cart, modify the quantity of an item in a cart, and delete items from a cart. Follow the steps below for how to implement the following methods through API requests:
Add a Product to a Cart Get Cart Data Get Cart Item Data Get Product Data Remove an Item from a Cart Update the Quantity of an Item in a Cart Proceed to Checkout
This guide also defines the product data and cart data values that can be edited.
Add a Product to a Cart
Use the REST API to add a line item to an existing Kibo cart. To add the line item, use the following POST method and include data about the line item to be added.
Required and Optional Parameters
Parameter Required Description product Yes The REST resource for the product. productLink Yes The direct link to the product detail page. catalogID Optional The manufacturer catalog ID for the product. If omitted, the default catalog that is configured for this API key is used. quantity Optional How many of this product to add. Defaults to 1 if not included. itemOptions Optional Options that apply to the line item being added. In the preceding code, options include values for color and size.
Example Request
POST https://product.shopatron.com/cart/{cartID}/cartItems?api_key={api_key}
Where:
cartID is the ID of the cart to which the line item is being added. This value is a unique identifier created for the cart api_key is the API key obtained from Kibo
The request body contains the above parameters:
Accept:application/json{
"product":"https://product.shopatron.com/product/abc123?api_key=asdf1234&catalogID=1",
"catalogID":1,
"quantity":1,
"itemOptions":{ <a href="javascript:;"><i class="fa fa-minus-square-o">
"192512":"200260",
"803881":"200405"
},
"productLink":"https://product.shopatron.com/products/abc123">
Example Responses
The possible response codes are given here:
Response Code Description 201 Created Item successfully added to cart. Includes a cartItemID for the item that was added. 403 Forbidden The specified API key does not exist. 400 Bad Request The included parameter was either not passed or was not a valid URL.
When an item has been successfully added to the cart, a 201 Created response is returned. The response includes the system-generated cartItemID for the item. Use this cartItemID to get, update, or delete cart contents. A success response would look like:
HTTP/1.1 201 Created Location:
https://product.shopatron.com/cart/{cartID}/cartItems/{cartItemID}?api_key?={api_key}
Content-Type: application/json
{
"cartItemId":1234
}
If an API key that does not exist is entered, a 403 Forbidden response is returned and no action is taken. This invalid API key error might return:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Forbidden",
"additionalInfo": "Api_key: {api_key} is not valid”
}
If the value entered for the product, product link, or cart ID is not valid, a 404 Bad Request response is returned and no action is taken. The response would look like:
HTTP/1.1 404 Bad Request Content-Type: application/json
{
"error": "Bad Request", "additionalInfo": "...”
}
Get Cart Data
Get data for all or part of a cart with the below request:
GET https://product.shopatron.com/cart/{cart_id}?api_key={api_key}
Where:
cart_ID is the ID of the cart to which the item will be added api_key is the API key obtained from Kibo
Note that the request header should be “Content-Type: application/json.”
Parameters
The following parameters are usually returned in the GET response:
Parameter Description catalogID The manufacturer catalog ID. quantity The number of these items being added to the cart. product The URL of the product being added to the cart. itemOptions Options that apply to the line item being added. price The total cost of the item. Includes option additional price if any. productLink A link to the product detail page associated with this item.
Example Responses
The possible response codes are given here:
Response Code Description 200 OK Success response, with cart data. 403 Forbidden API key does not exist. 404 Not Found Invalid fragment.
When a valid cart ID or fragment and a valid API key are provided, a 200 OK success response is returned, along with the cart data. The cart data associated with the response is slightly different, depending on whether the data is for a complete cart or a partial cart. This first example displays the data for a complete cart:
HTTP/1.1 200 OK
Content-Type: application/json
{
"completedDate": null,
"currency": "USD",
"cartID": "6b98c08f38e5dc65583abd24b07e7ace",
"createdDate": "2013-06-14T13:43:05-0700",
"locale": "en-US",
"externalCartID": null,
"cartItems": {
"8076a85ecb1f65018cace8030c3a3ba4": {
"catalogID": "0",
"quantity": 2,
"price": "49.99",
"product": "https://product.shopatron.com/product/100090?api_key=9ktd32ij&catalogID=0",
"itemOptions": {
"192511": "200259",
"803881": "200404"
},
"productLink": "https://my.store.com/products/100090"
},
"8224ef50a37bc5954421e9e4826850dc": {
"catalogID": "0",
"quantity": 1,
"price": "49.99",
"product": "https://product.shopatron.com/product/100110?api_key=9ktd32ij&catalogID=0",
"itemOptions": {
"192512": "200260",
"803881": "200405"
},
"productLink": "https://my.store.com/products/100110"
}
}
}
The following is a response for a partial cart:
HTTP/1.1 200 OK
Content-Type: application/json
{
"completedDate": null,
"currency": "USD",
"cartID": "6b98c08f38e5dc65583abd24b07e7ace",
"createdDate": "2013-06-14T13:43:05-0700",
"locale": "en-US",
"externalCartID": null,
"cartItems": {
"8076a85ecb1f65018cace8030c3a3ba4": {
"catalogID": "0",
"quantity": 2,
"price": "49.99",
"product": "https://product.shopatron.com/product/100090?api_key=9ktd32ij&catalogID=0",
"itemOptions": {
"192511": "200259",
"803881": "200404"
},
"productLink": "https://my.store.com/products/100090"
},
"8224ef50a37bc5954421e9e4826850dc": {
"catalogID": "0",
"quantity": 1,
"price": "49.99",
"product": "https://product.shopatron.com/product/100110?api_key=9ktd32ij&catalogID=0",
"itemOptions": {
"192512": "200260",
"803881": "200405"
},
"productLink": "https://my.store.com/products/100110"
}
}
}
If an API key that does not exist is entered, a 403 Forbidden response is returned with no headers or additional data and no action is taken. This error response is displayed below:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Forbidden",
"additionalInfo": "Api_key: {api_key} is not valid"
}
If an invalid cart ID or fragment is entered, a 404 Not Found code is returned and no action is taken.
HTTP/1.1 404 Not found
Content-Type: application/json
{
error: "Not Found",
additionalInfo: "The requested cart property:{fragment} does not exist in cartID:{cartID}"
}
Get Cart Item Data
Get data for a specific cart item with the following request:
GET
https://product.shopatron.com/cart/{cart_id}/cartItems/{cartItemID}?api_key={api_key
}
Where:
cart_ID is the ID of the cart to which the item will be added cartItemID is the cartItemID for an item, as returned when the product was added to the cart, and is required only if a partial cart is being inquired about api_key is the API key obtained from Kibo
Note that the request header should be “Content-Type: application/json.”
Parameter Description catalogID The manufacturer catalog ID. quantity The number of these items being added to the cart. product The URL of the product being added to the cart. price The total cost of the item. Includes option additional price if any. image An image of the product with the selected option. itemOptions Options that apply to the line item being added. productLink A link to the product detail page associated with this item.
Example Responses
The possible response codes are given here. Details on each response code follow.
Response Code Description 200 OK Success response, with cart item data. 403 Forbidden The specified API key does not exist. 404 Not Found Invalid fragment.
When a valid cart ID or fragment and a valid API key are provided, a 200 OK success response is returned, along with the cart item data. The cart item data associated with the response is slightly different, depending on whether the data is for a complete cart or a partial cart.
HTTP/1.1 200 OK
Content-Type: application/json
{
"product":"https://product.shopatron.com/product/abc123?api_key={api_key}",
"catalogID":1,
"quantity":1, "price":"1.00",
"image":"https://cdn.shptrn.com/...", "itemOptions":{
"color":"Red",
"size":"XL",
},
"productLink":"https://lambo.cust.shopatron.com/products/abc123",
}
If an API key that does not exist is entered, a 403 Forbidden response is returned, with no headers or additional data and no action is taken.
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Forbidden",
"additionalInfo": "Api_key: {api_key} is not valid"
}
Get Product Data
Get data for a product in the cart by specifying its part number, as explained in detail below.
GET
https://product.shopatron.com/product/{partNumber}?api_key={api_key}&catalogID=
{catalogID}
Where:
partNumber is the part number for the product api_key is the API key obtained from Kibo
Note that the request header should be “Accept: application/json.”
Parameters
The parameters returned in the response include:
Parameters Occurs Data Type Description partNumber 1 A string of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. Part number for the product. name 1 A string of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. The product name. price 1 A decimal number greater than 0.00 with two places after the decimal. The price the product is selling for. Should not include currency symbols. availability.code Must be one of (Y|N|D|L|M|P|I|S) The availability of the product. May be any of these codes: Y (Yes, item is in stock and ready to ship), N (No, item can be placed on backorder), L (Limited, limited availability), M (MFG ship, Item is in stock and ready to ship), J (Split to merchant, item is available), P (PreOrder, item is not available at this time and can be preordered), D (Discontinued, the item is discontinued and an attempt to find it will be made), I (Digital content, this item is available for immediate download), and S (Ship to store only, this item is Ship to Store Only). averageDealerMargin 1 A number between 0 and 1 The Average Dealer Margin for the product. This is a decimal value between 0.2 and 0.9, inclusive, expressed as a decimal. The formula for calculating Average Dealer Margin is: (offer price – wholesale price) x offer price locale 1 An IETF locale code The locale for the product. currency 1 ISO 4217 The currency codes for the product. image 1 A URL A URL pointing to the product image. images 1-n An array of Objects Each object in the array describes an image. The array is ordered by image rank starting with the primary image. images[].name 0-1 Any String A label for the image. Images[].url 1 A URL An image resource. description 0-1 Any String A short description of the product. VATRate 0-1 A number between 0 and 1 Only appears for catalogs that use VAT. productOptions Object A mapping of optionName to the product option definition productOptions[groupID]. displayName 0-1 Any String This can be used if the option name presented to the user needs to be different than what is stored with the order. For example, the manufacturer might want to store a code to facilitate automation but wants to display a human-readable version to the user. productOptions[groupId]. description 0-1 Any String A description of the option group. productOptions[groupID]. optionChoices.options 0-1 An Object, where the key is the option name and the value is an option definition The set of options available for this group. productOptions[groupId]. optionChoices.options [optionId] 1-n An option definition The set of options available for this group. optionID 0-n A string of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. The group name of the option. productOptions[groupID]. optionChoices.options [optionID].displayName 0-1 Any String Use this if the option value to be stored differs from the value that should be displayed. productOptions[groupID]. optionChoices.options [optionID].description 0-1 Any String A description of the optionID choice. productOptions[groupID]. optionChoices.options [optionID].additionalPrice 0-1 A decimal number greater than 0.00 with two places after the decimal The additional price, if any, required to purchase the product with this option. productOptions[groupId]. optionChoices.options [optionId].rank 1 Any Integer A ranking of the product with the selected option. productOptions[groupID]. optionChoices.options [optionID].image 0-1 A URL A URL pointing to an option image. optionSet 0-n selectedOption elements This defines a valid combination of options. It can be used to describe slaved options. optionSets.selectedOptions 1-n An Object with groupId-optionId pairs The value of the selected option. weight 0 An Object If weight based shipping is being used, the weight of the product needs to be known. weight.value 1 A decimal number If weight based shipping is being used, the weight of the product needs to be known. weight.units 1 Must be one of (lb|kg) Units for this product’s weight. Used for weight-based shipping. shippingMethod 0-1 A non-negative integer This is a Kibo Order Management shipping method ID. customFields 0-1 Anything Any custom data the client wants to store with the product. When products are coming from Kibo, specs will be populated here.
The possible response codes are given here. Details on each response code follow.
Response Code Description 200 OK Success response, with product data. 403 Forbidden API key does not exist. 404 Not Found Non-existent part number.
When a valid part number and a valid API key are provided, a 200 OK success response is returned, along with the cart data.
HTTP/1.1 200 OK
Content-Type: application/json
{
"partNumber": "100060",
"name": "Many slaved options",
"price": "49.99",
"availability": {
"code": "M"
},
"averageDealerMargin": "0.40",
"locale": "en-US",
"currency": "USD",
"description": "Sizes:<br>\n<b>S (32BC-34B)<br>\nM (34BC-36B)<br>\nL (36BC- 38B)<br>\nXL (38BC-40B)<br></b>\nBody: 88% polyester / 12% Lycra®<br>\nFront Lining: 72% polyester / 21% Sorbtek®/ 7% spandex spacer fabric<br>\nBack Lining: Powermesh 83% nylon / 17% Lycra®",
"image": "https://cdn.shptrn.com/media/mfg/2230/product_image/123f1abb0704fa5d6893cb6 4ada9e2ac.jpg?1330767605",
"images": [
{
"url": "https://cdn.shptrn.com/media/mfg/2230/product_image/123f1abb0704fa5d6893cb6 4ada9e2ac.jpg?1330767605"
},
{
"name": "Front",
"url": "https://cdn.shptrn.com/media/mfg/2230/product_image/x1_123f1abb0704fa5d6893 cb64ada9e2ac.jpg?1330767605"
}
],
"productOptions": {
"192502": {
"displayName": "Size",
"description": null,
"rank": 14,
"optionChoices": {
"options": {
"200259": {
"displayName": "Small",
"description": null,
"additionalPrice": "0.00",
"rank": "1"
},
"200260": {
"displayName": "Medium",
"description": null,
"additionalPrice": "0.00",
"rank": "2"
},
"200389": {
"displayName": "Large",
"description": null,
"additionalPrice": "0.00",
"rank": "3"
}
}
}
},
"192503": {
"displayName": "Size",
"description": null,
"rank": 12,
"optionChoices": {
"options": {
"200259": {
"displayName": "Small",
"description": null,
"additionalPrice": "0.00",
"rank": "2"
},
"200260": {
"displayName": "Medium",
"description": null,
"additionalPrice": "0.00",
"rank": "3"
},
"200389": {
"displayName": "Large",
"description": null,
"additionalPrice": "0.00",
"rank": "4"
},
"200391": {
"displayName": "Extra-Small",
"description": null,
"additionalPrice": "0.00",
"rank": "1"
}
}
}
},
"793993": {
"displayName": "Color",
"description": null,
"rank": 10,
"optionChoices": {
"options": {
"200258": {
"displayName": "Black",
"description": null,
"additionalPrice": "0.00",
"rank": "1",
"image": "https://cdn.shptrn.com/media/mfg/2230/option_image/x2_123f1abb0704fa5d6893c b64ada9e2ac_793993_200258.jpg?1330767605"
},
"200390": {
"displayName": "White",
"description": null,
"additionalPrice": "0.00",
"rank": "2",
"image": "https://cdn.shptrn.com/media/mfg/2230/option_image/x2_123f1abb0704fa5d6893c b64ada9e2ac_793993_200390.jpg?1330767605"
},
"200392": {
"displayName": "Green",
"description": null,
"additionalPrice": "0.00",
"rank": "3",
"image": "https://cdn.shptrn.com/media/mfg/2230/option_image/x2_123f1abb0704fa5d6893c b64ada9e2ac_793993_200392.jpg?1330767605"
},
"200393": {
"displayName": "Blue",
"description": null,
"additionalPrice": "0.00",
"rank": "4",
"image": "https://cdn.shptrn.com/media/mfg/2230/option_image/x2_123f1abb0704fa5d6893c b64ada9e2ac_793993_200393.jpg?1330767605"
}
}
}
},
"794203": {
"displayName": "Size",
"description": null,
"rank": 15,
"optionChoices": {
"options": {
"200259": {
"displayName": "Small",
"description": null,
"additionalPrice": "0.00",
"rank": "1"
}
}
}
}
},
"optionSets": [
{
"selectedOptions": {
"192502": "200259",
"793993": "200258"
}
},
{
"selectedOptions": {
"192502": "200260",
"793993": "200258"
}
},
{
"selectedOptions": {
"192502": "200389",
"793993": "200258"
}
},
{
"selectedOptions": {
"192503": "200391",
"793993": "200390"
}
},
{
"selectedOptions": {
"192503": "200259",
"793993": "200390"
}
},
{
"selectedOptions": {
"192503": "200260",
"793993": "200390"
}
},
{
"selectedOptions": {
"192503": "200389",
"793993": "200390"
}
},
{
"selectedOptions": {
"793993": "200392",
"794203": "200259"
}
},
{
"selectedOptions": {
"192502": "200259",
"793993": "200393"
}
},
{
"selectedOptions": {
"192502": "200260",
"793993": "200393"
}
},
{
"selectedOptions": {
"192502": "200389",
"793993": "200393"
}
}
],
"shippingMethod": "3",
"customFields": [
{
"name": "Hidden Spec",
"description": "Hidden Spec Value",
"specType": "hidden"
},
{
"name": "Sizing Chart",
"description": "Download Sizing Chart (PDF)",
"specType": "file",
"specResource": "https://cdn.shptrn.com/media/mfg/2230/spec_file/24148092.pdf?1307492349"
},
{
"name": "GlobalImageSpec",
"description": "BR flag (global image)",
"specType": "global_image",
"specResource": "https://cdn.shptrn.com/media/mfg/2230/spec_file/g_br.jpg?1307492349"
},
{
"name": "Size",
"description": "Big",
"specType": "text"
},
{
"name": "UniqueImageSpec",
"description": "JM flag (unique image)",
"specType": "unique_image",
"specResource": "https://cdn.shptrn.com/media/mfg/2230/spec_file/24041865.jpg?1307492349"
}
]
}
If an API key that does not exist is entered, a 403 Forbidden response is returned, with no headers or additional data. No action is taken.
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
error: "Forbidden",
additionalInfo: "Api_key:{api_key} is not valid"
}
If the value entered for the part number is not valid, a 404 Not Found code is returned. No action is taken.
HTTP/1.1 404 Not found
Content-Type: application/json
{
error: "Not Found",
additionalInfo: "No such product:{partNumber}"
}
Remove an Item from a Cart
It is possible to remove line items from a shopping cart using the DELETE method. If there is more than one of this item in the cart, all of them will be removed.
DELETE https://product.shopatron.com/cart/{cartID}/cartItems/{cartItemID}?api_key={api_key}
Where:
cartID is the ID of the cart from which the line item is being removed cartItemID is the ID of the item being removed, as returned by Add Item to Cart api_key is the API key obtained from Kibo
Note that the request header should be “Content-Type: application/json.”
Example Responses
The possible response codes are given here. Details on each response code follow.
Response Code Description 204 No Content Item was removed as requested. 403 Forbidden API key does not exist.
When the item has been removed as requested, a 204 No Content response is returned.
HTTP/1.1 204 No Content
If the API key entered does not exist, a 403 Forbidden response is returned, with no headers or additional data.
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
error: "Forbidden",
additionalInfo: "Api_key:{api_key} is not valid"
}
Update the Quantity of an Item in a Cart
The quantity can be changed for any line item in a cart, provided that the Cart ID and Item ID are known. To update the quantity, use the PUT method as follows:
PUT
https://product.shopatron.com/cart/{cartID}/cartItems/{cartItemID}/quantity?api_key={api_key} Content-Type: application/json
Where:
cartID is the cart ID for the cart that the item is in cartItemID is the Kibo-assigned item ID for the item, as returned by Add Item to Cart api_key is the API key obtained from Kibo
Note that the request header should be “Content-Type: application/json.”
The request data should include the new quantity for the item. This example specifies a new quantity of 2, regardless of the current quantity of that item.
2
Example Responses
The possible response codes are given here. Details on each response code follow.
Response Code Description 204 No Content Quantity was updated as requested. 403 Forbidden API key does not exist.
When a valid API key, cart ID, and cart item ID are entered and the quantity has been modified as requested, a 204 No Content response is returned:
HTTP/1.1 204 No Content
If an invalid API key is provided, then the following error would occur:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Forbidden",
"additionalInfo": "Api_key: {api_key} is not valid"
}
A nonexistent cart ID would return the following error:
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"error": "Not Found",
"additionalInfo": "The requested cart property: {cartItemID} does not exist in cartID: {cartID}"
}
Proceed to Checkout
Use this call to load the cart into Kibo checkout. It will return a link to follow in order to proceed to checkout. One optional parameter, catalogID, is expected, which can be used to override into which catalog to load the cart.
This uses the loadOrder API the same way a CFE does. The user is automatically redirected to checkout when they invoke this method. Developers building their own cart HTML will use this to link to Kibo checkout.
The request should be:
POST https://product.shopatron.com/cart/{cartID}?api_key={api_key}
Where:
cartID is the cart ID for the cart that the item is in api_key is the API key obtained from Kibo
Note that the request header should be “Content-Type: application/json.”
The request data should include the quantity for the item. This example sets the new quantity to 6, regardless of the current quantity of that item.
{
"catalogID": 6
}
Example Responses
The following parameters are included in a response:
Parameter Description checkoutOptions. catalogID This optional parameter can be used to override which checkout catalog the cart is loaded into. options.success Use the success function to override the default functionality of automatically redirecting to checkout. options.error If the request fails, provide some feedback to the user. options.complete This could be used to remove some processing graphic whether the request was successful or not.
The possible response codes are given here. Details on each response code follow.
Response Code Description 201 Created Quantity was updated as requested. 403 Forbidden API key is not valid.
When a valid API key, cart ID, and cart item ID are entered and the quantity has been modified as requested, a 201 Created response is returned:
HTTP/1.1 201 Created
Content-Type: application/json Location: https://...
{
"checkoutLink": "https://..."
}
If an invalid API key is provided, then the following error response is returned:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Forbidden",
"additionalInfo": "Api_key: {api_key} is not valid"
}
Product Data Fields
These values can be defined for a product:
Parameter Data Type Description partNumber A string of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. Part number for the product. name A string of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. The product name. price A decimal number greater than 0.00 with two places after the decimal The price the product is selling for and should not include currency symbols. availability.code String that must be one of (Y|N|D|L|M|P|I|S). The availability of the product. May be any of these codes: Y (Yes, item is in stock and ready to ship), N (No, item can be placed on backorder), L (Limited, limited availability), M (MFG ship, item is in stock and ready to ship), J (Split to Merchant, item is available), P (PreOrder, item is not available at this time and can be preordered), D (Discontinued, the item is discontinued and an attempt to find it will be made), I (Digital Content, this item is available for immediate download), and S (Ship to Store Only, this item is Ship to Store Only). averageDealerMargin An number between 0 and 1 The Average Dealer Margin for the product. This is a decimal value between 0.2 and 0.9, inclusive, expressed as a decimal. The formula for calculating Average Dealer Margin is: (offer price – wholesale price) x offer price locale An IETF locale code The locale for the product. currency ISO 4217 The currency codes for the product. image A URL A URL pointing to the product image. images An array of Objects Each object in the array describes an image. The array is ordered by image rank starting with the primary image. images[].name Any String A label for the image. images[].url A URL An image resource. description Any String A short description of the product. VATRate A number between 0 and 1 Only appears for catalogs that use VAT. productOptions Object A mapping of optionName to the product option definition. productOptions[groupID]. displayName Any String This can be used if option name presented to the user needs to be different than what is stored with the order. For example, the manufacturer might want to store a code to facilitate automation but wants to display a human- readable version to the user. productOptions[groupId]. description Any String A description of the option group. productOptions[groupID]. optionChoices.options An Object, where the key is the option name, and the value is an option definition. The set of options available for this group. productOptions[groupId]. optionChoices.options [optionId] An Option definition. The set of options available for this group. optionID A String of at least one character. Line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces are not allowed. The group name of the option. productOptions[groupID]. optionChoices.options [optionID].displayName Any String Use this if the option value to be stored differs from the value that should be displayed. productOptions[groupID]. optionChoices.options [optionID].description Any String A description of the optionID choice. productOptions[groupID]. optionChoices.options [optionID].additionalPrice A decimal number greater than 0.00 with two places after the decimal The additional price, if any, required to purchase the product with this option. productOptions[groupId]. optionChoices.options [optionId].rank Any Integer An option rank that can be useful when building UIs. productOptions[groupID]. optionChoices.options [optionID].image A URL A URL pointing to an option image. optionSet selectedOption elements This defines a valid combination of options. It can be used to describe slaved options. optionSets.selectedOptions An Object with groupId-optionId pairs The value of the selected option. weight Object If weight based shipping is being used, the weight of the product needs to be known. weight.value A decimal number If weight based shipping is being used, the weight of the product needs to be known. weight.units Must be one of (lb|kg) Units for this product’s weight. Used for weight-based shipping. shippingMethod A non-negative Integer This is a Kibo Order Management shipping method ID. customFields Any value Any custom data the client wants to store with the product. When products are coming from Kibo, specs will be populated here.
Cart Data Fields
These values can be defined for a cart:
Parameter Data Type Description cartID String A unique identifier for this cart. createdDate String A date in ISO 8601 format indicating when the cart was first created. completedDate String A date in ISO 8601 format indicating when the cart has completed checkout. If the cart has not been completed, this value is null. locale String A locale in IETF language tag format. currency String An ISO 4217 currency code. externalCartID String When the cart is passed to checkout, it passes returns this value. If the cart has not been loaded into checkout yet, this value is null. cartItems Object A mapping of cartItemIDs to objects that describes an item in the cart. cartItems[cartItemID]. catalogID Int The catalog that this product is in. cartItems[cartItemID]. quantity Int The quantity for this product. cartItems[cartItemID]. price String The price of the item in the cart, including additional price of options selected. cartItems[cartItemID]. product String A URL that points to a product data REST resource. cartItems[cartItemID]. itemOptions Object A mapping of option names to selected values. cartItems[cartItemID]. productLink String A link to the product detail page for the product.