{"info":{"_postman_id":"d5a15944-9c25-4f8d-b3e1-d834cfc267ed","name":"LiveChat Reports API v2","description":"<html><head></head><body><h2 id=\"introduction\">Introduction</h2>\n<p>Welcome to the LiveChat Reports API documentation!</p>\n<h2 id=\"basic-api-usage\">Basic API usage</h2>\n<p>All LiveChat API requests start with  <code>https://api.livechatinc.com/</code>.</p>\n<p>Please note that all LiveChat API requests must use `HTTPS` protocol.</p>\n<p>All requests must have `X-API-VERSION` header set to the number of the version that you'd like to use. The most recent version is 2.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Two common authentication methods are supported:  <strong>OAuth 2.0</strong>  and  <strong>API key</strong>.</p>\n<h3 id=\"oauth-20\">OAuth 2.0</h3>\n<p>OAuth 2.0 authentication is the recommended way of authenticating to LiveChat API.</p>\n<p>It is the most secure way of making API calls. With this flow, you will get access only to some parts of LiveChat account, such as reading agents list. This is more secure than  <a href=\"https://docs.livechatinc.com/rest-api/#api-key\">API key flow</a>  which has always access to all LiveChat account data.</p>\n<p>To start using OAuth 2.0, please read a dedicated  <a href=\"https://docs.livechatinc.com/authorization\">Authorization</a>  guide.</p>\n<h2 id=\"data-format\">Data format</h2>\n<p>The LiveChat API returns the data in the  <a href=\"http://en.wikipedia.org/wiki/JSON\">JSON</a>  format. Check out the following example.</p>\n<h2 id=\"jsonp\">JSONP</h2>\n<p>All requests made with HTTP GET are  <a href=\"http://en.wikipedia.org/wiki/JSONP\">JSONP</a>-enabled. To use JSONP, append  <code>callback=</code>  and the name of your callback function to the request.</p>\n<h2 id=\"error-handling\">Error handling</h2>\n<p>The errors are returned using the standard HTTP error code syntax. In general, the codes in the 2xx range indicate success, the codes in the 4xx range indicate an error (incorrect or missing parameters, not authenticated etc.), and the codes in the 5xx range indicate an error with the LiveChat servers. Any additional info is included in the body of the return call, JSON-formatted.</p>\n<h3 id=\"http-status-codes-summary\">HTTP status codes summary</h3>\n<ul>\n<li><code>400</code>  – The request is incorrect, please make sure that the passed arguments are matching the format in the method’s documentation.</li>\n<li><code>401</code>  – Unauthorized. You attempt to authenticate with an invalid username or API key.</li>\n<li><code>404</code>  – Not Found. You attempt to request a resource which doesn’t exist.</li>\n<li><code>500</code>  – Internal Server Error. Something unexpected happened on our end. Please try again or contact our support.</li>\n</ul>\n<h2 id=\"cross-domain\">Cross-domain</h2>\n<p>All cross-domain API requests made by a web browser are denied for security reasons. It means that the browser-based requests are not allowed from 3rd party domains (including  <code>localhost</code>).</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5938358","collectionId":"d5a15944-9c25-4f8d-b3e1-d834cfc267ed","publishedId":"T1LHHqAG","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-08-07T10:59:34.000Z"},"item":[{"name":"Reports","item":[{"name":"Chat engagement","id":"7f22bd29-a6c2-42b1-8eff-9789c4efd4f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/engagement?date_from={{date_from}}&date_to={{date_to}}&agent={{agent}}&group_by={{group_by}}","description":"<p>This report shows you where you get your chats from. They can come from i.e. automatic invitations, manual invitations or the visitors can start the chats by themselves.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","engagement"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"agent","value":"{{agent}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"7f22bd29-a6c2-42b1-8eff-9789c4efd4f2"},{"name":"Total chats","id":"2d52d00a-e75a-4335-8ea2-29a52c655a93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/total_chats?date_from={{date_from}}&date_to={{date_to}}&agent={{agent}}&group_by={{group_by}}","description":"<p>Shows how many chats occurred during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","total_chats"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"agent","value":"{{agent}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"2d52d00a-e75a-4335-8ea2-29a52c655a93"},{"name":"Chat ratings report","id":"02dbccb2-28e8-421b-9e56-789f7b277ea1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/ratings?group={{group}}&date_from={{date_from}}&date_to={{date_to}}&group_by={{group_by}}","description":"<p>Shows how many chats have been rated and how they have been rated during a specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","ratings"],"host":["api","livechatinc","com"],"query":[{"key":"group","value":"{{group}}"},{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"02dbccb2-28e8-421b-9e56-789f7b277ea1"},{"name":"Chat Ranking","id":"1abbe587-3857-4377-8a95-4fbc737c64b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/ratings/ranking","description":"<p>Shows the ratio of good to bad ratings for each operator.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","ratings","ranking"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1abbe587-3857-4377-8a95-4fbc737c64b4"},{"name":"Queued visitors","id":"05407e28-4c17-472d-9ec4-fe5265693527","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/queued_visitors?date_from={{date_from}}&group={{group}}","description":"<p>Shows how many visitors waited in the queue and how many abandoned the queue or proceeded to chats</p>\n","urlObject":{"protocol":"https","path":["reports","chats","queued_visitors"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"group","value":"{{group}}"}],"variable":[]}},"response":[],"_postman_id":"05407e28-4c17-472d-9ec4-fe5265693527"},{"name":"Queue waiting times","id":"c21bf128-e334-4cc1-8314-c3c03ba36d6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times?date_from={{date_from}}&group={{group}}","description":"<p>Shows the Minimum, Average and Maximum waiting time.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","queued_visitors","waiting_times"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"group","value":"{{group}}"}],"variable":[]}},"response":[],"_postman_id":"c21bf128-e334-4cc1-8314-c3c03ba36d6f"},{"name":"Availability","id":"f421ee6b-77f3-4222-8940-335dc30314c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/availability","description":"<p>Shows how long an agent (or a group or the whole account) was available for chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n","urlObject":{"protocol":"https","path":["reports","availability"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f421ee6b-77f3-4222-8940-335dc30314c8"},{"name":"Chatting time","id":"c35b3800-6d74-4655-a3d4-7e328c76730f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/chatting_time","description":"<p>Shows how much time an agent (or a group) spent on chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","chatting_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c35b3800-6d74-4655-a3d4-7e328c76730f"},{"name":"Chats first response time","id":"3e7e4d10-56d5-4ecb-8ee2-c84354d271de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/first_response_time","description":"<p>The average amount of time it takes the agents to respond to a new chat over a specified period of time.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","first_response_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e7e4d10-56d5-4ecb-8ee2-c84354d271de"},{"name":"Chats response time","id":"8c99c182-d33b-46e1-a95d-aa8226e41754","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/response_time","description":"<p>The average amount of time it takes the agents to respond to a new message in a chat during a specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","response_time"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c99c182-d33b-46e1-a95d-aa8226e41754"},{"name":"Number of simultaneous chats","id":"047dee1d-79df-40b2-981f-1f984e50169d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}],"advancedConfig":[{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/agents_occupancy?weekday={{weekday}}","description":"<p>This request shows the maximum number of concurrent chats that happened at the same hour on a particular day.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","agents_occupancy"],"host":["api","livechatinc","com"],"query":[{"key":"weekday","value":"{{weekday}}"}],"variable":[]}},"response":[],"_postman_id":"047dee1d-79df-40b2-981f-1f984e50169d"},{"name":"Goals","id":"680df7de-2258-4b64-8ada-69b26adbc91e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/goals?date_from={{date_from}}&goal={{goal}}&group_by={{group_by}}","description":"<p>Shows the number of reached goals.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","goals"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"goal","value":"{{goal}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"680df7de-2258-4b64-8ada-69b26adbc91e"},{"name":"Greetings","id":"f58aa557-ff49-40a5-a713-f496e91f17d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/greetings?date_from={{date_from}}&date_to={{date_to}}&group_by={{group_by}}","description":"<p>Returns the “greetings to chats to goals” conversion rates report.</p>\n<p>displayed is the number of displayed greetings. accepted tells you how many chats resulted from these greetings. goals tells you how many goals resulted from these greetings.</p>\n","urlObject":{"protocol":"https","path":["reports","chats","greetings"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"f58aa557-ff49-40a5-a713-f496e91f17d7"},{"name":"New tickets","id":"d75e3eac-7dd6-446b-b0ab-b0b1c765c993","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/new_tickets?date_from={{date_from}}&date_to={{date_to}}&group_by={{group_by}}","description":"<p>Shows the number of the tickets created during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","new_tickets"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"d75e3eac-7dd6-446b-b0ab-b0b1c765c993"},{"name":"Tickets first response time","id":"380a4930-abb5-48f9-9dab-8231d215bc29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/first_response_time?date_from={{date_from}}&date_to={{date_to}}&agent={{agent}}","description":"<p>Shows the time of the first response to the tickets that were responded to for the first time during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","first_response_time"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"agent","value":"{{agent}}"}],"variable":[]}},"response":[],"_postman_id":"380a4930-abb5-48f9-9dab-8231d215bc29"},{"name":"Solved tickets","id":"4fc2fd24-a51a-433c-9d94-62a33121a42e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/solved_tickets?date_from={{date_from}}&date_to={{date_to}}","description":"<p>Shows the number of the tickets solved during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","solved_tickets"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"}],"variable":[]}},"response":[],"_postman_id":"4fc2fd24-a51a-433c-9d94-62a33121a42e"},{"name":"Tickets resolution time","id":"2a08ace9-4410-4112-a4f5-e5cc05c7f21d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/resolution_time?date_from={{date_from}}&date_to={{date_to}}","description":"<p>Shows the resolution time of the tickets that were solved during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","resolution_time"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"}],"variable":[]}},"response":[],"_postman_id":"2a08ace9-4410-4112-a4f5-e5cc05c7f21d"},{"name":"Ticket sources","id":"b5df1fdd-9b6d-46f2-b926-b0c72283cf2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/ticket_sources?date_from={{date_from}}&date_to={{date_to}}","description":"<p>Shows the distribution of the tickets between various channels.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ticket_sources"],"host":["api","livechatinc","com"],"query":[{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"}],"variable":[]}},"response":[],"_postman_id":"b5df1fdd-9b6d-46f2-b926-b0c72283cf2c"},{"name":"Ticket ratings report","id":"1f492cac-f445-4ab2-ab77-c7b0e2ad3281","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/ratings?group={{group}}&date_from={{date_from}}&date_to={{date_to}}&group_by={{group_by}}","description":"<p>Shows the tickets that were rated during the specified period.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ratings"],"host":["api","livechatinc","com"],"query":[{"key":"group","value":"{{group}}"},{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"1f492cac-f445-4ab2-ab77-c7b0e2ad3281"},{"name":"Ticket Ranking","id":"39650cca-27d3-4629-a5bb-183b9824a111","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/tickets/ratings/ranking","description":"<p>Shows the ratio of good to bad ratings for each operator.</p>\n","urlObject":{"protocol":"https","path":["reports","tickets","ratings","ranking"],"host":["api","livechatinc","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"39650cca-27d3-4629-a5bb-183b9824a111"},{"name":"Chat Missed","id":"e8f4e86c-f12c-4d8f-b0ca-a35195d19dd8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"X-API-Version","value":"2"}],"url":"https://api.livechatinc.com/reports/chats/not_replied_chats?groups[]={{group}}&date_from={{date_from}}&date_to={{date_to}}&group_by={{group_by}}","description":"<p>This reports shows you the number of chats with no messages sent by agents (except the first welcome message that always occur in conversations).</p>\n","urlObject":{"protocol":"https","path":["reports","chats","not_replied_chats"],"host":["api","livechatinc","com"],"query":[{"key":"groups[]","value":"{{group}}"},{"key":"date_from","value":"{{date_from}}"},{"key":"date_to","value":"{{date_to}}"},{"key":"group_by","value":"{{group_by}}"}],"variable":[]}},"response":[],"_postman_id":"e8f4e86c-f12c-4d8f-b0ca-a35195d19dd8"}],"id":"a0a92746-f8d3-4b33-bed5-6b119aa32944","description":"<h1 id=\"reports\">Reports</h1>\n<p>This method allows you to <strong>access</strong> and <strong>extract</strong> all the <a href=\"https://www.livechatinc.com/kb/reporting-options-available-in-livechat/\">Reports</a> data available in LiveChat.</p>\n<h2 id=\"available-paths-reports-available-paths\">Available paths {#reports-available-paths}</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Methods</th>\n<th>Path</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/total_chats</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/engagement</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/ratings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/ratings/ranking</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/queued_visitors</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/queued_visitors/waiting_times</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/availability</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/chatting_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/first_response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/goals</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/chats/greetings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/new_tickets</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/first_response_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/solved_tickets</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/resolution_time</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ticket_sources</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ratings</code></td>\n</tr>\n<tr>\n<td><code>GET</code></td>\n<td><code>/reports/tickets/ratings/ranking</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"total-chats\">Total chats</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/total_chats\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/total_chats?\\\ndate_from=2013-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"00:00\": {\n    \"chats\": 18\n  },\n  \"01:00\": {\n    \"chats\": 19\n  },\n    \"02:00\": {\n    \"chats\": 6\n  },\n    \"03:00\": {\n      \"chats\": 15\n  },\n  \"04:00\": {\n    \"chats\": 10\n  },\n  \"05:00\": {\n    \"chats\": 14\n  },\n  \"06:00\": {\n    \"chats\": 11\n  },\n  //(...)\n  \"21:00\": {\n    \"chats\": 0\n  },\n  \"22:00\": {\n    \"chats\": 0\n  },\n  \"23:00\": {\n    \"chats\": 2\n  }\n}\n</code></pre>\n<p>Shows how many chats occurred during the specified period.</p>\n<h4 id=\"optional-arguments\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-engagement\">Chat engagement</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/engagement\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/engagement?\\\ndate_from=2013-01-28&amp;\\\ndate_to=2013-01-29&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ntag[]=sales&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-28\":{\n    \"chats_from_auto_invite\":1,\n    \"chats_from_immediate_start\":0,\n    \"chats_from_manual_invite\":3\n  },\n  \"2013-01-29\":{\n    \"chats_from_auto_invite\":0,\n    \"chats_from_immediate_start\":2,\n    \"chats_from_manual_invite\":0\n  }\n}\n</code></pre>\n<p>This report shows you where you get your chats from. They can come from i.e. automatic invitations, manual invitations or the visitors can start the chats by themselves.</p>\n<h4 id=\"optional-arguments-1\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-ratings-report\">Chat ratings report</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/ratings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/ratings?\\\ngroup=2&amp;\\\ndate_from=2012-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2012-01\": {\n    \"begin\": \"2012-01-29\",\n    \"end\": \"2012-01-31\",\n    \"bad\": 0,\n    \"good\": 6,\n    \"chats\": 37\n  },\n  \"2012-02\": {\n    \"begin\": \"2012-02-01\",\n    \"end\": \"2012-02-29\",\n    \"bad\": 4,\n    \"good\": 38,\n    \"chats\": 320\n  },\n  \"2012-03\": {\n    \"begin\": \"2012-03-01\",\n    \"end\": \"2012-03-31\",\n    \"bad\": 0,\n    \"good\": 16,\n    \"chats\": 186\n  },\n  //(...) \n  \"2012-11\": {\n    \"begin\": \"2012-11-01\",\n    \"end\": \"2012-11-30\",\n    \"bad\": 20,\n    \"good\": 49,\n    \"chats\": 389\n  }\n}\n</code></pre>\n<p>Shows how many chats have been rated and how they have been rated during a specified period.</p>\n<h4 id=\"optional-arguments-2\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chat-ranking\">Chat Ranking</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/ratings/ranking\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/ratings/ranking\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ranking\": [\n    {\n      \"good\": 2502,\n      \"bad\": 426,\n      \"total\": 2928,\n      \"score\": 0.8361489669658251,\n      \"name\": \"john.doe@mycompany.com\"\n    },\n    {\n      \"good\": 2164,\n      \"bad\": 443,\n      \"total\": 2607,\n      \"score\": 0.8094273999034496,\n      \"name\": \"jane.doe@mycompany.com\"\n    },\n    {\n      \"good\": 1070,\n      \"bad\": 215,\n      \"total\": 1285,\n      \"score\": 0.8029689181922964,\n      \"name\": \"jenny.doe@mycompany.com\"\n    }\n}\n</code></pre>\n<p>Shows the ratio of good to bad ratings for each operator.</p>\n<h4 id=\"optional-arguments-3\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"queued-visitors\">Queued visitors</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/queued_visitors\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/queued_visitors?\\\ndate_from=2013-01-29&amp;\\\ngroup=2\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-29\": {\n    \"queued\": {\n      \"count\": 6,\n    },\n    \"left_queue\": {\n      \"count\": 3,\n    },\n    \"entered_chat\": {\n      \"count\": 3,\n    }\n  },\n  \"2013-01-30\": {\n    \"queued\": {\n      \"count\": 2,\n    },\n    \"left_queue\": {\n      \"count\": 0\n    },\n    \"entered_chat\": {\n      \"count\": 2,\n    }\n  }\n}\n</code></pre>\n<p>Shows how many visitors waited in the queue and how many abandoned the queue or proceeded to chats.</p>\n<h4 id=\"optional-arguments-4\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"queue-waiting-times\">Queue waiting times</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/queued_visitors/waiting_times?\\\ndate_from=2013-01-29&amp;\\\ngroup=2\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-29\":{\n    \"queued\":{\n      \"count\": 1,\n      \"min\":{\n        \"seconds\":0\n      },\n      \"max\":{\n        \"seconds\":112\n      },\n      \"average\":{\n        \"seconds\":24\n      }\n    },\n    \"left_queue\":{\n      \"count\": 3,\n      \"min\":{\n        \"seconds\":33\n      },\n      \"max\":{\n        \"seconds\":56\n      },\n      \"average\":{\n        \"seconds\":44\n      }\n    },\n    \"entered_chat\":{\n      \"count\": 2,\n      \"min\":{\n        \"seconds\":10\n      },\n      \"max\":{\n        \"seconds\":112\n      },\n      \"average\":{\n        \"seconds\":23\n      }\n    }\n  }\n}\n</code></pre>\n<p>Shows the Minimum, Average and Maximum waiting time.</p>\n<h4 id=\"optional-arguments-5\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"availability\">Availability</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/availability\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/availability?\\\ndate_from=2013-01-25&amp;\\\ndate_to=2013-01-30&amp;\\\nagent=john.doe@mycompany.com&amp;\\\ngroup_by=day\"\\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-25\": {\n    \"hours\": 0\n  },\n  \"2013-01-26\": {\n    \"hours\": 0\n  },\n  \"2013-01-27\": {\n    \"hours\": 0.01\n  },\n  \"2013-01-28\": {\n    \"hours\": 7.85\n  },\n  \"2013-01-29\": {\n    \"hours\": 7.99\n  },\n  \"2013-01-30\": {\n    \"hours\": 2.28\n  }\n}\n</code></pre>\n<p>Shows how long an agent (or a group or the whole account) was available for chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n<h4 id=\"optional-arguments-6\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chatting-time\">Chatting time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/chatting_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/chatting_time?\\\ndate_from=2013-01-25&amp;\\\ndate_to=2013-01-30&amp;\\\ngroup=1\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01-25\": {\n    \"hours\": 8.17\n  },\n  \"2013-01-26\": {\n    \"hours\": 9.2\n  },\n  \"2013-01-27\": {\n    \"hours\": 5.3\n  },\n  \"2013-01-28\": {\n    \"hours\": 7.16\n  },\n  \"2013-01-29\": {\n    \"hours\": 10.71\n  },\n  \"2013-01-30\": {\n    \"hours\": 6.51\n  }\n}\n</code></pre>\n<p>Shows how much time an agent (or a group) spent on chatting during a specified period. When querying for one day, the results are shown in minutes per every hour, otherwise in hours for each day.</p>\n<h4 id=\"optional-arguments-7\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, returns statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"chats-first-response-time\">Chats first response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/first_response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/first_response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"first_response_time\": {\n      \"count\": 5,\n      \"seconds\": 0.83\n    }\n  },\n  \"2014-01-11\": {\n    \"first_response_time\": {\n      \"count\": 1,\n      \"seconds\": 1.3\n    }\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"first_response_time\":{\n      \"count\": 0,\n      \"seconds\": null\n    }\n  }\n}\n</code></pre>\n<p>The average amount of time it takes the agents to respond to a new chat over a specified period of time.</p>\n<h4 id=\"optional-arguments-8\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of chat first responses during the specified period.</li>\n<li><code>seconds</code> – the average first response time.</li>\n</ul>\n<h2 id=\"chats-response-time\">Chats response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"avg_response_time\": {\n      \"count\": 5,\n      \"seconds\": 0.83\n    }\n  },\n  \"2014-01-11\": {\n    \"avg_response_time\": {\n      \"count\": 1,\n      \"seconds\": 1.3\n    }\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"avg_response_time\":{\n      \"count\": 0,\n      \"seconds\": null\n    }\n  }\n}\n</code></pre>\n<p>The average amount of time it takes the agents to respond to a new message in a chat during a specified period.</p>\n<h4 id=\"optional-arguments-9\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of chat responses during the specified period.</li>\n<li><code>seconds</code> – the average response time</li>\n</ul>\n<h2 id=\"number-of-simultaneous-chats\">Number of simultaneous chats</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/agents_occupancy\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/agents_occupancy?\\\nweekday=mon\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"2015-03-16 00:00\": 0,\n    \"2015-03-16 01:00\": 0,\n    \"2015-03-16 02:00\": 0,\n    \"2015-03-16 03:00\": 0,\n    \"2015-03-16 04:00\": 0,\n    \"2015-03-16 05:00\": 0,\n    \"2015-03-16 06:00\": 0,\n    \"2015-03-16 07:00\": 0,\n    \"2015-03-16 08:00\": 0,\n    \"2015-03-16 09:00\": 13,\n    \"2015-03-16 10:00\": 17,\n    \"2015-03-16 11:00\": 20,\n    \"2015-03-16 12:00\": 20,\n    \"2015-03-16 13:00\": 16,\n    \"2015-03-16 14:00\": 16,\n    \"...\": \"...\",\n    \"2015-03-23 00:00\": 0,\n    \"2015-03-23 01:00\": 0,\n    \"2015-03-23 02:00\": 0,\n    \"2015-03-23 03:00\": 0,\n    \"2015-03-23 04:00\": 0,\n    ...\n    \"2015-04-06 23:00\": 0\n}\n</code></pre>\n<p>This request shows the maximum number of concurrent chats that happened at the same hour on a particular day.</p>\n<h4 id=\"required-arguments\">Required arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>weekday</code></td>\n<td>you can select the day by changing the weekday parameter to one of the following values: <code>mon</code> for Monday, <code>tue</code> for Tuesday, <code>wed</code> for Wednesday, <code>thu</code> for Thursday, <code>fri</code> for Friday, <code>sat</code> for saturday and <code>sun</code> for Sunday</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"goals-reports-goals\">Goals {#reports-goals}</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/goals\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/goals?\\\ndate_from=2013-01-01&amp;\\\ngoal=71&amp;group_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2013-01\": {\n    \"begin\": \"2013-01-01\",\n    \"end\": \"2013-01-30\",\n    \"goals\": 4\n  }\n}\n</code></pre>\n<p>Shows the number of reached goals.</p>\n<h4 id=\"optional-arguments-10\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>goal</code></td>\n<td>id of the goal, not set by default</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"greetings-reports-greetings\">Greetings {#reports-greetings}</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/chats/greetings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/chats/greetings?\\\ndate_from=2014-01-13&amp;\\\ndate_to=2014-02-14&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01\": {\n    \"begin\": \"2014-01-13\",\n    \"end\": \"2014-01-31\",\n    \"displayed\": 274,\n    \"accepted\": 190,\n    \"goals\": 40\n  },\n  \"2014-02\": {\n  \"begin\": \"2014-02-01\",\n    \"end\": \"2014-02-14\",\n    \"displayed\": 146,\n    \"accepted\": 88,\n    \"goals\": 22\n  }\n}\n</code></pre>\n<p>Returns the “greetings to chats to goals” conversion rates report.</p>\n<p><code>displayed</code> is the number of displayed greetings. <code>accepted</code> tells you how many chats resulted from these greetings. <code>goals</code> tells you how many goals resulted from these greetings.</p>\n<h4 id=\"optional-arguments-11\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>goal</code></td>\n<td>id of the goal, not set by default</td>\n</tr>\n<tr>\n<td><code>greeting</code></td>\n<td><code>id</code> of the greeting, not set by default, returns statistics for the specified greeting</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"new-tickets\">New tickets</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/new_tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/new_tickets?\\\ndate_from=2013-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=hour\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"00:00\": {\n    \"new_tickets\": 5\n  },\n  \"01:00\": {\n    \"new_tickets\": 1\n  },\n  //(...)\n  \"23:00\": {\n    \"new_tickets\": 21\n  }\n}\n</code></pre>\n<p>Shows the number of the tickets created during the specified period.</p>\n<h4 id=\"optional-arguments-12\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"tickets-first-response-time\">Tickets first response time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/first_response_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/first_response_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20&amp;\\\nagent=john.doe@mycompany.com\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"count\": 5,\n    \"hours\": 0.83\n  },\n  \"2014-01-11\": {\n    \"count\": 1,\n    \"hours\": 1.3\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"count\": 0,\n    \"hours\": null\n  }\n}\n</code></pre>\n<p>Shows the time of the first response to the tickets that were responded to for the first time during the specified period.</p>\n<h4 id=\"optional-arguments-13\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>count</code> – the number of tickets that were responded to for the first time that day.</li>\n<li><code>hours</code> – average first response time of the tickets. For example, <code>\"hours\": 0.83</code> means an average first response time of 49mins 48sec.</li>\n</ul>\n<h2 id=\"solved-tickets\">Solved tickets</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/solved_tickets\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/solved_tickets?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"solved_tickets\": 4\n  },\n  \"2014-01-11\": {\n    \"solved_tickets\": 12\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"solved_tickets\": 4\n  }\n}\n</code></pre>\n<p>Shows the number of the tickets solved during the specified period.</p>\n<h4 id=\"optional-arguments-14\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"tickets-resolution-time\">Tickets resolution time</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/resolution_time\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/resolution_time?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"count\": 3,\n    \"hours\": 16.27\n  },\n  \"2014-01-11\": {\n    \"count\": 0,\n    \"hours\": null\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"count\": 2,\n    \"hours\": 1.8\n  }\n}\n</code></pre>\n<p>Shows the resolution time of the tickets that were solved during the specified period.</p>\n<h4 id=\"optional-arguments-15\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>Two parameters are returned:</p>\n<ul>\n<li><code>count</code> – the number of tickets that were responded to for the first time that day.</li>\n<li><code>hours</code> – the average first response time of the tickets. For example, <code>\"hours\": 0.83</code> means an average first response time of 49mins 48sec.</li>\n</ul>\n<h2 id=\"ticket-sources\">Ticket sources</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ticket_sources\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ticket_sources?\\\ndate_from=2014-01-10&amp;\\\ndate_to=2014-01-20\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2014-01-10\": {\n    \"tickets_from_chat_window\": 4,\n    \"tickets_from_mail\": 12,\n    \"tickets_from_chat\": 2\n  },\n  \"2014-01-11\": {\n    \"tickets_from_chat_window\": 7,\n    \"tickets_from_mail\": 8,\n    \"tickets_from_chat\": 6\n  },\n  //(...)\n  \"2014-01-20\": {\n    \"tickets_from_chat_window\": 0,\n    \"tickets_from_mail\": 16,\n    \"tickets_from_chat\": 1\n  }\n}\n</code></pre>\n<p>Shows the distribution of the tickets between various channels.</p>\n<h4 id=\"optional-arguments-16\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><p>The following parameters are returned for each date:</p>\n<ul>\n<li><code>tickets_from_chat_window</code> – the number of tickets created by the visitor via the ticket form,</li>\n<li><code>tickets_from_mail</code> – the number of tickets created by sending an email to your support email tied to LiveChat,</li>\n<li><code>tickets_from_chat</code> – the number of tickets created by the agents during a chat.</li>\n</ul>\n<h2 id=\"ticket-ratings-report\">Ticket ratings report</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ratings\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ratings?\\\ngroup=2&amp;\\\ndate_from=2012-01-29&amp;\\\ndate_to=2013-01-29&amp;\\\ngroup_by=month\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"2012-01\": {\n    \"begin\": \"2012-01-29\",\n    \"end\": \"2012-01-31\",\n    \"bad\": 0,\n    \"good\": 6\n  },\n  \"2012-02\": {\n    \"begin\": \"2012-02-01\",\n    \"end\": \"2012-02-29\",\n    \"bad\": 4,\n    \"good\": 38\n  },\n  \"2012-03\": {\n    \"begin\": \"2012-03-01\",\n    \"end\": \"2012-03-31\",\n    \"bad\": 0,\n    \"good\": 16\n  },\n  //(...) \n  \"2012-11\": {\n    \"begin\": \"2012-11-01\",\n    \"end\": \"2012-11-30\",\n    \"bad\": 20,\n    \"good\": 49\n  },\n  \"2012-12\": {\n    \"begin\": \"2012-12-01\",\n    \"end\": \"2012-12-31\",\n    \"bad\": 22,\n    \"good\": 35\n  },\n  \"2013-01\": {\n    \"begin\": \"2013-01-01\",\n    \"end\": \"2013-01-29\",\n    \"bad\": 18,\n    \"good\": 51\n  }\n}\n</code></pre>\n<p>Shows the tickets that were rated during the specified period.</p>\n<h4 id=\"optional-arguments-17\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>timezone</code></td>\n<td>timezone in the <a href=\"http://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">TZ format</a> (e.g. America/Phoenix)</td>\n</tr>\n<tr>\n<td><code>agent</code></td>\n<td>agent's login, not set by default, return statistics for the specified agent</td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>group_by</code></td>\n<td>defaults to <code>day</code> (or <code>hour</code> when date_from equals date_to), can be set to <code>month</code>, <code>hour</code> or <code>day</code></td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"ticket-ranking\">Ticket Ranking</h2>\n<blockquote>\n<p>Path</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://api.livechatinc.com/reports/tickets/ratings/ranking\n</code></pre><blockquote>\n<p>Sample request</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-shell\">curl \"https://api.livechatinc.com/reports/tickets/ratings/ranking\" \\\n  -u john.doe@mycompany.com:c14b85863755158d7aa5cc4ba17f61cb \\\n  -H X-API-Version:2\n</code></pre>\n<blockquote>\n<p>Sample response</p>\n</blockquote>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ranking\": [\n    {\n      \"good\": 2502,\n      \"bad\": 426,\n      \"total\": 2928,\n      \"score\": 0.8361489669658251,\n      \"name\": \"john.doe@mycompany.com\"\n    },\n    {\n      \"good\": 2164,\n      \"bad\": 443,\n      \"total\": 2607,\n      \"score\": 0.8094273999034496,\n      \"name\": \"jane.doe@mycompany.com\"\n    },\n    {\n      \"good\": 1070,\n      \"bad\": 215,\n      \"total\": 1285,\n      \"score\": 0.8029689181922964,\n      \"name\": \"jenny.doe@mycompany.com\"\n    }\n}\n</code></pre>\n<p>Shows the ratio of good to bad ratings for each operator.</p>\n<h4 id=\"optional-arguments-18\">Optional arguments</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Argument</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>the beginning of time</code></td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td><code>YYYY-MM-DD</code>, defaults to <code>today</code></td>\n</tr>\n<tr>\n<td><code>group</code></td>\n<td>id of the group, not set by default, returns statistics for the specified group</td>\n</tr>\n<tr>\n<td><code>tag[]</code></td>\n<td>return statistics for the specified tag</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"78ad10a0-7df4-4b50-9336-184f03b9186b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e750e281-99ef-422a-a69e-6d6d103f5de5","type":"text/javascript","exec":[""]}}],"_postman_id":"a0a92746-f8d3-4b33-bed5-6b119aa32944","auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":true,"source":{"_postman_id":"d5a15944-9c25-4f8d-b3e1-d834cfc267ed","id":"d5a15944-9c25-4f8d-b3e1-d834cfc267ed","name":"LiveChat Reports API v2","type":"collection"}}}],"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]}},"event":[{"listen":"prerequest","script":{"id":"ae200931-46a3-4ed0-bb4a-93fff8390fcd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"99230b77-7d51-4dc3-b95a-8ce3db4387f0","type":"text/javascript","exec":[""]}}]}