1. Overview
RetailCRM Message Gateway Bot API
1.1. Version information
Version : 1.0.0
1.2. URI scheme
Host : api.example.com
BasePath : /api/bot/v1
Schemes : HTTPS
1.3. Consumes
-
application/json
1.4. Produces
-
application/json
2. Paths
2.1. Getting a list of bots
GET /bots
2.1.1. Description
Returns the list of bots according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.1.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
active |
Activity checkbox (0|1) |
integer |
Query |
id |
Bot ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.1.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Bot > array |
400 |
Request error |
|
500 |
Server error |
2.2. Getting a list of channels
GET /channels
2.2.1. Description
Returns the list of channels according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.2.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
active |
Activity checkbox (0|1) |
integer |
Query |
id |
Channel ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
types |
Available events |
< string > array |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.2.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Channel > array |
400 |
Request error |
|
500 |
Server error |
2.3. Getting a list of chats
GET /chats
2.3.1. Description
Returns the list of chats according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.3.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
channel_id |
Channel ID |
integer (uint64) |
Query |
channel_type |
Channel type |
string |
Query |
id |
Chat ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.3.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Chat > array |
400 |
Request error |
|
500 |
Server error |
2.4. Getting a list of customers
GET /customers
2.4.1. Description
Returns the list of customers according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.4.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
external_id (id in messenger) |
External ID of the customer |
string |
Query |
id |
Customer ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.4.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Customer > array |
400 |
Request error |
|
500 |
Server error |
2.5. Getting a list of dialogs
GET /dialogs
2.5.1. Description
Returns the list of dialogs according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.5.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
active |
Activity checkbox (0|1) |
integer |
Query |
assign |
Manager assignment mark (0|1) |
integer |
Query |
bot_id |
Bot ID |
integer (uint64) |
Query |
chat_id |
Chat ID |
integer (uint64) |
Query |
id |
Dialog ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
Query |
user_id |
Manager ID |
integer (uint64) |
2.5.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Dialog > array |
400 |
Request error |
|
500 |
Server error |
2.6. Assigning a dialog to a manager or a bot
PATCH /dialogs/{dialog_id}/assign
2.6.1. Description
It is required to specify in the body of the request either the manager`s data to whom the dialog should be assigned or the bot data
2.6.2. Parameters
Type | Name | Schema |
---|---|---|
Path |
dialog_id |
integer (uint64) |
Body |
dialog |
2.6.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The dialog is assigned |
|
400 |
Request error |
|
500 |
Server error |
2.7. Closing the dialog
DELETE /dialogs/{dialog_id}/close
2.7.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
dialog_id |
integer (uint64) |
2.7.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The dialog is closed |
No Content |
400 |
Request error |
|
500 |
Server error |
2.8. Unassigning a dialog from a manager or a bot
PATCH /dialogs/{dialog_id}/unassign
2.8.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
dialog_id |
integer (uint64) |
2.8.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The dialog is unassigned |
|
400 |
Request error |
|
500 |
Server error |
2.9. Uploading the file
POST /files/upload
2.9.1. Parameters
Type | Name | Schema |
---|---|---|
FormData |
file |
file |
2.9.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The file is uploaded |
|
400 |
Request error |
|
500 |
Server error |
2.10. Uploading the file from URL
POST /files/upload_by_url
2.10.1. Parameters
Type | Name | Schema |
---|---|---|
Body |
URL |
2.10.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The file is uploaded |
|
400 |
Request error |
|
500 |
Server error |
2.11. Getting a file
GET /files/{file_id}
2.11.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
file_id |
string |
2.11.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
File |
|
400 |
Request error |
|
500 |
Server error |
2.12. Getting a list of chat members
GET /members
2.12.1. Description
Returns the list of chat members according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.12.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
chat_id |
Chat ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
manager_id |
User ID |
integer (uint64) |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
state |
Member status (active|kicked|leaved) |
integer |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.12.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Member > array |
400 |
Request error |
|
500 |
Server error |
2.13. Sending a message
POST /messages
2.13.1. Parameters
Type | Name | Schema |
---|---|---|
Body |
message |
2.13.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The message is sent |
|
400 |
Request error |
|
500 |
Server error |
2.14. Getting a list of messages
GET /messages
2.14.1. Description
Returns the list of messages according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.14.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
bot_id |
Bot ID |
integer (uint64) |
Query |
channel_id |
Channel ID |
integer (uint64) |
Query |
chat_id |
Chat ID |
integer (uint64) |
Query |
customer_id |
Customer ID |
integer (uint64) |
Query |
dialog_id |
Dialog ID |
integer (uint64) |
Query |
id |
Message ID |
< integer > array |
Query |
manager_id |
Manager ID |
integer (uint64) |
Query |
scope |
Scope (public|private) |
string |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
type |
Message type |
string |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.14.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Message > array |
400 |
Request error |
|
500 |
Server error |
2.15. Deleting the message
DELETE /messages/{message_id}
2.15.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
message_id |
integer (uint64) |
2.15.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The message is deleted |
No Content |
400 |
Request error |
|
500 |
Server error |
2.16. Editing the message
PATCH /messages/{message_id}
2.16.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
message_id |
integer (uint64) |
Body |
message |
2.16.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The message is edited |
No Content |
400 |
Request error |
|
500 |
Server error |
2.17. Getting a list of bot commands
GET /my/commands
2.17.1. Description
Returns the list of bot commands according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.17.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
id |
Command ID |
integer (uint64) |
Query |
name |
Command name |
string |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.17.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< Command > array |
400 |
Request error |
|
500 |
Server error |
2.18. Creating/editing a command
PUT /my/commands/{name}
2.18.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
name |
string |
Body |
command |
2.18.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The command is edited |
No Content |
400 |
Request error |
|
500 |
Server error |
2.19. Deleting the command
DELETE /my/commands/{name}
2.19.1. Parameters
Type | Name | Schema |
---|---|---|
Path |
name |
string |
2.19.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The command is deleted |
No Content |
400 |
Request error |
|
500 |
Server error |
2.20. Updating information about a bot
PATCH /my/info
2.20.1. Parameters
Type | Name | Schema |
---|---|---|
Body |
info |
2.20.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The data of the bot is updated |
No Content |
400 |
Request error |
|
500 |
Server error |
2.21. Getting a list of managers
GET /users
2.21.1. Description
Returns the list of managers according to the passed parameters, number of entries is 1000, if parameters "since" and "until" or only parameter "until" are passed, the list is sorted in reverse order
2.21.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
active |
Activity checkbox (0|1) |
integer |
Query |
external_id (id in messenger) |
External ID of the manager |
string |
Query |
id |
Manager ID |
integer (uint64) |
Query |
limit |
Maximum number of records in the response |
integer (uint64) |
Query |
online |
Online indicator (0|1) |
integer |
Query |
since |
Is changed from date / time (with microseconds) |
string (date-time) |
Query |
until |
Is changed up until date/time (with microseconds) |
string (date-time) |
2.21.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
List is received |
< User > array |
400 |
Request error |
|
500 |
Server error |
2.22. Opening a websocket connection
GET /ws
2.22.1. Description
This URL is used for opening the websocket connection, by means of this connection a bot will be able to receive the data by each type of events to which it is subscribed, the list of events is passed as a string, values are separated by commas (wss://api.example.com/api/bot/v1/ws?events=message_new,message_updated)
2.22.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
events |
Types of events to which the bot can be subscribed |
enum (message_new, message_updated, message_deleted, dialog_opened, dialog_closed, dialog_assign, chat_created, chat_updated, user_joined_chat, user_left_chat, user_updated) |
2.22.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
The connection is open |
3. Definitions
3.1. AssignRequest
One of two parameters is specified
Name | Description | Schema |
---|---|---|
bot_id |
Bot ID |
integer (uint64) |
dialog_id |
Dialog ID |
integer (uint64) |
user_id |
Manager ID |
integer (uint64) |
3.2. AssignResponse
Name | Description | Schema |
---|---|---|
is_reassign |
Successful reassignment mark |
boolean |
left_manager_id |
ID of previous manager |
integer (uint64) |
previous_responsible |
Previous responsible person |
|
responsible |
New responsible person |
3.3. Attachment
File attachment
Name | Description | Schema |
---|---|---|
caption |
Displayed name |
string |
height |
Image height, not present if file is not an image |
integer (uint64) |
id |
ID of file |
integer (uint64) |
preview_url |
Preview url, not present if file is not an image |
string |
size |
File size in bytes |
integer (uint64) |
type |
MIME type |
string |
width |
Image width, not present if file is not an image |
integer (uint64) |
3.4. Bot
Name | Description | Schema |
---|---|---|
avatar_url |
Avatar URL |
string |
client_id |
Connection ID |
string |
created_at |
Date/time of creation |
string (date-time) |
deactivated_at |
Date/time of deactivation |
string (date-time) |
id |
Bot ID |
integer (uint64) |
is_active |
Activity checkbox |
string |
is_self |
Field description |
string |
name |
Bot name |
string |
roles |
Roles |
< object > array |
updated_at |
Date/time of last change |
string (date-time) |
3.5. Channel
Name | Description | Schema |
---|---|---|
activated_at |
Date/time of activation |
string (date-time) |
created_at |
Date/time of creation |
string (date-time) |
deactivated_at |
Date/time of deactivation |
string (date-time) |
id |
Channel ID |
integer (int64) |
is_active |
Activity checkbox |
boolean |
name |
Channel name |
string |
settings |
Channel settings |
|
type |
Channel type |
enum (telegram, fbmessenger, viber, whatsapp, skype, vk, instagram, consultant, yandex_chat, custom) |
updated_at |
Date/time of last change |
string (date-time) |
3.6. ChannelSettings
Name | Description | Schema |
---|---|---|
audio |
Settings of audio messages |
|
customer_external_id |
Parameter used for external identification of the customer |
enum (any, phone) |
file |
Settings of messages with files |
|
image |
Settings of messages with images |
|
order |
Settings of messages with order |
|
product |
Settings of messages with product card |
|
sending_policy |
Sending message policy |
|
status |
Setting of messages status updates |
|
suggestions |
Settings of messages with buttons |
|
text |
Settings of text messages |
audio
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
max_items_count |
Maximum number of audio recordings in a single message |
integer |
quoting |
Possibility to quote messages |
enum (none, receive, send, both) |
file
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
editing |
Possibility to edit messages |
enum (none, receive, send, both) |
max_items_count |
Maximum number of files in a single message |
integer |
note_max_chars_count |
Maximum allowed message length of an accompanying message |
integer |
quoting |
Possibility to quote messages |
enum (none, receive, send, both) |
image
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
editing |
Possibility to edit messages |
enum (none, receive, send, both) |
max_items_count |
Maximum number of images in a single message |
integer |
note_max_chars_count |
Maximum allowed message length of an accompanying message |
integer |
quoting |
Possibility to quote messages |
enum (none, receive, send, both) |
order
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
editing |
Possibility to edit messages |
enum (none, receive, send, both) |
product
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
editing |
Possibility to edit messages |
enum (none, receive, send, both) |
sending_policy
Name | Description | Schema |
---|---|---|
after_reply_timeout |
After expiration of allowed time to respond to customer |
enum (no, template) |
new_customer |
For customers with whom was no communication before |
enum (no, template) |
status
Name | Description | Schema |
---|---|---|
delivered |
Possibility to send delivered status |
enum (none, receive, send, both) |
read |
Possibility to send read status |
enum (none, receive, send, both) |
suggestions
Name | Description | Schema |
---|---|---|
Email |
Possibility to request the customer’s email address |
enum (none, receive, send, both) |
Phone |
Possibility to request the customer’s phone number |
enum (none, receive, send, both) |
text |
Possibility to work with buttons that have random text |
enum (none, receive, send, both) |
text
Name | Description | Schema |
---|---|---|
creating |
Possibility to send messages |
enum (none, receive, send, both) |
deleting |
Possibility to delete messages |
enum (none, receive, send, both) |
editing |
Possibility to edit messages |
enum (none, receive, send, both) |
max_chars_count |
Maximum allowed message length (2000 characters by default) |
integer (uint16) |
quoting |
Possibility to quote messages |
enum (none, receive, send, both) |
3.7. Chat
Name | Description | Schema |
---|---|---|
author_id |
Author ID |
integer (uint64) |
avatar |
Avatar URL |
string |
channel |
Channel data |
|
created_at |
Date/time of creation |
string (date-time) |
customer |
User |
|
id |
Chat ID |
integer (uint64) |
last_activity |
Last activity |
string (date-time) |
last_message |
Last message |
|
name |
Name |
string |
updated_at |
Date/time of last change |
string (date-time) |
LastMessage
Name | Description | Schema |
---|---|---|
id |
Message ID |
integer (uint64) |
time |
Time of creation |
string (date-time) |
type |
Message type |
string |
3.8. Command
Name | Description | Schema |
---|---|---|
created_at |
Date/time of creation |
string (date-time) |
description |
Command description |
string |
id |
Command ID |
integer (uint64) |
name |
Command name |
string |
updated_at |
Date/time of last change |
string (date-time) |
3.9. CommandEditRequest
Name | Description | Schema |
---|---|---|
description |
Command description |
string |
name |
Command name |
string |
3.10. Customer
Name | Description | Schema |
---|---|---|
avatar |
Avatar URL |
string |
channel_id |
Channel ID |
string |
country |
Country |
string |
created_at |
Date/time of creation |
string (date-time) |
email |
string |
|
external_id |
External ID of the customer (id in a messenger) |
string |
first_name |
Fist name of the customer |
string |
id |
Customer ID |
integer (uint64) |
language |
Selected locale |
string |
last_name |
Last name of the customer |
string |
phone |
Phone |
string |
profile_url |
Profile URL |
string |
revoked_at |
Date/time of registration revocation |
string (date-time) |
updated_at |
Date/time of last change |
string (date-time) |
username |
Username |
string |
3.11. Dialog
Name | Description | Schema |
---|---|---|
begin_message_id |
ID of the first message |
integer (uint64) |
bot_id |
Bot ID |
integer (uint64) |
chat_id |
Chat ID |
integer (uint64) |
closed_at |
Date/time of closing |
string (date-time) |
created_at |
Date/time of creation |
string (date-time) |
ending_message_id |
ID of the last message |
integer (uint64) |
id |
Dialog ID |
integer (uint64) |
is_active |
Activity checkbox |
string |
is_assigned |
Assignment mark |
string |
responsible |
||
updated_at |
Date/time of last change |
string (date-time) |
3.12. Error
Name | Description | Schema |
---|---|---|
messages |
List of error messages |
< string > array |
3.13. Event
Object returned on event
Name | Description | Schema |
---|---|---|
app_id |
Application ID |
integer (uint) |
data |
Body of object (depends on the event type, one of the properties below will be received) |
|
meta |
Metadata |
|
type |
Event type |
string |
data
Name | Description | Schema |
---|---|---|
chat_event |
Event - chat_created, chat_updated |
|
dialog_assign |
Event - dialog_assign |
|
dialog_event |
Event - dialog_opened, dialog_closed |
|
message_event |
Event - message_new, message_updated, message_deleted |
|
user_join_chat_event |
Event - user_join_chat |
|
user_left_chat_event |
Event - user_left_chat |
|
user_update_event |
Event - user_updated |
meta
Name | Description | Schema |
---|---|---|
timestamp |
Timestamp |
integer (int64) |
3.14. EventTypeDialogAssign
Name | Description | Schema |
---|---|---|
chat |
Information about chat |
|
dialog |
Information about dialog |
3.15. EventTypeMessage
Name | Description | Schema |
---|---|---|
message |
Information about message |
3.16. EventTypeUserJoinChat
Name | Description | Schema |
---|---|---|
chat |
Information about chat |
|
user |
Information about user |
3.17. EventTypeUserLeftChat
Name | Description | Schema |
---|---|---|
chat |
Information about chat |
|
reason |
Reason of event (active, left, kicked) |
string |
user |
Information about user |
3.18. FileMeta
Name | Schema |
---|---|
height |
integer (uint64) |
width |
integer (uint64) |
3.19. FullFileResponse
Name | Description | Schema |
---|---|---|
id |
File ID |
string |
size |
File size |
integer (uint64) |
type |
File type |
string |
url |
Link to file |
string |
3.20. InfoRequest
Name | Description | Schema |
---|---|---|
avatar_url |
Avatar URL |
string |
name |
Bot name |
string |
roles |
< object > array |
3.21. Item
Name | Schema |
---|---|
caption |
string |
id |
string |
3.22. Member
Name | Description | Schema |
---|---|---|
chat_id |
Chat ID |
integer (uint64) |
created_at |
Date/time of creation |
string (date-time) |
id |
Member ID |
integer (uint64) |
is_author |
Author mark |
string |
state |
Status |
string |
updated_at |
Date/time of last change |
string (date-time) |
user_id |
User ID |
integer (uint64) |
3.23. Message
Name | Description | Schema |
---|---|---|
actions |
Available actions |
< object > array |
channel_id |
Channel ID |
integer (uint64) |
channel_sent_at |
Date/time of sending |
string (date-time) |
chat |
Chat data |
|
chat_id |
Chat ID |
integer (uint64) |
content |
Message body |
string |
created_at |
Date/time of creation |
string (date-time) |
from |
From whom |
|
id |
Message ID |
integer (uint64) |
is_edit |
Mark of editing |
boolean |
is_read |
Mark that the message has been read |
boolean |
items |
Attachments |
< Attachment > array |
order |
Order page |
|
product |
Product page |
|
scope |
Scope |
string |
status |
Status |
string |
time |
Timestamp |
string (date-time) |
transport_attachments |
Attachments |
|
type |
Message type |
string |
updated_at |
Date/time of last change |
string (date-time) |
3.24. MessageCost
Name | Description | Schema |
---|---|---|
currency |
Currency code |
string |
value |
Price per unit |
number (float32) |
3.25. MessageDelivery
Name | Description | Schema |
---|---|---|
address |
Address |
string |
comment |
Comment |
string |
name |
Name of delivery type |
string |
price |
Cost |
3.26. MessageEditRequest
Name | Description | Schema |
---|---|---|
content |
Message body |
string |
id |
Message ID |
integer (uint64) |
3.27. MessageOrder
Order page
Name | Description | Schema |
---|---|---|
cost |
Sum for order |
|
date |
Date of creation |
string |
delivery |
Delivery |
|
items |
Order items |
< MessageOrderItem > array |
number |
Order number |
string |
payments |
Payments |
< MessagePayment > array |
status |
Order status |
3.28. MessageOrderItem
Name | Description | Schema |
---|---|---|
img |
Image URL |
string |
name |
Product name |
string |
price |
Cost |
|
quantity |
Quantity |
|
url |
URL of product page |
string |
3.29. MessageOrderPaymentStatus
Name | Description | Schema |
---|---|---|
name |
Name of status |
string |
payed |
Indicator of payment completion |
boolean |
3.30. MessagePayment
Name | Description | Schema |
---|---|---|
amount |
Payment name |
|
name |
Payment name |
string |
status |
Payment status |
3.31. MessageProduct
Product page
Name | Description | Schema |
---|---|---|
article |
Article |
string |
cost |
Price |
|
id |
Offer ID |
integer (uint64) |
img |
Image URL |
string |
name |
Product name |
string |
quantity |
Quantity |
|
url |
URL of product page |
string |
3.32. MessageQuantity
Name | Description | Schema |
---|---|---|
unit |
Unit of measurement |
string |
value |
Quantity |
number (float32) |
3.33. MessageSendRequest
Name | Description | Schema |
---|---|---|
chat_id |
Chat ID |
integer (uint64) |
content |
Body of the text message, it is required if the 'text' type is specified |
string |
items |
Array of files, it is required if the 'file' type is specified |
< Item > array |
order |
Body of the order page, it is required if the 'text' type is specified |
|
product |
Body of the product page, it is required if the 'product' type is specified |
|
quote_message_id |
ID of the quoted message |
integer (uint64) |
scope |
Scope |
string |
transport_attachments |
Attachments |
|
type |
Message type |
string |
3.34. MessageSendResponse
Name | Description | Schema |
---|---|---|
message_id |
Message ID |
integer (uint64) |
time |
Timestamp |
string |
3.35. MessageStatus
Name | Description | Schema |
---|---|---|
code |
Code of status |
string |
name |
Name of status |
string |
3.36. Responsible
Name | Description | Schema |
---|---|---|
assigned_at |
Date/time of assignment |
string (date-time) |
id |
ID of responsible person |
integer (uint64) |
type |
Type of responsible person |
string |
3.37. Suggestion
Name | Description | Schema |
---|---|---|
title |
Suggestion title (only can be used with text type) |
string |
type |
Suggestion type |
string |
3.38. TransportAttachments
Name | Description | Schema |
---|---|---|
suggestions |
Suggestions |
< Suggestion > array |
3.39. UnassignResponse
Name | Description | Schema |
---|---|---|
previous_responsible |
Previous responsible person |
3.40. UploadFileByUrlRequest
Name | Schema |
---|---|
url |
string |
3.41. UploadFileResponse
Name | Description | Schema |
---|---|---|
created_at |
Time of file creation |
string (date-time) |
hash |
File hash |
string |
id |
File ID |
string |
meta |
Information about file |
|
mime_type |
MIME type |
string |
size |
File size |
integer (uint64) |
source_url |
Link to file |
string |
type |
File type |
string |
3.42. User
Name | Description | Schema |
---|---|---|
avatar |
Avatar URL |
string |
created_at |
Date/time of creation |
string (date-time) |
external_id |
External ID of the user (id in a messenger) |
string |
first_name |
Fist name of the user |
string |
id |
User ID |
integer (uint64) |
is_active |
Activity checkbox |
string |
is_online |
Online indicator |
string |
last_name |
Last name of the user |
string |
revoked_at |
Date/time of registration revocation |
string (date-time) |
updated_at |
Date/time of last change |
string (date-time) |
username |
Username |
string |
4. Security
4.1. key
Type : apiKey
Name : x-bot-token
In : HEADER