Help Center/ Cognitive Engagement Center/ API Reference/ Survey Interface Reference/ Updating Answers to Questions (updateQuestionAnswer)
Updated on 2023-09-27 GMT+08:00

Updating Answers to Questions (updateQuestionAnswer)

Scenario

This Interface is invoked to update answers to questions.

Method

POST

URI

https://Domain name/apiaccess/v1/scriptAnswer/updateQuestionAnswer, for example, service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

2

Authorization

String

Yes

Authentication field. The format is Bearer +AccessToken returned by the tokenByAKSK interface. (A space is required next to Bearer.)

3

x-app-key

String

Yes

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

questionAnswerId

String

Yes

ID of an answer to a question.

2

answerText

String

No

Answer content.

3

voiceScore

DECIMAL (11,2)

No

Voice score.

4

operScore

DECIMAL (11,2)

No

Operation score.

5

costTime

Integer

No

Answer duration to questions, in seconds.

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.

  • 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 ************************
}
Request parameters:
{
    "questionAnswerId": "123456789",
    "answerText": "Hello",
    "voiceScore": 50.00,
    "operScore": 20.52,
    "costTime": 12
}
Response parameters:
{
    "resultCode": "1203000",
    "resultDesc": "Opration Successful."
}