Satisfaction Ratings
Resource Fields
Metadata
Version | 1.0 |
Last Updated | January 13, 2017 |
Actions
Retrieve all ratings
GET /api/v1/cases/:id/ratings.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | conversations |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
score | string | GOOD , BAD |
|
comment | string | true , false true returns result which contains commentsfalse returns result without comment |
Response
{
"status": 200,
"data": [
{
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
],
"resource": "rating",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve recent ratings
GET /api/v1/cases/ratings/recent.jsonInformation
Allowed for | Collaborators, Agents, Admins & Owners |
Scope | conversations |
It's mandatory to pass the source id, i.e. either user_id or organization_id or case_id. Only one id is accepted per request.
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
user_id | integer | ||
organization_id | integer | ||
case_id | integer | ||
limit | string | Number of recent ratings to fetch Default: 3 |
Response
{
"status": 200,
"data": [
{
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
],
"resource": "rating",
"total_count": 1
}
Retrieve a rating
GET /api/v1/cases/:id/ratings/:id.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | conversations |
Response
{
"status": 200,
"data": {
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
,
"resource": "rating"
}
Retrieve a rating by hash
GET /api/v1/cases/:id/ratings/:hash.jsonInformation
Allowed for | Public |
Scope | conversations |
Response
{
"status": 200,
"data": {
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
,
"resource": "rating"
}
Add a rating
POST /api/v1/cases/:id/ratings.jsonInformation
Allowed for | Public |
Scope | conversations |
Only creator of the conversation is allowed to rate their conversation.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
hash | string | The hash sent in rating email | |
score | string | ||
comment | string |
Response
{
"status": 201,
"data": {
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
,
"resource": "rating"
}
Update a rating
PUT /api/v1/cases/:id/ratings/:id.jsonInformation
Allowed for | Public |
Scope | conversations |
Only creator of the conversation is allowed to update rating of their conversation.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
hash | string | The hash sent in rating email | |
score | string | ||
comment | string |
Response
{
"status": 200,
"data": {
"id": 1,
"score": "GOOD",
"comment": null,
"case": {
"id": 1,
"resource_type": "case"
}
,
"creator":
{
"id": 2,
"resource_type": "user_minimal"
}
,
"assignee_agent":
{
"id": 1,
"resource_type": "user_minimal"
}
,
"assignee_team": {
"id": 1,
"legacy_id": null,
"resource_type": "team"
},
"created_at": "2015-07-28T06:15:24+05:00",
"updated_at": "2015-07-28T06:15:24+05:00",
"resource_type": "rating",
"resource_url": "https://brewfictus.kayako.com/api/v1/cases/ratings/1"
}
,
"resource": "rating"
}
Trigger rating
POST /api/v1/cases/:id/ratings/trigger.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | conversations |
This triggers an email to the requester of conversation asking them to rate.
Response
{
"status": 201
}