createPurchaseList
post
/ccstore/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
Body Parameter
Root Schema : createPurchaseList_request
{
"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"
}
]
}
- accountId
-
Type:
string
The id of the Organization. - description
-
Type:
string
Description for the purchase list. - items
-
Type:
array
itemsAdditional Properties Allowed:list of purchase list items - name
-
Type:
string
Required:true
The name of the purchase list. - siteId
-
Type:
string
The Id of the site.
Nested Schema : items
Nested Schema : items
Type:
object
- catRefId
-
Type:
string
Required:true
catalog ref id - productId
-
Type:
string
Required:true
The product id - quantityDesired
-
Type:
integer
Required:true
Quantity desired for the item
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createPurchaseList_response
- accountId
-
Type:
string
The id of the Organization. - creationDate
-
Type:
string
The date when purchase list is created. - description
-
Type:
string
Description for the purchase list. - id
-
Type:
string
The Id of the purchase list. - items
-
Type:
array
itemsAdditional Properties Allowed:list of purchase list items - lastModifiedDate
-
Type:
string
The last modified date for the purchase list. - name
-
Type:
string
The name of the purchase list. - owner
-
Type:
object
ownerAdditional Properties Allowed:The user who created this purchase list. - repositoryId
-
Type:
string
Repository Id of the purchase list. - siteId
-
Type:
string
The Id of the site.
Nested Schema : items
Nested Schema : owner
Type:
object
The user who created this purchase list.
- firstName
-
Type:
string
The first name of the user - lastName
-
Type:
string
The last name of the user - repositoryId
-
Type:
string
respository Id of the user
Nested Schema : items
Type:
object
- catRefId
-
Type:
string
catalog ref id - id
-
Type:
string
Id of the purchase list item - productId
-
Type:
string
The product id - quantityDesired
-
Type:
integer
Quantity desired for the item - repositoryId
-
Type:
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
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{ "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" } ] }