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 Response
Following model is returned when operation succeeds.
Body
Root Schema : listPurchaseLists_response
Nested Schema : items
Type: array
list of purchase lists
Nested Schema : items
Type: object
Nested Schema : items
Type: array
list of purchase list items
Nested Schema : owner
Type: object
The user who created this purchase list.
Nested Schema : items
Type: object
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 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.
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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
  }]
}