Creating Answers (createScriptAnswer)
Scenario
This interface is invoked to create answers for a survey.
Method
POST
URI
https://Domain name/apiaccess/v1/scriptAnswer/createScriptAnswer (For example, the domain name is service.besclouds.com.)
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
Authorization |
String |
Yes |
Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.) |
2 |
x-app-key |
String |
Yes |
App key, which is the user ID. Contact operations personnel to obtain the app key. |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
moduleId |
String |
Yes |
Module ID. Manual outbound call: 80031 Automatic outbound call: 80081 Intelligent training: 80083 |
2 |
result |
String |
Yes |
Operation performed on answers. save: Save (create) answers. submit: Submit answers. |
3 |
surveyId |
String |
Yes |
Survey ID. |
4 |
custId |
String |
No |
User ID. |
5 |
serviceId1 |
String |
No |
Task ID corresponding to the survey. |
Response Description
- Status code: 200
Table 3 Response body parameters No.
Parameter
Type
Mandatory or Not
Description
1
resultCode
String
Yes
Return code.
2
resultDesc
String
Yes
Description of the message returned by the interface.
3
surveyAnswerId
String
Yes
Answer ID.
- Status code: 400
Incorrect request. Check the request path and parameters.
- Status code: 401
Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.
- Status code: 403
Authentication fails.
- Status code: 404
The requested content is not found. Check the request path.
- Status code: 500
Business failure. Check the values of parameters in the request.
Error Codes
- None
Example
Request header:
{ "x-app-key": ******************** "Authorization": Bearer ************************ }
{ "moduleId": "80031", "result": "save", "surveyId": "987654321", "custId":"123456789", "serviceId1": "987654321" }
{ "resultCode": "1203000", "surveyAnswerId": "123456789", "resultDesc": "Opration Successful." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot