Products from Collection
The Products from Collection API enables access to products within a designated collection. This API is designed with pagination, streamlining organized data retrieval. To access further pages, simply utilize the API with the corresponding page parameters.
Please note that this API returns only product details, not collection details.
http://api.shopper.com/v1/collections/{collection-id}/products?page={page}&limit={limit}&order_by={order_by}
Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Page number. Starting page number is 0 |
limit | integer | The maximum number of results to fetch. The default limit is 100 |
order_by | string | For sorting. Possible values: create_date, name. For inverse sort order, sign '-' before the value. Eg: order_by=-create_date. |
Sample output
{
"current": 1,
"end": 3,
"start": 1,
"limit": 100,
"total": 314,
"next_page": "{domain_url}/collections/{collection-id}/products?page={page}&limit={limit}",
"products": [
{
"id": "619c6290b3247700189a7a96",
"name": "My Fav Evening Dress",
"image": "https://cdn.shopper.com/shopper-v2/demo/assets/user_products/19bb4e71-71b3-4420-af94-ee4e55282e8e.png",
"featured": true,
"create_date": "2021-11-15T04:45:57.259Z",
"product_url": "https://asos.com/evening-dress.html",
"affiliate_url": "http://www.shopper.com/aff_redirect?store_id=60592e671794b46b2679a79e&type=product&source=web&ref_id=619c6290b3247700189a7a96&red_url=https%3A%2F%2asos.com",
"url": "https://www.shopper.com/p/cDTRX",
"offer": {
"id": "61779e6c615c5e001321969b",
"title": "50% OFF on all cloths",
"type": "offer",
"url": "https://www.shopper.com/coupon-codes/asos-com?deal=61779b15fd12e900127e9ada"
},
"store": {
"name": "Walmart.com",
"url": "http://www.shopper.com/aff_redirect?store_id=60592e671794b46b2679a79e&type=product&source=web&ref_id=619c6290b3247700189a7a96&red_url=https://www.walmart.com",
"image": "https://cdn.shopper.com/images/store-logos/walmart-com-1555593126547.png",
"id": "60592e671794b46b2679a79e"
},
"store_active": true,
},
]
}
Response body
id: Unique product ID
name: Name of the product added
image: Product image URL
featured: This response flag serves as an indicator for a featured product
create_date: Date of creation of the product in ISO 8601 format
product_url: URL of the original product page
url: The affiliate link for the store's homepage
collection: Details of the collection associated with the product
store: Details of the store associated with the product
store_active: This response flag allows you to check affiliate status of a store. The affiliate status denotes whether the store maintains an active affiliate connection. Stores may be removed from the affiliate network due to various reasons, including switching between networks or non-payment of dues. Utilizing the true and false flags enables you to discern whether the store is actively participating in an affiliate program.
affiliate_url: Affiliate URL of the products created
description: Product description
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 |