listPurchaseLists
get
/ccagent/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(optional): string
This is the field to determine number of records to be fetched per REST call.
-
offset(optional): string
This field determines the offset/starting index from which data to be fetched.
-
purchaseListItemCount(optional): string
Whether to include purchase list item count in the response.
-
q(optional): string
Query string built as per the SCIM standards that helps to search entered string across purchase list properties like 'name'.
-
sort(optional): 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(optional):
array items
list of purchase lists
-
limit(optional):
string
Number of records to be fetched.
-
offset(optional):
string
The offset provided.
-
total(optional):
string
Total number of records present in database matching the searched string.
-
totalResults(optional):
string
Total number of records present in database matching the searched string.
Nested Schema : items
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.
-
dynamicProperty(optional):
object dynamicProperty
The value of the dynamic Property
-
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 : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : lastModifiedBy
Type:
object
The user who last modified this purchase list.
Show Source
-
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
-
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
-
dynamicProperty(optional):
object dynamicProperty
The value of the dynamic Property
-
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
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/ccagentui/v1/purchaseLists?purchaseListItemCount=true"
}
],
"sort":[
{
"property":"name",
"order":"asc"
}
],
"items":[
{
"owner":{
"lastName":"Anderson",
"firstName":"Kim",
"repositoryId":"se-570031",
"id":"se-570031"
},
"dynamicProperty":"dynamicProperty value",
"accountId":null,
"lastModifiedDate":"2017-09-27T09:48:22.000Z",
"repositoryId":"gl30074",
"name":"Purchase List 2",
"description":"Purchase List update",
"siteId":null,
"id":"gl30074",
"creationDate":"2017-09-27T09:48:22.000Z",
"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.
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