Feedback API

Feedback are user likes, dislikes that can be later analysed to target convenient audience.

Note

If any of the mentioned endpoint is resulting in an error please refer to the Errors section.

Feedback Brief

This endpoint is used to collect feedback for briefs.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>

Method : POST

Example

curl --location 'https://platform-test.ranenetwork.com/public-api/v1/feedback/cyber-digest/8-1836210' \
    --header 'Content-type: application/json' \
    --header 'Authorization: Bearer <access_token>' \
    --data '{
        "like":true,
        "comment":"i do like it"
    }'

Request Formatter

  • like : boolean value (represents positive or negative feedback)

  • comment : user comment for specific content

Response

{
     "data": [{
        "email": "some.user@ranenetwork.com",
        "preference_slug": "feedback",
        "value": {
            "brief_slug": "cyber-digest",
            "brief_gid": "8-1836210",
            "url": "brief:8-1836210",
            "comment": "i do like it",
            "like": true
        },
        "created_on": 1698654095
    }]
}

Response Formatter

  • email : email of user who provided feedback

  • preference_slug : type of preference (will always be feedback)

  • value
    • brief_slug : brief whose feedback has been collected

    • brief_gid : specific brief document whose feedback has been collected

    • url : url that uniquely helps identify content

    • comment : users feedback

    • like : boolean value that signifies user likes/dislikes

Feedback Articles

This endpoint is used to collect feedback for articles.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>/<article-gid>

Method : POST

Example

curl --location 'https://platform-test.ranenetwork.com/public-api/v1/feedback/cyber-digest/8-1836210/8-1790848' \
    --header 'Content-type: application/json' \
    --header 'Authorization: Bearer <access_token>' \
    --data '{
        "like":true,
        "comment":"i do like it"
    }'

Response

{
     "data": [{
        "email": "some.user@ranenetwork.com",
        "preference_slug": "feedback",
        "value": {
            "brief_slug": "cyber-digest",
            "brief_gid": "8-1836210",
            "url": "brief:8-1836210/article:8-1790848",
            "comment": "i do like it",
            "like": true,
            "article_gid": "8-1790848"
        },
        "created_on": 1698654095
    }]
}

Response Formatter

  • email : email of user who provided feedback

  • preference_slug : type of preference (will always be feedback)

  • value
    • brief_slug : brief whose feedback has been collected

    • brief_gid : specific brief document whose feedback has been collected

    • article_gid : specific article on specific brief whose feedback has been collected

    • url : url that uniquely helps identify content

    • comment : users feedback

    • like : boolean value that signifies user likes/dislikes