The Favorites API is used to classify catalog items as favorites for the current user. This API provides developers the ability to fetch a list of all catalog items classified as a favorite, classify a list of catalog items as favorites, and to remove the favorite classification from a catalog item.
Returns a json array of catalog item ids that have been classified as favorites for the current user.
GET /api/v1/favorites.json
HTTP Status Code | Description | Payload |
200 | Successfully retrieved all catalog items with favorites classification |
{ "_encodingVersion": "string", "_encodingTime": 0, "context": { "totalAvailableResults": 0, "queryParameters": {}, "maxResults": 0, "startIdx": 0, "queryTimeMillis": 0, "rootPath": "string", "_class": "string" }, "results": [ { "name": "string", "defaultAttachmentName": "string", "id": "string", "_class": "string", "title": "string", "parentId": "string" } ] } |
HTTP Status Code | Description | Payload |
---|---|---|
401 | Unauthorized |
{ error: "string", error_description: "string" } |
404 | No results in Catalog |
{ "_encodingVersion": "string", "_encodingTime": 0, "errorMessage": "string" } |
500 | Unexpected Error |
{ "error": "string", "error_description": "string" } |
Takes a list of catalog items and classifies each as a favorite for the current user.
POST /api/v1/favorites.json
Title | Required | Type | Values | Description |
ids | true | Array[String] | Any set of valid catalog item ids | Array of ids to be classified as favorites |
{ "ids": [ "string", "string", ... ] }
HTTP Status Code | Description | Payload |
204 | Successfully classified catalog items as favorites. | There is no payload for this response. |
HTTP Code | Description | Payload |
---|---|---|
401 | Unauthorized |
{ "error": "string", "error_description": "string" } |
500 | Unexpected Error |
Takes a single catalog item and removes the favorites classification.
DELETE /api/v1/favorites/{ID}
Title | Required | Type | Values | Description |
Id | true | QueryString Parameter | Any valid catalog item id | Id of the catalog item to be classified as a favorite. |
HTTP Status Code | Description | Payload |
204 | Successfully removed favorites classification from catalog item. | There is no payload for this response. |
HTTP Status Code | Description | Payload |
---|---|---|
401 | Unauthorized |
{ "error": "string", "error_description": "string" } |
404 | No results in Catalog |
{ "_encodingVersion": "string", "_encodingTime": 0, "errorMessage": "string" } |
500 | Unexpected Error |
{ "error": "string", "error_description": "string" } |