{"info":{"_postman_id":"e408c819-96e6-4241-bdc6-5f14db26f856","name":"Public API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"238826","collectionId":"e408c819-96e6-4241-bdc6-5f14db26f856","publishedId":"2s8ZDbW1Gf","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2023-01-27T17:52:56.000Z"},"item":[{"name":"v2 public API","item":[{"name":"Get user access CODE","id":"b0356009-9296-4a47-96c7-f1adf403a515","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer b5de32bf603482d51ff942f0cc1284025a5469e2e8813c54b80682b7212c8b79"}],"url":"{{SERVER}}/oauth/authorize?response_type=code&client_id=26dd4dd2c221dabfa3656cfa40ef0d703708aa656583cf79d8825c2a8cb30006&redirect_uri=urn:ietf:wg:oauth:2.0:oob","description":"<h2 id=\"authentication\"><strong>AUTHENTICATION</strong></h2>\n<p>FitBark API uses the OAuth 2.0 protocol to authenticate incoming requests. A <code>client_id</code> and <code>client_secret</code> are assigned to each application created by a Developer. The Developer can then request authorization from the user to access user’s data and obtain an Access Token, which will be used for further requests. This token will have an extended expiration time, and the Developer can store the token and use it for multiple calls. To make calls on behalf of the user, the Developer needs to get explicit permission from the user via a 3-legged authentication mechanism.</p>\n<p><strong>Step 1</strong></p>\n<p>User is redirected to the authentication page (GET<code>https://app.fitbark.com/oauth/authorize)</code> passing:</p>\n<ul>\n<li><code>response_type=code:</code> must have the value “client_credentials” to obtain the authorization code</li>\n<li><code>client_id:</code> unique identifier obtained from the developer portal</li>\n<li><code>redirect_uri:</code> URI where to redirect the user after he/she grants permissions. This URI must match one of the URI prefixes defined when setting up API access</li>\n</ul>\n<p><strong>Step 2</strong></p>\n<p>If the user is not logged in, then he/she will be asked to enter their user and password. After the user logs in, he’ll see the list of permissions being asked, and needs to accept the request.</p>\n<p><strong>Step 3</strong></p>\n<p>If the user accepts, then he/she is redirected back to the Developer’s site, using the redirect_uri, and passing the authorization code in the query parameter. For example:<code>http://your_web.com/access?code=ABC123/</code>. This authorization code has an expiration of 10 minutes.</p>\n<p><strong>Step 4</strong></p>\n<p>Last step, is for the Developer to exchange the authorization code with an access token. To this extent, the Developer must make an HTTP call (server to server) to obtain the access token (POST<code>https://app.fitbark.com/oauth/token</code>) passing:</p>\n<ul>\n<li><code>client_id</code>: unique identifier obtained from the dev portal</li>\n<li><code>client_secret</code>: secret key obtained from the dev portal</li>\n<li><code>grant_type=authorization_code</code>: must have the value “authorization_code” to exchange the token</li>\n<li><code>redirect_uri</code>: URI where to redirect the user after he/she grants permissions. This URI must match one of the URI prefixes defined when setting up API access</li>\n<li><code>code</code>: the authorization code sent by FitBark on the previous step</li>\n</ul>\n<p><strong>Step 5</strong></p>\n<p>The server will return a JSON object with the access token. This token will have an expiration of 1 year. It will also return a refresh token used to request a new access token for the user when the current access token issued expires.</p>\n<p><strong>Step 6</strong></p>\n<p>With the access token, the Developer can make API calls on behalf of the user, by passing the code in the Authorization: Bearer header.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">GET /api/user HTTP/1.1\nHost: app.fitbark.com\nAuthorization: Bearer DCEOB729f3i5CuLCyZCkX_5slG_fpc1IhNqf0FnfK_YDmmc7bZ\n\n</code></pre>\n","urlObject":{"path":["oauth","authorize"],"host":["{{SERVER}}"],"query":[{"key":"response_type","value":"code"},{"key":"client_id","value":"26dd4dd2c221dabfa3656cfa40ef0d703708aa656583cf79d8825c2a8cb30006"},{"key":"redirect_uri","value":"urn:ietf:wg:oauth:2.0:oob"}],"variable":[]}},"response":[],"_postman_id":"b0356009-9296-4a47-96c7-f1adf403a515"},{"name":"ClientCredentials","event":[{"listen":"test","script":{"id":"bcf0c1ad-0ad7-4a31-b7a7-9da166d066a0","exec":["","",""],"type":"text/javascript"}}],"id":"347a18d4-7818-4bc3-ac93-5c37e3b54809","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"client_credentials\",\n    \"client_id\": \"987aaac7357c7992aedb8619cebe72ebe742382589756753fe7ee379688b7a2e\",\n    \"client_secret\": \"fc588ecd306627eb64dac2d9f2cf74ae8bc4434d746d0de1d119ba486dfb0c62\",\n    \"scope\" :\"fitbark_open_api_2745H78RVS\"\n}"},"url":"{{SERVER}}/oauth/token","urlObject":{"path":["oauth","token"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"347a18d4-7818-4bc3-ac93-5c37e3b54809"},{"name":"oauth/token","event":[{"listen":"test","script":{"id":"bcf0c1ad-0ad7-4a31-b7a7-9da166d066a0","exec":["","",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"29bca86c-4a80-40d8-a6ef-1e45e5d0fe34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"authorization_code\",\n    \"client_id\": \"get it from the email\",\n    \"client_secret\": \"get it from the email\",\n    \"scope\" :\"fitbark_open_api_2745H78RVS\"\n    \"code\" : \"get if from oauth/authorize api\"\n}"},"url":"{{SERVER}}/oauth/token","urlObject":{"path":["oauth","token"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"29bca86c-4a80-40d8-a6ef-1e45e5d0fe34"},{"name":"callback urls","id":"5206cf9f-8cd0-4753-bf13-2f14f6699a04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{OPEN API TOKEN}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"redirect_uri\":\"urn:ietf:wg:oauth:2.0:oob\\rhttp://weeelcome.com/auth\\rsomething://\"\n}"},"url":"{{SERVER}}/api/v2/redirect_urls","description":"<h2 id=\"setting-oauth-20-redirect-uris-via-api\"><strong>SETTING OAUTH 2.0 REDIRECT URI'S VIA API</strong></h2>\n<p>All callbacks to the developers API for user authentification must have a registered redirect URI as specified by the OAuth 2 specification. The developer can set the redirect URI via the FitBark API.</p>\n<p>The process to set the URI’s is below:</p>\n<p><strong>Step 1</strong></p>\n<p>Get your client access token using oauth and request the <strong>fitbark_open_api_2745H78RVS</strong> scope</p>\n<p><strong>Curl</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">curl -X POST -H \"Content-Type: application/json\" -H \"Cache-Control: no-cache\" -d '{\n\"grant_type\": \"client_credentials\",\n\"client_id\": \"\",\n\"client_secret\": \"\",\n\"scope\" :\"fitbark_open_api_2745H78RVS\"\n}' \"https://app.fitbark.com/oauth/token\"\n\n</code></pre>\n<p><strong>Response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"access_token\": \"db73736bc5713e986415fd22345678e2a1f0d8f84eefee3d78515b643db329c341679\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 31557600,\n  \"scope\": \"fitbark_open_api_2745H78RVS\"\n}\n\n</code></pre>\n<p><strong>Step 2</strong></p>\n<p>Call API to read current redirect URI’s</p>\n<p><strong>Curl</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">curl -X GET -H \"Authorization: Bearer \" \"https://app.fitbark.com/api/v2/redirect_urls\"\n\n</code></pre>\n<p><strong>Response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\"redirect_uri\": \"urn:ietf:wg:oauth:2.0:oob\" }\n\n</code></pre>\n<p>Note that there can be multiple redirect URI’s, each one is separated by ‘\\r”</p>\n<p><strong>Step 3</strong></p>\n<p>Create a string that is the new redirect URI’s and post it via the fitBark API<br /><strong>Curl</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">curl -X POST -H \"Authorization: Bearer \" -H \"Content-Type: application/json\" -d '{\n   \"redirect_uri\":\"urn:ietf:wg:oauth:2.0:oob\\rhttp://wellcome.com/auth\\rhttp://another.com/auth://\"\n}' \"https://app.fitbark.com/api/v2/redirect_urls\"\n\n</code></pre>\n","urlObject":{"path":["api","v2","redirect_urls"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5206cf9f-8cd0-4753-bf13-2f14f6699a04"},{"name":"callback_urls","id":"d0e7fe4c-34c2-456e-bb57-1355e0e730f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{OPEN API TOKEN}}"}],"url":"{{SERVER}}/api/v2/redirect_urls","urlObject":{"path":["api","v2","redirect_urls"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0e7fe4c-34c2-456e-bb57-1355e0e730f3"},{"name":"Daily Goal","id":"c39833a7-9ea5-4a53-982b-e4d7a690a049","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{USER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/daily_goal/{dog_slug}","description":"<h2 id=\"get-daily-goal\"><strong>GET DAILY GOAL</strong></h2>\n<p>Get a dog’s current daily goal and future daily goals set by an authorized user (if any).</p>\n<ul>\n<li><p>Access: Read</p>\n</li>\n<li><p>URL: <a href=\"https://app.fitbark.com/api/v2/daily_goal/%7Bdog_slug%7D\">https://app.fitbark.com/api/v2/daily_goal/{dog_slug}</a></p>\n</li>\n<li><p>HTTP Method: GET</p>\n</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>dog_slug</code></li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n     \"daily_goals\":[\n             {\n                  \"goal\": 3000,\n                  \"date\" : \"2014-08-15\"\n              },{\n                  \"goal\": 4000,\n                  \"date\" : \"2014-08-20\" /* previous daily goal of 3000 applies until 2014-08-19 */\n              },{\n                  \"goal\": 4500,\n                  \"date\" : \"2014-09-15\" /* previous daily goal of 4000 applies until 2014-09-14 */\n              },\n              ...\n              ]\n }\n\n</code></pre>\n","urlObject":{"path":["api","v2","daily_goal","{dog_slug}"],"host":["{{SERVER}}"],"query":[{"disabled":true,"key":null,"value":""}],"variable":[]}},"response":[],"_postman_id":"c39833a7-9ea5-4a53-982b-e4d7a690a049"},{"name":"User Info","id":"2bd5fda2-8131-47a1-8f25-6f3a8efc3390","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{BEARER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/user","description":"<h2 id=\"get-user-info\"><strong>GET USER INFO</strong></h2>\n<p>Get various information about the specified user including name, username (email address), profile picture and Facebook ID.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/user\">https://app.fitbark.com/api/v2/user</a></li>\n<li>HTTP Method: GET</li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user\": {\n        \"slug\": \"a0a19044-3fca-40ad-a2d2-8670cffebfa0\",\n        \"username\": \"pippo@pippo.com\",\n        \"name\": \"Pippo Pippone\",\n        \"first_name\": \"Pippo\",\n        \"last_name\": \"Pippone\",\n    \"picture_hash\":12fd1a0f04b7b9285c4e91b73617f809\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["api","v2","user"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2bd5fda2-8131-47a1-8f25-6f3a8efc3390"},{"name":"Get Dog Related Users","id":"11abb19e-31e6-4934-b3b2-0ec6d42bfa6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{BEARER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/user_relations/{dog_slug}","description":"<h2 id=\"get-dog-related-users\"><strong>GET DOG RELATED USERS</strong></h2>\n<p>Get a list of users currently associated with a specified dog, together with the type of relationship (Owner or Friend) and privacy settings for each user (how far back in time the activity data is visible).</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/user_relations/%7Bdog_slug%7D\">https://app.fitbark.com/api/v2/user_relations/{dog_slug}</a></li>\n<li>HTTP Method: GET</li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user_relations\": [\n        {\n            \"id\": 11,\n            \"date\": \"2014-08-15T19:59:16.000Z\",\n            \"dog_slug\": \"a0a19044-3fca-40ad-a2d2-8670cffebfa0\",\n            \"status\": \"OWNER\",\n            \"user\": {\n                \"slug\": \"ad7c7166-4cf5-4284-aa56-2cf4df305b31\",\n                \"username\": \"owner@mail.com\",\n                \"name\": \"John Tomas\",\n                \"first_name\": \"John\",\n                \"last_name\": \"Tomas\"\n            }\n        },\n        {\n            \"id\": 28,\n            \"date\": \"2014-08-28T15:27:56.000Z\",\n            \"dog_slug\": \"ad7c7166-4cf5-4284-aa56-2cf4df305b31\",\n            \"status\": \"FRIEND\",\n            \"user\": {\n                \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n                \"username\": \"e@g.com\",\n                \"name\": \"Emi Garcia\",\n                \"first_name\": \"Emi\",\n                \"last_name\": \"Garcia\"\n            }\n        }\n    ]\n}\n</code></pre>\n","urlObject":{"path":["api","v2","user_relations","{dog_slug}"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"11abb19e-31e6-4934-b3b2-0ec6d42bfa6f"},{"name":"Get Activity Series","id":"7cde488a-ff03-4401-9658-207f7531a6ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{BEARER_TOKEN}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"activity_series\":{\n           \"slug\":{dog_slug},\n           \"from\":\"2026-03-09\",\n           \"to\":\"2026-03-11\",\n           \"resolution\":\"DAILY\"\n   }\n}"},"url":"{{SERVER}}/api/v2/activity_series","description":"<h2 id=\"get-activity-series\"><strong>GET ACTIVITY SERIES</strong></h2>\n<p>Get historical series data between two specified date times.<br />The maximum range is 42 days with daily resolution, and 7 days with hourly resolution.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/activity_series\">https://app.fitbark.com/api/v2/activity_series</a></li>\n<li>HTTP Method: POST</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li>slug</li>\n<li><code>from</code></li>\n<li><code>to</code></li>\n<li>resolution (<code>DAILY</code> or <code>HOURLY</code>)</li>\n</ul>\n<p><strong>Request example 1</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_series\":{\n        \"slug\":\"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n        \"from\":\"2013-03-02\",\n        \"to\":\"2014-09-02\",\n        \"resolution\":\"DAILY\"\n    }\n}\n</code></pre>\n<p><strong>Response example 1</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_series\": {\n        \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n        \"records\": [  \n         {\n             \"date\": \"2014-12-27\",\n             \"activity_value\": 921,\n             \"min_play\": 15,\n             \"min_active\": 125,\n             \"min_rest\": 1300,\n             \"daily_target\": 5000,\n             \"has_trophy\": 0\n             }, \n             {\n             \"date\": \"2014-12-28\",\n             \"activity_value\": 5421,\n             \"min_play\": 114,\n             \"min_active\": 484,\n             \"min_rest\": 838,\n             \"daily_target\": 5000,\n             \"has_trophy\": 1\n             }\n             ...\n             ]\n      }\n}\n</code></pre>\n<p><strong>Request example 2</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_series\":{\n        \"slug\":\"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n        \"from\":\"2013-03-02\",\n        \"to\":\"2014-09-02\",\n        \"resolution\":\"HOURLY\"\n    }\n}\n</code></pre>\n<p><strong>Response example 2</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_series\": {\n        \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n        \"records\": [\n            {\n                \"date\": \"2014-08-15 15:00:00\",\n                \"activity_value\": 1204,\n                \"min_play\": 11,\n                \"min_active\": 37,\n                \"min_rest\": 12\n            },\n            {\n                \"date\": \"2014-08-15 16:00:00\",\n                \"activity_value\": 513,\n                \"min_play\": 3,\n                \"min_active\": 16,\n                \"min_rest\": 41\n            },\n            {\n                \"date\": \"2014-08-18 17:00:00\",\n                \"activity_value\": 1759,\n                \"min_play\": 5,\n                \"min_active\": 29,\n                \"min_rest\": 26\n            }\n            ...\n            ]\n      }\n}\n</code></pre>\n","urlObject":{"path":["api","v2","activity_series"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7cde488a-ff03-4401-9658-207f7531a6ee"},{"name":"Get User Picture","id":"f9277ee5-90fd-4448-b124-3fcd001ce15c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{BEARER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/picture/user/1f792535-b54e-4e3f-9c0f-b991328d4680","description":"<h2 id=\"get-user-picture\"><strong>GET USER PICTURE</strong></h2>\n<p>Get the Base64 encoded picture for a specified user.<br />Images can only be accessed if the authenticated user is an existing owner, friend or veterinarian of a dog related to the user being queried.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/picture/user/%7Buser_slug%7D\">https://app.fitbark.com/api/v2/picture/user/{user_slug}</a></li>\n<li>HTTP Method: GET</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>user_slug</code></li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"image\": {\n             \"data\": \"9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4w ICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTUK/9sAQwACAQEB AQECAQEBAgICAgIEAwICAgIFBAQDBAYFBgYGBQYGBgcJCAYHCQcGBggLCAkK CgoKCgYICwwLCgwJCgoK/9sAQwECAgICAgIFAwMFCgcGBwoKCgoKCgoKCgoK CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK/8AAEQgE cAKAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkK C//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGh CCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNE. . .RUZHSElKU1RV\"\n            }\n}\n\n</code></pre>\n","urlObject":{"path":["api","v2","picture","user","1f792535-b54e-4e3f-9c0f-b991328d4680"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f9277ee5-90fd-4448-b124-3fcd001ce15c"},{"name":"Get Public User Picture","id":"dba03fba-0f3b-48c1-953f-98d4d3e3a097","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{SERVER}}/api/v2/public_picture_user/{dog_slug}.jpg","urlObject":{"path":["api","v2","public_picture_user","{dog_slug}.jpg"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"dba03fba-0f3b-48c1-953f-98d4d3e3a097"},{"name":"Get Users Releated Dogs","id":"255f0331-3a0d-4747-9200-74c777fc6043","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{USER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/dog_relations","description":"<h2 id=\"get-user-related-dogs\"><strong>GET USER RELATED DOGS</strong></h2>\n<p>Get the dogs related to the user.</p>\n<ul>\n<li><p>Access: Read</p>\n</li>\n<li><p>URL: <a href=\"https://app.fitbark.com/api/v2/dog_relations\">https://app.fitbark.com/api/v2/dog_relations</a></p>\n</li>\n<li><p>HTTP Method: GET</p>\n</li>\n</ul>\n<p><strong>Response fields</strong></p>\n<ul>\n<li><p><code>date</code> is the time of creation of the relationship with the dog (expressed in GMT)</p>\n</li>\n<li><p><code>activity_date</code> is the last sync time for the dog (expressed in the dog’s local time)</p>\n</li>\n<li><p><code>last_min_time</code> is the time of the last valid minute available in the server</p>\n</li>\n<li><p><code>last_min_activity</code> is the value of the last minute available in the server</p>\n</li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"dog_relations\": [\n        {\n            \"id\": 13,\n            \"status\": \"OWNER\",\n            \"date\": \"2014-08-19T20:23:52.000Z\",\n            \"dog\": {\n                \"slug\": \"ad7c7166-4cf5-4284-aa56-2cf4df305b31\",\n                \"name\": \"Barley\",\n                \"bluetooth_id\": \"c2bc4ee2809939c3\",\n                \"activity_value\": 1433,\n                \"activity_date\": \"2014-08-30T08:19:50.000Z\",\n                \"birth\": \"2012-10-30\",\n                \"breed1\": {\n                    \"id\": 16,\n                    \"name\": \"BEAGLE\"\n                },\n                \"breed2\": {\n                    \"id\": 15,\n                    \"name\": \"BASSET HOUND\"\n                },\n                \"gender\": \"M\",\n                \"weight\": 41,\n                \"weight_unit\": \"lbs\",\n                \"country\": \"US\",\n                \"zip\": \"64152\",\n                \"tzoffset\": -18000,\n                \"tzname\":\"America/Chicago\",\n                \"min_play\": 99,\n                \"min_active\": 200,\n                \"min_rest\": 500,\n                \"medical_conditions\": [\n                    {\n                        \"id\": 7,\n                        \"name\": \"Overweight\"\n                      }\n                ],\n                \"hourly_average\": 101,\n                \"picture_hash\": \"515d59679a9024ba31e7e9b6103618a5\",\n                \"neutered\": false,\n                \"last_min_time\": \"2014-08-30T08:19:00.000Z\",\n                \"last_min_activity\": 33,\n                \"daily_goal\": 8000,\n                \"battery_level\": 100\n            }\n        },\n        {\n            \"id\": 28,\n            \"status\": \"FRIEND\",\n            \"date\": \"2014-08-28T15:27:56.000Z\",\n            \"dog\": {\n                \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n                \"name\": \"Bongo\",\n                \"bluetooth_id\": \"c39b49e2809939c3\",\n                \"activity_value\": 0,\n                \"activity_date\": \"2014-08-19T15:23:52.000Z\",\n                \"birth\": \"2012-12-12\",\n                \"breed1\": {\n                    \"id\": 16,\n                    \"name\": \"BEAGLE\"\n                },\n                \"breed2\": { },\n                \"gender\": \"F\",\n                \"weight\": 40,\n                \"weight_unit\": \"lbs\",\n                \"country\": \"US\",\n                \"zip\": \"3423\",\n                \"notes\": \"test\",\n                \"tzoffset\": -10800,\n                \"tzname\":\"America/Chicago\",\n                \"min_play\": 103,\n                \"min_active\": 300,\n                \"min_rest\": 700,\n                \"medical_conditions\": [ ],\n                \"hourly_average\": 0,\n                \"picture_hash\": \"\",\n                \"neutered\": false,\n                \"last_min_time\": null,\n                \"last_min_activity\": null,\n                \"daily_goal\": 6000,\n                \"battery_level\": 86\n            }\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"path":["api","v2","dog_relations"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"255f0331-3a0d-4747-9200-74c777fc6043"},{"name":"Get Dog Picture","id":"13e10692-24ff-4a80-8601-e6dad1cbe658","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{USER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/picture/dog/{dog_slug}","description":"<h2 id=\"get-dog-picture\"><strong>GET DOG PICTURE</strong></h2>\n<p>Get the Base64 encoded picture for a specified dog.<br />Images can only be accessed if the authenticated user is an existing owner, friend or veterinarian of the dog being queried.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/picture/dog/%7Bdog_slug%7D\">https://app.fitbark.com/api/v2/picture/dog/{dog_slug}</a></li>\n<li>HTTP Method: GET</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>dog_slug</code></li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"image\": {\n             \"data\": \"9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4w ICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTUK/9sAQwACAQEB AQECAQEBAgICAgIEAwICAgIFBAQDBAYFBgYGBQYGBgcJCAYHCQcGBggLCAkK CgoKCgYICwwLCgwJCgoK/9sAQwECAgICAgIFAwMFCgcGBwoKCgoKCgoKCgoK CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK/8AAEQgE cAKAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkK C//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGh CCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNE. . .RUZHSElKU1RV\"\n            }\n}\n</code></pre>\n","urlObject":{"path":["api","v2","picture","dog","{dog_slug}"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"13e10692-24ff-4a80-8601-e6dad1cbe658"},{"name":"Get Dog Info","id":"52116ffd-b879-4c31-9486-d03f08561897","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{USER_TOKEN}}"}],"url":"{{SERVER}}/api/v2/dog/{dog_slug}","description":"<h2 id=\"get-dog-info\"><strong>GET DOG INFO</strong></h2>\n<p>Get various information about a certain dog including name, breed, gender, weight, birthday and picture.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/dog/%7Bdog_slug%7D\">https://app.fitbark.com/api/v2/dog/{dog_slug}</a></li>\n<li>HTTP Method: GET</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>dog_slug</code></li>\n</ul>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"dog\": {\n        \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n        \"name\": \"vasco\",\n        \"bluetooth_id\": \"0319e2809c310c44\",\n        \"activity_value\": 7921,\n        \"birth\": \"2013-04-12\",\n        \"breed1\": {\n             \"id\": 16,\n             \"name\": \"BEAGLE\"\n        },\n        \"breed2\": { },\n        \"gender\": \"M\",\n        \"weight\": 10,\n        \"weight_unit\": \"lbs\",\n        \"country\": \"US\",\n        \"zip\": \"64108\",\n        \"tzoffset\": -25200,\n        \"tzname\": \"America/Vancouver\",\n        \"min_play\": 0,\n        \"min_active\": 0,\n        \"min_rest\": 0,\n        \"medical_conditions\": [\n               {\n                    \"id\": 7,\n                    \"name\": \"Overweight\",\n               }\n        ],\n        \"hourly_average\": 3096,\n        \"picture_hash\": \"765d59679a9024ba31e7e9b6103618b3\",\n        \"neutered\": false,\n        \"last_min_time\": \"2014-08-31T17:16:00.000Z\",\n        \"last_min_activity\": 79,\n        \"daily_goal\": 8000,\n        \"battery_level\": 98,\n        \"last_sync\": \"2014-08-31T17:17:54.000Z\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["api","v2","dog","{dog_slug}"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"52116ffd-b879-4c31-9486-d03f08561897"},{"name":"Get Activity Totals","id":"b872b7ff-a081-4fd6-913c-ac882b1a8a78","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{USER_TOKEN}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"dog\":{\n           \"slug\":{dog_slug},\n           \"from\":\"2026-03-10\",\n           \"to\":\"2026-03-11\"\n   }\n}\n"},"url":"{{SERVER}}/api/v2/activity_totals","description":"<h2 id=\"get-activity-totals\"><strong>GET ACTIVITY TOTALS</strong></h2>\n<p>Get historical activity data by totaling the historical series between two specified date times.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/activity_totals\">https://app.fitbark.com/api/v2/activity_totals</a></li>\n<li>HTTP Method: POST</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li>slug</li>\n<li><code>from</code></li>\n<li><code>to</code></li>\n</ul>\n<p><strong>Request example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"dog\":{\n           \"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n           \"from\":2014-06-06,\n           \"to\":2014-06-09\n   }\n}\n</code></pre>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_value\": 26305\n}\n</code></pre>\n","urlObject":{"path":["api","v2","activity_totals"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b872b7ff-a081-4fd6-913c-ac882b1a8a78"},{"name":"Get Similar Dogs Stats","id":"3abd512a-272b-4723-a077-a21a5b24c02e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{BEARER_TOKEN}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"slug\":{dog_slug}}\n"},"url":"{{SERVER}}/api/v2/similar_dogs_stats","description":"<h2 id=\"get-similar-dogs-stats\"><strong>GET SIMILAR DOGS STATS</strong></h2>\n<p>Get this dogs, and similar dogs, statistics.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/similar_dogs_stats\">https://app.fitbark.com/api/v2/similar_dogs_stats</a></li>\n<li>HTTP Method: POST</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li>slug</li>\n</ul>\n<p><strong>Request example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\"slug\": \"09659a8a-24c9-4246-92a8-7ecd0650368c\"}\n</code></pre>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n     \"similar_dogs_stats\": {\n        \"this_best_daily_activity\": 2300,\n        \"this_best_week_activity\":56000,\n        \"this_current_goals_streak\": 1,\n        \"this_best_goals_streak\": 3,\n        \"this_average_daily_activity\": 2100,\n        \"median_same_age_weight_daily_activity\":2500,\n        \"this_average_daily_rest_minutes\": 60,\n        \"median_same_age_weight_range_dogs_daily_rest_minutes\":54,\n        \"median_all_dogs_daily_activity\":3000,\n        \"median_same_breed_daily_activity\":3500\n     }\n}\n</code></pre>\n","urlObject":{"path":["api","v2","similar_dogs_stats"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3abd512a-272b-4723-a077-a21a5b24c02e"},{"name":"Get Time Breakdown","id":"ab31944d-5530-47f8-b045-12e1358d3feb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer  {{BEARER_TOKEN}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"dog\":{\n           \"slug\":\"{dog_slug}\",\n           \"from\":\"2026-03-10\",\n           \"to\":\"2026-03-11\"\n   }\n}\n"},"url":"{{SERVER}}/api/v2/time_breakdown","description":"<h2 id=\"get-time-breakdown\"><strong>GET TIME BREAKDOWN</strong></h2>\n<p>Get the time (in minutes) spent at each activity level for a certain dog between two specified date times.</p>\n<ul>\n<li>Access: Read</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/time_breakdown\">https://app.fitbark.com/api/v2/time_breakdown</a></li>\n<li>HTTP Method: POST</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li>slug</li>\n<li><code>from</code></li>\n<li><code>to</code></li>\n</ul>\n<p><strong>Request example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"dog\":{\n          \"slug\":\"09659a8a-24c9-4246-92a8-7ecd0650368c\",\n          \"from\":2014-06-06,\n          \"to\":2014-06-09\n      }\n}\n</code></pre>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"activity_level\": {\n          \"min_play\": 321,\n          \"min_active\": 941,\n          \"min_rest\": 4498\n     }\n}\n</code></pre>\n","urlObject":{"path":["api","v2","time_breakdown"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ab31944d-5530-47f8-b045-12e1358d3feb"},{"name":"Edit Daily Goal","id":"89a44c39-1ea7-4e8d-b67a-1a8195f02736","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{{{BEARER_TOKEN}}}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n     \"daily_goal\" : 7900,\n     \"date\" : \"2026-03-11\"\n}"},"url":"{{SERVER}}/api/v2/daily_goal/{dog_slug}","description":"<h2 id=\"edit-daily-goal\"><strong>EDIT DAILY GOAL</strong></h2>\n<p>Set the daily goal for a specified dog, and get a response with future daily goals (if any). By default, a future daily goal is repeated for all future dates until another user-set goal is found.<br />The daily goal can only be set for future dates, starting from the current date.<br />The daily goal value needs to be a positive number.</p>\n<ul>\n<li>Access: Write</li>\n<li>URL: <a href=\"https://app.fitbark.com/api/v2/daily_goal/%7Bdog_slug%7D\">https://app.fitbark.com/api/v2/daily_goal/{dog_slug}</a></li>\n<li>HTTP Method: PUT</li>\n</ul>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>dog_slug</code></li>\n<li>daily_goal</li>\n<li>date (expressed in UTC)</li>\n</ul>\n<p><strong>Request example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n     \"daily_goal\" : 7000,\n     \"date\" : \"2014-08-15\"\n}\n</code></pre>\n<p><strong>Response example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"daily_goals\":[\n             {\n                    \"daily_goal\": 5000, \n                    \"date\" : \"2014-08-10\"\n             },{\n                    \"daily_goal\": 7000,\n                    \"date\" : \"2014-08-15\" /* previous daily goal of 5000 applies until 2014-08-14 */\n             },{\n                    \"daily_goal\": 9000,\n                    \"date\" : \"2014-09-25\" /* previous daily goal of 7000 applies until 2014-09-24 */\n             },\n             ...\n             ]\n}\n</code></pre>\n","urlObject":{"path":["api","v2","daily_goal","{dog_slug}"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"89a44c39-1ea7-4e8d-b67a-1a8195f02736"},{"name":"Public Dog Image","id":"afb11c29-9775-482f-9307-358b58979d1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{SERVER}}/api/v2/public_picture_dog/{dog_slug}.jpg","urlObject":{"path":["api","v2","public_picture_dog","{dog_slug}.jpg"],"host":["{{SERVER}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"afb11c29-9775-482f-9307-358b58979d1c"}],"id":"b64308d9-2cd0-4d54-89a6-2e33fc5921ef","description":"<p>The FitBark API enables developers to seamlessly integrate FitBark data sets into third party mobile and web apps. It works to further the bond between man and his best friend by seamlessly connecting FitBark with products and services that make the lives of our dogs richer. Let’s build together. The doggie mobile health revolution starts today.</p>\n<h2 id=\"general-notes\"><strong>GENERAL NOTES</strong></h2>\n<p><strong>Time Notation</strong></p>\n<p>Times are presented in the following format:</p>\n<ul>\n<li>Date and time: YEAR-MM-DD T HH:MM:SS.DEC Z (e.g. 2014-12-24T20:07:24.000Z)</li>\n</ul>\n<p>A time zone offset (tzoffset) is created for each dog and represented as a signed (+/-) difference in seconds from the UTC time above</p>\n<ul>\n<li>Times are generally expressed as dog local times when returned for activities or when sending the API requests as “from” and “to” times</li>\n</ul>\n<p><strong>User Profiles</strong></p>\n<ul>\n<li>“Owners” can edit a dog profile and view all the historical activity</li>\n<li>“Friends” can view a dog’s profile and view the last 30 days of activity</li>\n<li>The term “Friend” is used interchangeably with “Follower”</li>\n</ul>\n<p><strong>Json Requirements</strong></p>\n<ul>\n<li>Requests with a Json body must set the “content-type” header to “application/json”</li>\n</ul>\n","_postman_id":"b64308d9-2cd0-4d54-89a6-2e33fc5921ef"}],"variable":[{"key":"CLIENT_ID","value":"26dd4dd2c221dabfa3656cfa40ef0d703708aa656583cf79d8825c2a8cb30006"},{"key":"DOG_SLUG","value":"{dog_slug}"}]}