The Collection Details API is used to fetch all the details pertaining to a specific collection.This API accepts the collection ID as input and retrieves the information.
http://api.shopper.com/v1/collections/{collection-id}
Sample output
{
"id": "5fda07d1c9684200139824ca",
"url": "https://www.shopper.com/c/My-Books/9uxf",
"order": 0,
"name": "My Books ",
"is_secret": true,
"description": "Favorite Book Collection",
"views": 125,
"create_date": "2021-11-15T04:45:57.259Z",
"tag_details":[
{
"tag":"trending",
"slug":"trending",
"count":"1",
"url": "https://www.shopper.com/s/trending?tag=trending"
},
{
"tag":"new",
"slug":"new",
"count":"1",
"url": "https://www.shopper.com/s/new?tag=new"
},
{
"tag":"books",
"slug":"books",
"count":"4",
"url": "https://www.shopper.com/s/trending?tag=trending"
}
],
"products": 3,
"cover_image": "https://cdn.shopper.com/shopper-v2/demo/assets/user_collection/a3283e5f-4f14-4971-9312-a0bbee656bff.png",
}
Response body
id: Unique collection ID
url: Collection URL
order: Display sequence/ sorting order of the collection
name: Name of the collection
is_secret: This flag represents the status (public/ private) of the collection
description: Description of the collection
views: No of views received for the collection
create_date: Date of creation of the collection in ISO 8601 format
tag_details: Array of details of the tags associated with the collection including tag name. slug and unique tag url
products: Number of products inside the collection
cover_image: The URL to the cover image of the collection.
Response status
Status | Reason |
---|---|
500 | Internal server error |
200 | Success |
400 | Invalid request parameters |
405 | API method is not allowed, contact admin to get access |
401 | Invalid authentication parameters |