updateItems
post
/ccagent/v1/purchaseLists/{id}/updateItems
Update Purchase List Items. This operation is used to update the purchase list items.
Basic operations include add, delete, update. add operation is considered as default if nothing is specified in the input payload.
Dynamic Properties of purchase list line item can be added in the the request using the key value pair structure ("dynamicPropertyKey":"dynamicPropertyValue"). These property values can take the types of boolean, date, float, string, timestamp, enumerated, big string.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The ID of the Purchase list.
Root Schema : updatePurchaseListItems_request
Type:
Show Source
object
-
items(optional):
array items
list of purchase list items
Example:
{
"items":[
{
"dynamicProperty":"dynamicProperty value",
"op":"update",
"productId":"Product_18Cxi",
"quantityDesired":25,
"catRefId":"Sku_18Dxi"
},
{
"op":"delete",
"productId":"Product_5Cx",
"quantityDesired":30,
"catRefId":"Sku_5Cxy"
},
{
"dynamicProperty":"dynamicProperty value",
"op":"add",
"productId":"Product_5Cx",
"quantityDesired":10,
"catRefId":"Sku_5Cxy"
}
]
}
Nested Schema : items
Type:
Show Source
object
-
catRefId:
string
catalog ref id
-
dynamicProperty(optional):
object dynamicProperty
The value of the dynamic Property
-
op:
string
operation to be performed on purchase list item.This can be one of add/update/delete
-
productId:
string
The product id
-
quantityDesired:
integer
Quantity desired for the item
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updatePurchaseListItems_response
Type:
Show Source
object
-
messsage(optional):
string
Success message
-
success(optional):
boolean
Boolean success value either true or false
Example Response (application/json)
{
"success":true,
"messsage":"Purchase List Item(s) updated successfully."
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|64107|Error while adding an item to purchase list|
|64100|Invalid profile or user logged out|
|64106|Error while removing an item from purchase list|
|64109|Error while updating an item of purchase list
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code