Upload offline messages
Method | upload.offline_messages |
---|---|
Description | Upload offline messages |
Who has access | Agent, Customer |
Components required to work with the method | Data API, Upload offline messages from an outside system |
Maximum number of inquiries per request | 500 |
Required parameters:
- session_id, campaign_id or site_id (if several parameters are stated, the data should be consistent)
- phone or email
Parameters of a request
Title | Type | Required | Valid value | Description |
---|---|---|---|---|
access_token |
string | yes | Authentication session key | |
user_id |
number | no | Unique user ID of a customer or an agent who makes request Is mandatory for agentTo get a list of customer users you should use the method "get.customer_users" |
|
offline_messages |
array | yes | List of offline messages. Maximum 500 |
|
date_time |
iso8601 | no | YYYY-MM-DD hh:mm:ss | Date and time when an inquiry was made. Can't be in the future. |
name |
string | no | Username | |
phone |
string | no | User phone number in the format E164 | |
email |
string | no | Visitor's email | |
message |
string | no | Visitor's message | |
visitor_session_id |
number | no | Unique ID of a visitor's session from CallGear. to get an ID you need to use the method the method JS API CallGear.getSessionId() | |
campaign_id |
number | no | Unique ID of an advertising campaign in CallGear. To get campaign_id you can use the method Data API "get.campaigns" | |
site_id |
number | no | Unique website ID. |
JSON request structure
{
"jsonrpc": "2.0",
"id": "number",
"method": "upload.offline_messages",
"params": {
"access_token": "string",
"user_id": "number",
"offline_messages": [
{
"date_time": "iso8601",
"name": "string",
"phone": "string",
"email": "string",
"message": "string",
"visitor_session_id": "number",
"campaign_id": "number",
"site_id": "number"
}
]
}
}
JSON reply structure
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"data": [
{
"id": "number"
}
],
"metadata": "object"
}
}
List of returning errors
Refer to section "List of errors for methods with the verb upload"