Runtime_BasketItem_Update
#
Description#
This function updates an item in a basket. Item must be specified using one of Group_ID or Line_ID, but not both.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
line_id group_id |
Number Number |
The id number of the basket line id you wish to delete The id of the basket group_id you wish to delete |
quantity |
Number | The quantity to update to |
subscription_term_id |
Number | The optional id of Subscription Term to update to |
attributes |
Array | Array of selected attribute code/values objects. Example: [{“code”:”size”,”value”:”large”},{“code”:”rush”, “value”:”“}] |
Session_ID |
String | Required. Session ID for the basket you wish to update |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
total |
Number | Updated basket total price |
subtotal |
Number | Updated basket subtotal price |
formatted_total |
String | Currency formatted basket total price |
formatted_subtotal |
String | Currency formatted basket subtotal price |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Runtime_BasketItem_Update",
"Session_Type": "runtime",
"Session_ID": "b4ddb93804b45e1e3c9b22165d7fe1f2",
"group_id": "20",
"Quantity": 100,
"Attributes": [{"code": "color", "value": "blue"}]
}
Example Response#
{
"success": 1,
"data": {
"total": 1500.0,
"subtotal": 1500.0,
"formatted_total": "$1,500.00",
"formatted_subtotal": "$1,500.00"
}
}