User Notification Edit the file on GitHub
Note
To access any of the User Notification endpoints, an
access_token
containing thenotifications
permission is required.
Notifications are events (price changes of favorite products, subscribed discussion messages, etc).
Table of Contents
- Available Notification Types
- List notifications
- Retrieve a single notification
- Mark notifications as viewed
Available Notification Types
Type | Description |
---|---|
price_drop |
The price of an SKU favorited by the User has been reduced |
availability_true |
An SKU favorited by the User is again available at a Shop |
sku_release |
A "future" SKU has been released |
sku_review |
Review(s) have been published for an SKU favorited by the User |
sku_review_rephrase_request |
Rephrase request for a SKU review |
sku_review_approve_after_update |
A SKU review has been approved after rephrasing |
List notifications
GET /notifications
GET https://api.skroutz.gr/notifications
View Response Params{
"per": 1
}
Show Headers
Status: 200
{
"notifications": [
{
"id": 314233664,
"etype": "price_drop",
"eventable_id": 4672057,
"eventable_type": "Sku",
"eventable_name": "Omron M6 HEM-7321",
"eventable_url": "https://api.skroutz.gr/s/4672057/Omron-M6-HEM-7321.html?from=account_notifications",
"event_text": null,
"snapshot": {
"price_min": 56.19,
"latest_price": 56.89,
"change_rate": 0.012,
"from_threshold": false
},
"is_viewed": true,
"aggregated": false,
"created_at": "2016-10-05T16:16:29+03:00",
"updated_at": "2016-10-05T16:46:32+03:00",
"sku": {
"id": 4672057,
"category_id": 1339,
"display_name": "Omron M6 HEM-7321",
"images": {
"main": "https://d.scdn.gr/images/sku_main_images/004672/4672057/medium_14967045-orig.jpg",
"alternatives": [
]
},
"click_url": null,
"virtual": false,
"future": false,
"first_product_shop_info": null
},
"category_name": "Πιεσόμετρα"
}
],
"meta": {
"pagination": {
"total_results": 100,
"total_pages": 100,
"page": 1,
"per": 1
}
}
}
Retrieve a single notification
GET /notifications/:id
GET https://api.skroutz.gr/notifications/314233664
View Response
Show Headers
Status: 200
{
"notification": {
"id": 314233664,
"etype": "price_drop",
"eventable_id": 4672057,
"eventable_type": "Sku",
"eventable_name": "Omron M6 HEM-7321",
"eventable_url": "https://api.skroutz.gr/s/4672057/Omron-M6-HEM-7321.html?from=account_notifications",
"event_text": null,
"snapshot": {
"price_min": 56.19,
"latest_price": 56.89,
"change_rate": 0.012,
"from_threshold": false
},
"is_viewed": true,
"aggregated": false,
"created_at": "2016-10-05T16:16:29+03:00",
"updated_at": "2016-10-05T16:46:32+03:00",
"sku": {
"id": 4672057,
"category_id": 1339,
"display_name": "Omron M6 HEM-7321",
"images": {
"main": "https://d.scdn.gr/images/sku_main_images/004672/4672057/medium_14967045-orig.jpg",
"alternatives": [
]
},
"click_url": null,
"virtual": false,
"future": false,
"first_product_shop_info": null
},
"category_name": "Πιεσόμετρα"
}
}
Mark notifications as viewed
POST /notifications/view{?ids[]}
Name | Type | Description |
---|---|---|
ids |
Array | The notification ids to mark as viewed |
POST https://api.skroutz.gr/notifications/view
View Response Params{
"ids": [
314083116,
80449671,
80372282,
80140458,
79742874
]
}