Dispute API documentation
BpEngineApi Service
The BpEngineApi service provides methods for working with case samples: initiation, execution, obtaining execution options.
To execute the BpEngineApi service methods, transfer the access token parameter (X-Authorization).
GetComments Method
To get a list of case sample comments in a chat, call the GetComments method.
Method address:
/webapi/v1/BpEngineApi/GetComments/{id}
Request type: post
Key | Data type | Description |
---|---|---|
id* | integer | Case ID |
X-Authorization* | string |
Key | Data type | Description |
---|---|---|
items | array of ApiCommentItem | List of received comments |
success | boolean | Action result |
errorMessage | string | Error text |
An example of HTTP request
JSON
JSON
POST https://<Имя сервера Диспут+>/webapi/v1/BpEngineApi/GetComments/<bpItemId>/?getCommentType=true&getFilesInBody=true&getCommentAuthorRole=true HTTP/1.1
Host: <Имя сервера Диспут+>
Connection: Keep-Alive
Accept: application/json
Content-Type: application/json;charset=UTF-8
Content-Length: 0
Accept-Encoding: gzip,deflate
X-Authorization: Bearer <значение маркера доступа>
An example of HTTP response
JSON
JSON
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 664
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 23 Jun 2020 13:53:19 GMT
{
"items": [
{
"comment": "Приватный комментарий_1",
"createdDate": "2020-06-22T21:55:13",
"userName": "aa_FIO",
"documentsInfo": [],
"commentType": "Private",
"authorRole": "Acquirer"
},
{
"comment": "Приватный комментарий_2",
"createdDate": "2020-06-22T21:56:40",
"userName": "appletest_withcontrol",
"documentsInfo": [],
"commentType": "Private",
"authorRole": "Merchant"
},
{
"comment": "Комментарий публичный",
"createdDate": "2020-06-23T16:53:15",
"userName": "aa_FIO",
"documentsInfo": [ {
"content": "<Содержимое документа в формате base64>",
"id": "8858",
"name": "<Название документа>"
}],
"commentType": "Public",
"authorRole": "Acquirer"
}
],
"success": true
}
Data types
ApiCommentItem
Code | Data types | Description |
---|---|---|
comment | string | Comments |
createdDate | string | Creation date |
userName | string | User's name, who posted comment |
documentsInfo | array of Document | Attachments |
Document
Code | Data types | Description |
---|---|---|
id | string | System field |
creationDate | string | Attachment date |
creator | string | |
name | string | File name |
content | string | Content in base64 |
Enumerations
commentType
Value |
---|
Public |
Private |
authorRole
Value |
---|
Unknown |
Issuer |
Acquirer |
Nspk |
Merchant |