{"info":{"_postman_id":"9a749511-38cc-49e3-9bae-01a95285141e","name":"V2 Gobrax Public Statistics API","description":"<html><head></head><body><h3 id=\"authentication\">Authentication</h3>\n<p>A verificação de segurança é feita em toda requisição através do token de API.</p>\n<p>O token deve estar presente em todas as requisições.</p>\n<p>O token será fornecido pela Gobrax após a assinatura de contrato de uso da API, mande um email para <a href=\"https://mailto:suporte@gobrax.com.br\">suporte@gobrax.com.br</a> tanto para criação quanto para manutenção do seu token.</p>\n<p>O token de segurança deve estar presente no header (cabeçalho) das requisições e seguir o padrão, como no exemplo abaixo sem as aspas ou espaços antes ou depois:</p>\n<blockquote>\n<p>Authorization: Bearer your-token-here</p>\n</blockquote>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"27100945","collectionId":"9a749511-38cc-49e3-9bae-01a95285141e","publishedId":"2s93eU4FGF","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-05-02T23:09:01.000Z"},"item":[{"name":"Vehicles Statistics","id":"7720009c-e46d-4830-8e67-95b30e1d2d47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-02-10 00:00:00&endDate=2021-02-10 23:59:59&vehicleIdentification=","description":"<h3 id=\"vehicle-statistics\">Vehicle Statistics</h3>\n<p>Vehicle statistic represents basic statistics computed for a tracked vehicle in the requested period.</p>\n<p>When <code>vehicleIdentification</code> is informed, only that vehicle is returned. When it is omitted, the response contains one record for each vehicle of the customer with an active device in the period.</p>\n<p>Dates can be sent in format <em>YYYY-MM-DD HH:MM:SS</em> (<strong>expressed in UTC</strong>) or <em>YYYY-MM-DDTHH:MM:SS±hhmm</em> (with the UTC offset, e.g. <code>2021-12-12T00:00:00-0300</code>).</p>\n<p>The following data is available for every record:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>vehicleIdentification</td>\n<td>string</td>\n<td>Plate of the vehicle present on our systems.</td>\n</tr>\n<tr>\n<td>startDate</td>\n<td>string</td>\n<td>The start date time of the record in format <em>YYYY-MM-DDTHH:MM:SS±hhmm</em>  <br />When the request date has no offset, it is returned in UTC (<code>+0000</code>).</td>\n</tr>\n<tr>\n<td>endDate</td>\n<td>string</td>\n<td>The end date time of the record in format <em>YYYY-MM-DDTHH:MM:SS±hhmm</em>  <br />When the request date has no offset, it is returned in UTC (<code>+0000</code>).</td>\n</tr>\n<tr>\n<td>averageSpeed</td>\n<td>float</td>\n<td>The average speed in the analysis period.  <br /><strong>The speed is expressed in kilometers per hour (Km/h)</strong>.</td>\n</tr>\n<tr>\n<td>consumptionAverage</td>\n<td>float</td>\n<td>The average fuel consumption in the analysis period.  <br /><strong>The consumption is expressed in kilometers per liter (Km/L)</strong>.</td>\n</tr>\n<tr>\n<td>odometer</td>\n<td>float</td>\n<td>The odometer of the vehicle in the analysis period.  <br /><strong>The odometer is expressed in kilometers (Km)</strong>.</td>\n</tr>\n<tr>\n<td>totalConsumption</td>\n<td>float</td>\n<td>The total fuel consumed in the analysis period.  <br /><strong>The consumption is expressed in liters (L)</strong>.</td>\n</tr>\n<tr>\n<td>totalBreakingOnHighSpeed</td>\n<td>float</td>\n<td>The number of brakings at high speed in the analysis period.</td>\n</tr>\n<tr>\n<td>totalBreaking</td>\n<td>float</td>\n<td>The total number of brakings in the analysis period.</td>\n</tr>\n<tr>\n<td>totalMileage</td>\n<td>float</td>\n<td>The distance traveled in the analysis period.  <br /><strong>The distance is expressed in kilometers (Km)</strong>.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Values are rounded to 2 decimal places, except <code>odometer</code>. Unavailable values are returned as <code>0</code>.</p>\n<h3 id=\"errors\">Errors</h3>\n<p>An invalid token returns <code>400 Bad Request</code> with code <code>61</code>. Other failures (missing token, missing or invalid dates, vehicle not found, API not enabled for the customer or no vehicle with an active device in the period) return <code>400 Bad Request</code> with an empty body (<code>{}</code>).</p>\n<p>A vehicle with an active device but no data in the period is returned with values <code>0</code>.</p>\n","urlObject":{"protocol":"https","port":"8889","path":["api","v1","vehicle-statistics"],"host":["gateway-v3","gobrax","com","br"],"query":[{"description":{"content":"<p>(required) The start date time of the statistic in format YYYY-MM-DD HH:MM:SS (expressed in UTC) or YYYY-MM-DDTHH:MM:SS±hhmm (with UTC offset, e.g. 2021-12-12T00:00:00-0300). A + sign in the offset must be URL-encoded as %2B.</p>\n","type":"text/plain"},"key":"startDate","value":"2021-02-10 00:00:00"},{"description":{"content":"<p>(required) The end date time of the statistic in format YYYY-MM-DD HH:MM:SS (expressed in UTC) or YYYY-MM-DDTHH:MM:SS±hhmm (with UTC offset, e.g. 2021-12-12T00:00:00-0300). A + sign in the offset must be URL-encoded as %2B.</p>\n","type":"text/plain"},"key":"endDate","value":"2021-02-10 23:59:59"},{"description":{"content":"<p>(optional) Plate of the vehicle present on our systems. When omitted, all vehicles of the customer with an active device in the period are returned.</p>\n","type":"text/plain"},"key":"vehicleIdentification","value":""}],"variable":[]}},"response":[{"id":"88bd9548-9a15-4722-b1fc-6f25d133cfe3","name":"OK - Vehicle Statistics successfully retrieved for all vehicles","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-12 00:00:00&endDate=2021-12-12 15:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-12 00:00:00"},{"key":"endDate","value":"2021-12-12 15:00:00"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"records\": [\n        {\n            \"vehicleIdentification\": \"ABC1234\",\n            \"startDate\": \"2021-12-12T00:00:00+0000\",\n            \"endDate\": \"2021-12-12T15:00:00+0000\",\n            \"averageSpeed\": 62.45,\n            \"consumptionAverage\": 3.28,\n            \"odometer\": 291862.215,\n            \"totalConsumption\": 85.4,\n            \"totalBreakingOnHighSpeed\": 2,\n            \"totalBreaking\": 8,\n            \"totalMileage\": 280.15\n        },\n        {\n            \"vehicleIdentification\": \"DDD4444\",\n            \"startDate\": \"2021-12-12T00:00:00+0000\",\n            \"endDate\": \"2021-12-12T15:00:00+0000\",\n            \"averageSpeed\": 55.1,\n            \"consumptionAverage\": 3.5,\n            \"odometer\": 311202.11,\n            \"totalConsumption\": 61.2,\n            \"totalBreakingOnHighSpeed\": 1,\n            \"totalBreaking\": 5,\n            \"totalMileage\": 214.2\n        }\n    ]\n}"},{"id":"8285e55b-8df7-4d45-8068-a55b1d865b39","name":"OK - Vehicle Statistics successfully retrieved for a specific vehicle","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-12 00:00:00&endDate=2021-12-12 15:00:00&vehicleIdentification=ABC1234","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-12 00:00:00"},{"key":"endDate","value":"2021-12-12 15:00:00"},{"key":"vehicleIdentification","value":"ABC1234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"records\": [\n        {\n            \"vehicleIdentification\": \"ABC1234\",\n            \"startDate\": \"2021-12-12T00:00:00+0000\",\n            \"endDate\": \"2021-12-12T15:00:00+0000\",\n            \"averageSpeed\": 62.45,\n            \"consumptionAverage\": 3.28,\n            \"odometer\": 291862.215,\n            \"totalConsumption\": 85.4,\n            \"totalBreakingOnHighSpeed\": 2,\n            \"totalBreaking\": 8,\n            \"totalMileage\": 280.15\n        }\n    ]\n}"},{"id":"262d0106-d9a4-46df-9a3e-fa988a665c2c","name":"OK - Vehicle Statistics successfully retrieved using dates with UTC offset","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-12T00:00:00-0300&endDate=2021-12-12T15:00:00-0300&vehicleIdentification=ABC1234","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-12T00:00:00-0300"},{"key":"endDate","value":"2021-12-12T15:00:00-0300"},{"key":"vehicleIdentification","value":"ABC1234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"records\": [\n        {\n            \"vehicleIdentification\": \"ABC1234\",\n            \"startDate\": \"2021-12-12T00:00:00-0300\",\n            \"endDate\": \"2021-12-12T15:00:00-0300\",\n            \"averageSpeed\": 61.87,\n            \"consumptionAverage\": 3.31,\n            \"odometer\": 291901.482,\n            \"totalConsumption\": 88.1,\n            \"totalBreakingOnHighSpeed\": 2,\n            \"totalBreaking\": 9,\n            \"totalMileage\": 291.6\n        }\n    ]\n}"},{"id":"981bcc27-aaf2-4ab9-9cd4-0839b5dacab7","name":"Bad Request - Failed to get Vehicle statistics due invalid token","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-12 00:00:00&endDate=2021-12-12 15:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-12 00:00:00"},{"key":"endDate","value":"2021-12-12 15:00:00"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 61,\n    \"description\": \"Token inválido\",\n    \"reference\": \"https://documenter.getpostman.com/view/17914053/2s83zjt3pC\"\n}"},{"id":"dc499408-4fd7-40ba-abf6-1f961aecd8a9","name":"Bad Request - Failed to get Vehicle statistics due missing token","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-12 00:00:00&endDate=2021-12-12 15:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-12 00:00:00"},{"key":"endDate","value":"2021-12-12 15:00:00"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{}"},{"id":"d4da721c-76cc-4927-bbdc-fd9b8d0f8ca1","name":"Bad Request - Failed to get Vehicle statistics due missing vehicle","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-10 00:00:00&endDate=2021-12-10 20:00:00&vehicleIdentification=NONE1","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-10 00:00:00"},{"key":"endDate","value":"2021-12-10 20:00:00"},{"key":"vehicleIdentification","value":"NONE1"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{}"},{"id":"4c138732-48e4-4087-bc43-341f1085929b","name":"Bad Request - Failed to get Vehicle statistics due missing start date","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?endDate=2021-12-15 12:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"endDate","value":"2021-12-15 12:00:00"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{}"},{"id":"11d80ef0-8d64-410a-9a97-30ae9b72ff76","name":"Bad Request - Failed to get Vehicle statistics due missing end date","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=2021-12-15 12:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"2021-12-15 12:00:00"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{}"},{"id":"256b9482-9242-43c1-8259-0f0ed9e69770","name":"Bad Request - Failed to get Vehicle statistics due invalid date format","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://gateway-v3.gobrax.com.br:8889/api/v1/vehicle-statistics?startDate=15/12/2021 00:00:00&endDate=15/12/2021 12:00:00","protocol":"https","host":["gateway-v3","gobrax","com","br"],"port":"8889","path":["api","v1","vehicle-statistics"],"query":[{"key":"startDate","value":"15/12/2021 00:00:00"},{"key":"endDate","value":"15/12/2021 12:00:00"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"7720009c-e46d-4830-8e67-95b30e1d2d47"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"71072dd3-7e2c-4833-bd31-a28589c39275","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"62b628a0-393f-4ead-a787-12f5e0c0034f","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"token","value":""}]}