Chats
Show
GET /chats/#{id}.format

Description

User can retrieve a single chat session.
Authentication is required to use this method.


Arguments

  1. OAuth (mandatory): OAuth authentication params
  2. chat id (mandatory): chat unique identificator

Response example

Status:200

<chat>
        <id> 4d370c1bc39a9951770000ee1a9a3</id>
        <entry_point_id>123qaz</entry_point_id>
        <start-time>2010-07-21T16:41:52Z</start-time>
        <end-time>2010-07-21T16:56:01Z</end-time>
        <time-spent>85</time-spent>
        <waiting-time>0</waiting-time>
        <url>http://mypage.com</url>
        <attended_by>4694</attended_by>
        <status>attended</status>
        <speed_answer>25</speed_answer>
        <messages>
            <message>
                 <user>client</user>
                 <text>this is a message from the end user</text>
                  <time_stamp>2011-01-19T17:06:39+01:00</time_stamp>
           </message>
            <message>
                 <user>agent</user>
                 <text>this is a message from the agent</text>
                  <time_stamp>2011-01-19T17:06:48+01:00</time_stamp>
           </message>
        </messages>
</chat>
Response values

  1. id: unique chat ID
  2. entry_point_id: chat belongs to this entry point
  3. start_time: timestamp when the chat started
  4. end_time: timestamp when the chat finished
  5. time_spent: chat duration in seconds
  6. waiting_time: seconds spent in the queue by the end user before starting a chat
  7. url: address where the chat was initiated
  8. status: session status
    • Attended: answered chat
    • Not answered: chat started by the customer but not answered by the agent
    • Abandoned: chat left by the customer without entering any data
    • Transferred: chat transferred to another agent
  9. speed_answer: time in seconds in between a chat is assigned to an agent and this agent answers it
  10. Messages: message object
    • user: user taht has sent the message
    • text: data sent
    • timestamp: time at which the message was sent

Error Codes

  1. 1400 - Chat Session not found (404)


List All
GET /chats.format

Description

User can obtain a collection of chats. Authentication is required to use this method.


Arguments

  1. OAuth (mandatory): OAuth authentication params

Response example

Status: 200

<chats>
        <chat>

                …

        </chat>
        <chat>

                …

        </chat>
</chats>


Error codes