createPurchaseList
post
/ccagent/v1/purchaseLists
Create Purchase List. This operation is used to create a purchase list for a given site, account, user context.Each purchase list should have a unique name for a given user.
Dynamic Properties of purchase list 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
Root Schema : createPurchaseList_request
Type:
Show Source
object
-
accountId(optional):
string
The id of the Organization.
-
description(optional):
string
Description for the purchase list.
-
items(optional):
array items
list of purchase list items
-
name:
string
The name of the purchase list.
-
siteId(optional):
string
The Id of the site.
Example:
{
"accountId":"or-100001",
"name":"Purchase List 1",
"description":"Purchase List",
"siteId":"siteUS",
"items":[
{
"productId":"Product_18Cxi",
"quantityDesired":25,
"catRefId":"Sku_18Dxi"
},
{
"productId":"Product_5Cx",
"quantityDesired":30,
"catRefId":"Sku_5Cxy"
}
]
}
Nested Schema : items
Type:
Show Source
object
-
catRefId:
string
catalog ref id
-
productId:
string
The product id
-
quantityDesired:
integer
Quantity desired for the item
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createPurchaseList_response
Type:
Show Source
object
-
accountId(optional):
string
The id of the Organization.
-
creationDate(optional):
string
The date when purchase list is created.
-
description(optional):
string
Description for the purchase list.
-
id(optional):
string
The Id of the purchase list.
-
items(optional):
array items
list of purchase list items
-
lastModifiedBy(optional):
object lastModifiedBy
The user who last modified this purchase list.
-
lastModifiedDate(optional):
string
The last modified date for the purchase list.
-
name(optional):
string
The name of the purchase list.
-
owner(optional):
object owner
The user who created this purchase list.
-
repositoryId(optional):
string
Repository Id of the purchase list.
- sharedWithOthers(optional): boolean
-
siteId(optional):
string
The Id of the site.
Nested Schema : lastModifiedBy
Type:
object
The user who last modified this purchase list.
Show Source
-
email(optional):
string
The email id of the user
-
firstName(optional):
string
The first name of the user
-
lastName(optional):
string
The last name of the user
-
repositoryId(optional):
string
respository Id of the user
Nested Schema : owner
Type:
object
The user who created this purchase list.
Show Source
-
email(optional):
string
The email id of the user
-
firstName(optional):
string
The first name of the user
-
lastName(optional):
string
The last name of the user
-
repositoryId(optional):
string
respository Id of the user
Nested Schema : items
Type:
Show Source
object
-
catRefId(optional):
string
catalog ref id
-
id(optional):
string
Id of the purchase list item
-
productId(optional):
string
The product id
-
quantityDesired(optional):
integer
Quantity desired for the item
-
repositoryId(optional):
boolean
repository id of purchase list item
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|
|------------------|------------------|
|64101|Error while creating a purchase List|
|64100|Invalid profile or user logged out
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