UltracartClient::ConversationApi
All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
get_agent_websocket_authorization | PUT /conversation/agent/auth | Get agent websocket authorization |
get_conversation | GET /conversation/conversations/conversation_uuid | Retrieve a conversation |
get_conversation_multimedia_upload_url | GET /conversation/upload_url/extension | Get a presigned conersation multimedia upload URL |
get_conversations | GET /conversation/conversations | Retrieve a list of conversation summaries newest to oldest |
join_conversation | PUT /conversation/conversations/conversation_uuid/join | Join a conversation |
leave_conversation | DELETE /conversation/conversations/conversation_uuid/leave | Leave a conversation |
start_conversation | PUT /conversation/conversations | Start a conversation |
get_agent_websocket_authorization
ConversationAgentAuthResponse get_agent_websocket_authorization
Get agent websocket authorization
Retrieve a JWT to authorize an agent to make a websocket connection.
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
begin
#Get agent websocket authorization
result = api_instance.
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->get_agent_websocket_authorization: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
get_conversation
Conversation get_conversation(conversation_uuid)
Retrieve a conversation
Retrieve a conversation including the participants and messages
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
conversation_uuid = 'conversation_uuid_example' # String |
begin
#Retrieve a conversation
result = api_instance.get_conversation(conversation_uuid)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->get_conversation: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
conversation_uuid | String |
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
get_conversation_multimedia_upload_url
get_conversation_multimedia_upload_url(extension)
Get a presigned conersation multimedia upload URL
Get a presigned conersation multimedia upload URL
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
extension = 'extension_example' # String |
begin
#Get a presigned conersation multimedia upload URL
api_instance.get_conversation_multimedia_upload_url(extension)
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->get_conversation_multimedia_upload_url: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
extension | String |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
get_conversations
ConversationsResponse get_conversations(opts)
Retrieve a list of conversation summaries newest to oldest
Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
opts = {
_limit: 100, # Integer | The maximum number of records to return on this one API call. (Max 200)
_offset: 0 # Integer | Pagination of the record set. Offset is a zero based index.
}
begin
#Retrieve a list of conversation summaries newest to oldest
result = api_instance.get_conversations(opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->get_conversations: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
_limit | Integer | The maximum number of records to return on this one API call. (Max 200) | [optional] [default to 100] |
_offset | Integer | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
join_conversation
join_conversation(conversation_uuid)
Join a conversation
Join a conversation
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
conversation_uuid = 'conversation_uuid_example' # String |
begin
#Join a conversation
api_instance.join_conversation(conversation_uuid)
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->join_conversation: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
conversation_uuid | String |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
leave_conversation
leave_conversation(conversation_uuid)
Leave a conversation
Leave a conversation
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
conversation_uuid = 'conversation_uuid_example' # String |
begin
#Leave a conversation
api_instance.leave_conversation(conversation_uuid)
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->leave_conversation: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
conversation_uuid | String |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
start_conversation
ConversationStartResponse start_conversation(start_request)
Start a conversation
Start a new conversation
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
start_request = UltracartClient::ConversationStartRequest.new # ConversationStartRequest | Start request
begin
#Start a conversation
result = api_instance.start_conversation(start_request)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling ConversationApi->start_conversation: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
start_request | ConversationStartRequest | Start request |
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json