Updated on 2023-09-27 GMT+08:00

Specific FAQ Group Test Interface

Interface Method

The request method must be set to POST.

URL

https://IP:PORT/oifde/rest/api/faq/testOneGroup

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

tenantId

String

body

Yes

Tenant ID.

faqGroupId

Integer

body

Yes

FAQ group ID.

user

String

body

Yes

Test subscriber ID.

sentence

String

body

Yes

Request statement.

authToken

String

body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Response

Parameter

Type

Position

Mandatory

Description

answer

FaqAnswer

body

Yes

Answer.

similarFaqs

FaqAnswer[]

body

Yes

Answer group.

Table 2 FaqAnswer

Parameter

Type

Position

Mandatory

Description

faqGroupId

Integer

body

Yes

FAQ group ID.

faqGroupName

String

body

Yes

FAQ group name.

faqId

Integer

body

Yes

Q&A ID.

question

String

body

Yes

Question.

answers

String[]

body

Yes

Answer.

prob

float

body

Yes

Matching degree. A larger value indicates a higher matching degree.

The value must be 0 or greater.

Example

  • Request
    {
        "tenantId": "00030010",
        "faqGroupId":10000,
        "user":"138****8888",
        "sentence":"What is guardian life insurance?",
        "authToken": "5**************************"
    }
  • Response
    {
       "answer":    {
          "faqGroupId": 10000,
          "faqGroupName": "Insurance consultation",
          "faqId": 10039,
          "question": "What is life insurance?",
          "answers": ["Life insurance is a type of personal insurance that takes the life span of the insured as the object of insurance and takes the survival and death of the insured as the prestation conditions. In the life insurance, the insured transfers risks to the insurer by accepting the terms raised by the insurer and paying the insurance premium. The difference between the life insurance and other insurance businesses lies in the risk that is transferred. In the life insurance, the risk of survival or death of the insured is transferred."],
          "prob": 121.11094785672965
       }
    }