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
-
Type:
string
This is the field to determine number of records to be fetched per REST call.- offset
Type:string
This field determines the offset/starting index from which data to be fetched.- purchaseListItemCount
Type:string
Whether to include purchase list item count in the response.- q
Type:string
Query string built as per the SCIM standards that helps to search entered string across purchase list properties like 'name'.- sort
Type:string
This field determines the sort order of the list to be fetched.Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : listPurchaseLists_response- items
-
Type:
array
itemsAdditional Properties Allowed:list of purchase lists - limit
-
Type:
string
Number of records to be fetched. - offset
-
Type:
string
The offset provided. - total
-
Type:
string
Total number of records present in database matching the searched string. - totalResults
-
Type:
string
Total number of records present in database matching the searched string.
Nested Schema : itemsNested Schema : itemsType:object
- 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 : itemsNested Schema : ownerType: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 : itemsType: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
Example 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" }, "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":[ { "productId":"Product_5Cx", "quantityDesired":30, "repositoryId":"gi10001", "id":"gi10001", "catRefId":"Sku_5Cxy" } ], "purchaseListItems":1 } ] }
Default ResponseThe 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.BodyRoot Schema : errorModelType: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 : errorsNested Schema : itemsType: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 Response Payload returned by endpoint:
{ "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" }, "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": [{ "productId": "Product_5Cx", "quantityDesired": 30, "repositoryId": "gi10001", "id": "gi10001", "catRefId": "Sku_5Cxy" }], "purchaseListItems": 1 }] }