Sends the survey to the specified thread or to the last closed thread of this client.
You can only call the method if:
- Surveys via external API are enabled in the system settings
- The target client doesn’t have an active thread
- The specified quality survey is enabled for the first or last thread’s channel
Otherwise, it returns HTTP 409 Conflict
.
Permissions
---- Permissions:INTEGRATOR,OPERATOR,SUPERVISOR ----
Request Parameters
Parameter | Type | Description |
clientId | object | Polymorphic identifier of the thread to send a survey to |
clientId.type | string | Type of the client identifier. Allowed values are: internalClientId , externalClientId , threadId |
clientId.id | long, string | Depending on clientId.type :• internalClientId • externalClientId • threadId |
internalClientId | long | Internal identifier of a client in edna Chat Center |
externalClientId | string | External identifier of a client in the integrator system |
threadId | long | Internal identifier of a thread in edna Chat Center |
qualityFormId | long | Identifier of the quality survey to submit |
HTTP Request
POST /api/v1/quality/send HTTP/1.1 Content-Type: application/json Authorization: Bearer <integrator_token> Content-Length: 99 Host: localhost: 8080 { "clientId": { "type": "internalClientId", "id": 1 }, "qualityFormId": 1 }
Example of a Successful HTTP Response
HTTP/1.1 200 OK
Examples of Failed HTTP Responses
HTTP/1.1 409 Conflict Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Content-Type: application/json Content-Length: 141 { "method": "POST", "uri": "/api/v1/quality/send", "code": null, "message": "Sending surveys via external api is disabled" }
HTTP/1.1 409 Conflict Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Content-Type: application/json Content-Length: 119 { "method": "POST", "uri": "/api/v1/quality/send", "code": null, "message": "Client has open thread" }
HTTP/1.1 409 Conflict Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers Content-Type: application/json Content-Length: 127 { "method": "POST", "uri": "/api/v1/quality/send", "code": null, "message": "Cannot send form 1 to thread 1" }