https://api.movidesk.com/public/v1
Satisfaction Survey Responses
URL: /survey/responses Methods: GET
Layout
response
Property | Type | Size | Required | Description |
---|---|---|---|---|
id | string | Identifier of the satisfaction survey response (Read-only). | ||
questionId | string | Identifier of the satisfaction survey question. (Read-only). | ||
clientId | string | Id (Ref. code) of the company, department, or person listed as the client of the response. | ||
type | int | Survey type: Satisfied or Dissatisfied = 1, Smiley Faces = 2, NPS (Net Promoter Score) = 3, Yes or No = 4. | ||
ticketId | int | Ticket number | ||
responseDate | date UTC* | Date of the satisfaction survey response. | ||
commentary | string | MAX | Response comments. | |
value | int | Response score based on the type. Satisfied or dissatisfied (1 = Satisfied, 2 = Dissatisfied), Smiley Faces (1 = Very dissatisfied, 2 = Dissatisfied, 3 = Neutral, 4 = Satisfied, 5 = Very satisfied), NPS (0 to 10), Yes or No (1 = Yes, 2 = No). |
*UTC: Coordinated Universal Time (from English Universal Time Coordinated) is the reference time zone from which all other time zones in the world are calculated. E.g., if your time zone is Brasília (UTC-03:00) and the current time is 15:30, the UTC time will be 18:30.
Working with Data
To access the data, you need to first generate an API key.
To generate an API key (token), access Movidesk, go to Settings / Account / Parameters, and in the environment tab click the "Generate new key" button if you don't already have one created.
You can repeat this operation whenever you want to generate a new access key, but remember that when generating a new key, all programs using the old key will stop working. All data flow (Viewing/Inserting/Updating) must be in JSON format as shown in the example below:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "Very good",
"value": 2
}
]
}
Obtaining Data
GET Method
Getting Satisfaction Survey Responses with Pagination:
GET: /survey/responses
Parameters: token
Optional Parameter: limit, startingAfter
Parameters:
limit |
A limit on the number of objects to return, between 1 and 100. (default: 100) |
startingAfter |
A cursor for use in pagination. startingAfter is an object ID that defines its position in the list. For example, if you make a request and receive 100 objects, ending with Xm5T, in your subsequent call you could include the parameter startingAfter=Xm5T to fetch the next page. (optional) |
Response:
hasMore |
Whether or not there are more elements available after this set. If false , it is understood as the end of the list. |
items |
An array containing the activities of the current page. |
Example:
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5&limit=2
Response:
{
"hasMore": true,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "Very good",
"value": 2
}
]
}
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5&limit=2&startingAfter=2PLQ
Response:
{
"hasMore": true,
"items": [
{
"id": "Pwlq",
"questionId": "VzzG",
"type": 3,
"clientId": "245136",
"ticketId": 8695,
"responseDate": "2019-10-10T21:03:44.4786374",
"commentary": "Excellent!",
"value": 10
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 2,
"clientId": "631583",
"ticketId": 6490,
"responseDate": "2019-10-10T21:02:51.3224777",
"commentary": null,
"value": 2
}
]
}
Getting Satisfaction Survey Responses:
GET: /survey/responses
Parameters: token
Available Parameters: type, clientId, ticketId, responseDateGreaterThan, responseDateLessThan, limit, startingAfter
Example:
Getting satisfaction survey responses.
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5
Response:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "Very good",
"value": 2
}
]
}
Getting responses by client:
GET: /survey/responses
Parameters: token, clientId
Example:
Getting satisfaction survey responses by client.
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec&clientId=14498
Response:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "14498",
"ticketId": 129,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "14498",
"ticketId": 125,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "Very good",
"value": 2
}
]
}
Getting responses by type:
GET: /survey/responses
Parameters: token, type
Example:
Getting satisfaction survey responses by type.
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5&type=3
Response:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 3,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 10
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 3,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "I liked the service",
"value": 7
}
]
}
Getting responses by date greater than or equal to:
GET: /survey/responses
Parameters: token, responseDateGreaterThan
Example:
Getting satisfaction survey responses by date.
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5&responseDateGreaterThan=2019-05-13
Response:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-10-30T13:35:38.0174433",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-10-30T13:36:11.5603728",
"commentary": "Very good",
"value": 2
}
]
}
Getting responses by date less than or equal to:
GET: /survey/responses
Parameters: token, responseDateLessThan
Example:
Getting satisfaction survey responses by date.
GET: https://api.movidesk.com/public/v1/survey/responses?token=3bd53482-72b0-4057-9545-3975a3423ec5&responseDateLessThan=2019-06-13
Response:
{
"hasMore": false,
"items": [
{
"id": "l6Bz",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-08-06T18:57:39.6348229",
"commentary": null,
"value": 1
},
{
"id": "2PLQ",
"questionId": "pBzd",
"type": 1,
"clientId": "456123",
"ticketId": 6489,
"responseDate": "2019-07-16T19:17:24.4060556",
"commentary": "Very good",
"value": 2
}
]
}
Getting responses by ticket number or protocol:
GET: /survey/responses
Parameters: token, ticketId
Example:
Getting satisfaction survey responses by ticket number or protocol.
Response:
{
"hasMore": false,
"items": [
{
"id": "2PLQ",
"questionId": "pZN7",
"type": 1,
"clientId": "123456",
"ticketId": 8694,
"responseDate": "2019-08-06T18:57:39.6348229",
"commentary": null,
"value": 1
},
{
"id": "l6Bz",
"questionId": "pBzd",
"type": 1,
"clientId": "42145",
"ticketId": 8694,
"responseDate": "2019-07-16T19:17:24.4060556",
"commentary": "Very good",
"value": 2
}
]
}