API
Getting a list of dialogs
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/chats?token={token} | |||||||||||||||||||||||||||
Method: | GET | |||||||||||||||||||||||||||
Request headers: | Accept: "application/json" | |||||||||||||||||||||||||||
Request parameters: |
|
|||||||||||||||||||||||||||
Response format: |
|
|||||||||||||||||||||||||||
Response parameters: |
|
Getting dialog status
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/chat-state?token={token}&id_i={id_i} | |||||||||
Method: | GET | |||||||||
Request headers: | Accept: "application/json" | |||||||||
Request parameters: |
|
|||||||||
Response format: |
|
|||||||||
Response parameters: |
|
Changing the status of a dialog
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/chat-state?token={token}&id_i={id_i}&chat_state={chat_state} | ||||||||||||
Method: | POST | ||||||||||||
Request headers: |
Accept: "application/json" Content-Type: "application/json" |
||||||||||||
Request format: | empty | ||||||||||||
Request parameters: |
|
||||||||||||
Response format: |
empty
* empty response with HTTP status code 200 means success. |
Getting a list of messages
The URL for sending a request: | https://api.digiseller.com/api/debates/v2?token={token}&id_i={id_i} | |||||||||||||||||||||||||||||||||||||||
Method: | GET | |||||||||||||||||||||||||||||||||||||||
Request headers: | Accept: "application/json" | |||||||||||||||||||||||||||||||||||||||
Request parameters: |
|
|||||||||||||||||||||||||||||||||||||||
Response format: |
|
|||||||||||||||||||||||||||||||||||||||
Response parameters: |
* all fields, except for ID and Message, may be missing in the response. * after receiving all messages of the dialog, you need to call the "Setting the read flag" method. |
Setting the read flag
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/seen?token={token}&id_i={id_i} | |||||||||
Method: | POST | |||||||||
Request headers: |
Accept: "application/json" Content-Type: "application/json" |
|||||||||
Request format: | empty | |||||||||
Request parameters: |
|
|||||||||
Response format: |
empty
* empty response with HTTP status code 200 means success. |
Preuploading files
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/upload-preview?token={token}&lang={lang} | |||||||||||||||||||||||||||
Request headers: |
Accept: "application/json" Content-Type: "multipart/form-data" |
|||||||||||||||||||||||||||
Method: | POST | |||||||||||||||||||||||||||
Request format: | ||||||||||||||||||||||||||||
Request parameters: |
|
|||||||||||||||||||||||||||
Response format: |
|
|||||||||||||||||||||||||||
Response parameters: |
* to send preloaded files, you must call the method to send a new message. |
Sending a new message
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/?token={token}&id_i={id_i} | ||||||||||||||||||||||||
Method: | POST | ||||||||||||||||||||||||
Request headers: |
Accept: "application/json" Content-Type: "application/json" |
||||||||||||||||||||||||
Request format: |
|
||||||||||||||||||||||||
Request parameters: |
|
||||||||||||||||||||||||
Response format: |
empty
* empty response with HTTP status code 200 means success. |
Deleting a message
The URL for sending a request: | https://api.digiseller.com/api/debates/v2/{id}?token={token}&id_i={id_i} | ||||||||||||
Method: | DELETE | ||||||||||||
Request headers: | Accept: "application/json" | ||||||||||||
Request parameters: |
|
||||||||||||
Response format: |
[] | ||||||||||||
Response parameters: | * an empty array in the response means success. |