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

FAQ Modification Interface

Interface Method

POST

URL

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

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

tenantId

String

Body

Yes

Tenant ID.

model

FaqElementModel

Body

Yes

FAQ group model.

authToken

String

Body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Table 2 FaqElementModel

Parameter

Type

Position

Mandatory

Description

id

Integer

Body

Yes

Q&A ID.

faqGroupId

Integer

Body

Yes

FAQ group ID.

question

String

Body

Yes

Question, which contains a maximum of 8192 characters.

simQuestions

SimStatementUnit[]

Body

No

Similar question. A maximum of 100 similar questions are allowed.

answer

String

Body

Yes

Answer, which contains a maximum of 8192 characters.

simAnswers

SimStatementUnit[]

Body

No

Similar answer. A maximum of 100 similar answers are allowed.

keywords

KeywordUnit[]

Body

No

Keyword. A maximum of 20 keywords are allowed. The value must not contain vertical bars (|).

Table 3 SimStatementUnit

Parameter

Type

Position

Mandatory

Description

id

Integer

Body

Yes

Internal sequence number.

elementId

Integer

Body

Yes

Q&A ID.

statement

String

Body

Yes

Question or answer content, which contains a maximum of 8192 characters.

type

String

Body

Yes

Q: question

A: answer

Table 4 KeywordUnit

Parameter

Type

Position

Mandatory

Description

w

String

Body

Yes

Keyword, which contains a maximum of 64 characters.

Response

Parameter

Type

Position

Mandatory

Description

faqGroupModel

FaqModel

Body

Yes

Q&A data.

faqModel

FaqElementModel

Body

Yes

Q&A object data.

errorCode

String

Body

Yes

Error code.

  • 0: success
  • Other values: failure

errorMsg

String

Body

No

Error description.

Example

  • Request
    {
        "tenantId":"00030010",
        "authToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "model": {
            "id": 22897,
            "faqGroupId": 10012,
            "question": "House purchase restriction in Nanjing",
            "simQuestions": [
                {
                    "statement": "House purchase restriction policies in Nanjing",
                    "type": "Q"
                }
            ],
            "answer": "Each household can purchase at most two houses.",
            "simAnswers": [
                {
                    "statement": "Each household can purchase at most two houses.",
                    "type": "A"
                }
            ],
            "keywords": [
                {
                    "w": "Purchase restriction"
                }
            ]
        }
    }
  • Response
    { 
         "errorCode" : "0",
         "errorMsg" : "" 
     }