curl -X GET \
'https://api.woowup.com/apiv3/benefits?outofstockbenefits=1000&comingbenefits=1000¤tbenefits=1000' \
-H 'accept: application/json' \
-H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-H 'cache-control: no-cache'
{
"payload": {
"current": [
{
"id": 123,
"slug": "benefit-1-title",
"title": "Benefit 1 title",
"description": "Benefit 1 description",
"status": "1",
"image_id": "1234",
"user_id": "1234",
"app_id": "123",
"app_code": "CONTEST",
"contenttype_id": "10",
"version": null,
"category_id": null,
"startdate": "2017-03-24 00:00:00",
"enddate": "2017-12-31 09:30:26",
"featured": "0",
"wallpublish": "0",
"monthly_redeems": "3",
"modified": "2017-03-21 19:37:25",
"created": "2017-02-22 18:49:17",
"image_url": "https://api.woowup.com/uploads/1234567/qwerty-adfg-zcv-iuytr-vbnmjhgfd.png",
"points": 0,
"event_date": "2017-06-02 18:00:00",
"sku": "s000123"
}
],
"outofstock": [
{
"id": 124,
"slug": "benefit-2-title",
"title": "Benefit 2 title",
"description": "Benefit 2 description",
"status": "1",
"image_id": "1234",
"user_id": "1234",
"app_id": "123",
"app_code": "CONTEST",
"contenttype_id": "10",
"version": null,
"category_id": null,
"startdate": "2017-03-24 00:00:00",
"enddate": "2017-12-31 09:30:26",
"featured": "0",
"wallpublish": "0",
"monthly_redeems": "3",
"modified": "2017-03-21 19:37:25",
"created": "2017-02-22 18:49:17",
"image_url": "https://api.woowup.com/uploads/1234567/qwerty-adfg-zcv-iuytr-vbnmjhgfd.png",
"points": 0,
"event_date": "2017-06-02 18:00:00",
"sku": "s000124"
}
],
"comingbenefits": [
{
"id": 125,
"slug": "benefit-3-title",
"title": "Beneift 3 title",
"description": "Benefit 3 description",
"status": "1",
"image_id": "1234",
"user_id": "1234",
"app_id": "123",
"app_code": "CONTEST",
"contenttype_id": "10",
"version": null,
"category_id": null,
"startdate": "2017-03-24 00:00:00",
"enddate": "2017-12-31 09:30:26",
"featured": "0",
"wallpublish": "0",
"monthly_redeems": "3",
"modified": "2017-03-21 19:37:25",
"created": "2017-02-22 18:49:17",
"image_url": "https://api.woowup.com/uploads/1234567/qwerty-adfg-zcv-iuytr-vbnmjhgfd.png",
"points": 0,
"event_date": "2017-06-02 18:00:00",
"sku": "s000125"
}
]
},
"message": "",
"code": "ok",
"time": "36ms"
}
Retrieve a list of ALL benefits.
curl -X GET \
'https://api.woowup.com/apiv3/benefits?page=0&limit=100' \
-H 'accept: application/json' \
-H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-H 'cache-control: no-cache'
{
"payload": [{
"id": "1",
"slug": "beneficio-1",
"title": "Beneficio 1",
"description": "Descripción del beneficio 1",
"status": "1",
"image_id": "2",
"user_id": "3",
"app_id": "4",
"app_code": "CONTEST",
"contenttype_id": "10",
"version": null,
"category_id": null,
"startdate": "2018-03-25 21:11:00",
"enddate": "2018-12-31 09:30:26",
"featured": "0",
"wallpublish": "0",
"monthly_redeems": "1",
"modified": "2018-03-20 17:12:04",
"created": "2018-03-20 17:12:04",
"image_url": "https://admin.woowup.com/uploads/123/123-asd-asd-asd-asd.png",
"points": 0,
"event_date": "2018-03-27 12:00:00",
"out_stock_at": null,
"sku": "s000001"
}, {
"id": "2",
"slug": "beneficio-2",
"title": "Título del beneficio 2",
"description": "Descripción del beneficio 2",
"status": "1",
"image_id": "2",
"user_id": "3",
"app_id": "4",
"app_code": "CONTEST",
"contenttype_id": "10",
"version": null,
"category_id": null,
"startdate": "2018-03-22 20:28:00",
"enddate": "2018-12-31 09:30:26",
"featured": "1",
"wallpublish": "0",
"monthly_redeems": "1",
"modified": "2018-03-20 17:25:43",
"created": "2018-03-19 11:32:28",
"image_url": "https://admin.woowup.com/uploads/123/asd-qwe-qwe-asd-xcv.jpg",
"points": 0,
"event_date": "2018-03-25 22:00:00",
"out_stock_at": null,
"sku": "s000002"
}],
"message": "",
"code": "ok",
"time": "36ms"
}
POST /benefits/{benefit_id}/assign
curl -X POST \
'https://api.woowup.com/apiv3/benefits/123/assign' \
-H 'Accept: application/json' \
-H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-H 'Cache-Control: no-cache'
-H 'Content-Type: application/x-www-form-urlencoded'
-d 'userapp_id=456'
{
"payload": {
"status": true
},
"message": "ok",
"code": "ok",
"time": "123ms"
}