listPurchaseLists
get
/ccstore/v1/purchaseLists
List PurchaseLists. This operation is used to get the collection of purchase lists from Oracle Commerce Cloud. It can also be used to return the list on a searched string and in a sorted order against various properties of purchase list.
Request
Supported Media Types
- application/json
Query Parameters
-
limit: string
This is the field to determine number of records to be fetched per REST call.
-
listType: string
This field determines type of purchase lists to be fetched.Default Value:
owner
Allowed Values:[ "owner", "shared" ]
-
offset: string
This field determines the offset/starting index from which data to be fetched.
-
purchaseListItemCount: string
Whether to include purchase list item count in the response.
-
q: string
Query string built as per the SCIM standards that helps to search entered string across purchase list properties like 'name'.
-
shareType: string
This field determines sharing type of the shared purchase lists to be fetched.Default Value:
all
Allowed Values:[ "all", "account", "email" ]
-
sharedAccountId: string
This field determines the account for which the shared purchase lists need to fetched. If not passed the current account (OR) parent account is taken, in that sequence. If 'all' is passed then, purchase list shared in all the accounts are returned.Default Value:
{Current Account ID (OR) Parent Account ID}
Allowed Values:[ "all", "{Account ID}" ]
-
sort: string
This field determines the sort order of the list to be fetched.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : listPurchaseLists_response
Type:
Show Source
object
-
items:
array items
list of purchase lists
-
limit:
string
Number of records to be fetched.
-
offset:
string
The offset provided.
-
total:
string
Total number of records present in database matching the searched string.
-
totalResults:
string
Total number of records present in database matching the searched string.
Nested Schema : items
Type:
Show Source
object
-
accountId:
string
The id of the Organization.
-
creationDate:
string
The date when purchase list is created.
-
description:
string
Description for the purchase list.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
id:
string
The Id of the purchase list.
-
items:
array items
list of purchase list items
-
lastModifiedDate:
string
The last modified date for the purchase list.
-
name:
string
The name of the purchase list.
-
owner:
object owner
The user who created this purchase list.
-
repositoryId:
string
Repository Id of the purchase list.
-
siteId:
string
The Id of the site.
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : owner
Type:
object
The user who created this purchase list.
Show Source
-
firstName:
string
The first name of the user
-
lastName:
string
The last name of the user
-
repositoryId:
string
respository Id of the user
Nested Schema : items
Type:
Show Source
object
-
catRefId:
string
catalog ref id
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
id:
string
Id of the purchase list item
-
productId:
string
The product id
-
quantityDesired:
integer
Quantity desired for the item
-
repositoryId:
boolean
repository id of purchase list item
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Example Response (application/json)
{
"total":1,
"totalResults":1,
"offset":0,
"limit":1,
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccstoreui/v1/purchaseLists?purchaseListItemCount=true"
}
],
"sort":[
{
"property":"name",
"order":"asc"
}
],
"items":[
{
"owner":{
"lastName":"Anderson",
"firstName":"Kim",
"repositoryId":"se-570031",
"id":"se-570031",
"email":"kim@example.com"
},
"lastModifiedDate":"2017-09-27T09:48:22.000Z",
"lastModifiedBy":{
"lastName":"Anderson",
"firstName":"Kim",
"repositoryId":"se-570031",
"id":"se-570031",
"email":"kim@example.com"
},
"sharedWithOther":false,
"description":"Purchase List update",
"creationDate":"2017-09-27T09:48:22.000Z",
"dynamicProperty":"dynamicProperty value",
"accountId":null,
"repositoryId":"gl30074",
"name":"Purchase List 2",
"siteId":null,
"id":"gl30074",
"items":[
{
"dynamicProperty":"dynamicProperty value",
"productId":"Product_5Cx",
"quantityDesired":30,
"repositoryId":"gi10001",
"id":"gi10001",
"catRefId":"Sku_5Cxy"
}
],
"purchaseListItems":1
}
]
}
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|
|------------------|------------------|
|64103|Error while retrieving the list.|
|64100|Invlaid profile id.|
|64124|Invalid listType requested.|
|64135|Invalid shareType requested.|
|64123|(Shared) Account does not exists or you do not have access to it.
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code