{"info":{"_postman_id":"4b3b52d8-ce58-4545-8bbf-b2497b68e3a0","name":"absence.io API Documentation","description":"<html><head></head><body><p>absence.io offers a RESTful API, with which most of the absence entites can be retrieved, created, updated or deleted.</p>\n<p>All API urls are below the url path <code>https://app.absence.io/api/v2/[....]</code></p>\n<p>The absence.io API only supports the JSON format for sending and retrieving data.</p>\n<h2 id=\"http-request-header\">HTTP-Request Header</h2>\n<p>To make a request with JSON, the appropriate HTTP headers are:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Content-Type: application/json\nAccept: application/json\nAuthorization: [See below for details]\n\n</code></pre><h1 id=\"authentication\">Authentication</h1>\n<p>To use the absence.io API you will need an API Key. To generate an API Key, please go to your profile in your absence.io account and click on the Integrations link.<br>Here you can generate an API Key by clicking on the 'Generate API Key' button.</p>\n<p>The ApiKey consits of two parts:</p>\n<ul>\n<li><p>The Key Identifier (id) used to identify your key</p>\n</li>\n<li><p>The actual key</p>\n</li>\n</ul>\n<h2 id=\"hawk-authentication\">Hawk Authentication</h2>\n<p>For transmitting your ApiKey we use Hawk.</p>\n<p><code>Hawk is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial HTTP request cryptographic verification.</code></p>\n<p>See <a href=\"https://github.com/hueniverse/hawk\">https://github.com/hueniverse/hawk</a> for more details.</p>\n<p>The are numerous open source client implementations available on the internet:</p>\n<ul>\n<li><p>Javascript/Node.js: <a href=\"https://github.com/hueniverse/hawk\">https://github.com/hueniverse/hawk</a> for more details</p>\n</li>\n<li><p>C#: <a href=\"https://github.com/pcibraro/hawknet\">https://github.com/pcibraro/hawknet</a></p>\n</li>\n<li><p>Java: <a href=\"https://github.com/wealdtech/hawk\">https://github.com/wealdtech/hawk</a></p>\n</li>\n<li><p>Objective C: <a href=\"https://github.com/tent/hawk-objc\">https://github.com/tent/hawk-objc</a></p>\n</li>\n<li><p>Ruby: <a href=\"https://github.com/tent/hawk-ruby\">https://github.com/tent/hawk-ruby</a></p>\n</li>\n<li><p>PHP: <a href=\"https://github.com/dflydev/dflydev-hawk\">https://github.com/dflydev/dflydev-hawk</a></p>\n</li>\n</ul>\n<h3 id=\"sending-your-apikey\">Sending your ApiKey</h3>\n<p>A Hawk client requires you passing three parameters to its client/header method/function.</p>\n<p>This will usually look something like this:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>  var credentials = {\n    id: '53ec476edf869a0200707ac3', // the key identifier\n    key: 'werxhqb18rpaxn39848xrunpaw3489ruxnpa98w4rxn', // the actual key\n    algorithm: 'sha256' // the algorythm used to build the request header\n  };\n  var header = Hawk.client.header(request.url,request.method,{ credentials: credentials});\n  request.headers.Authorization = header.field;  \n\n</code></pre><h2 id=\"testing-requests\">Testing Requests</h2>\n<p>For testing requests and gaining a better understanding of the API, we recommend you use Postman (<a href=\"https://www.getpostman.com\">https://www.getpostman.com</a>) , which supports Hawk authentication out of the box.</p>\n<p>Once you have installed either the Postman client or the Postman extension for chrome, you can import this documention into Postman by clicking on the above <code>Run in Postman</code> button.</p>\n<p>All requests have been set up so that you just need to set the following variables in a postman enviroment.</p>\n<ul>\n<li><p>url: <a href=\"https://app.absence.io\">https://app.absence.io</a></p>\n</li>\n<li><p>hawkId: the hawkId you got from us</p>\n</li>\n<li><p>hawkKey: the secrect hawk key you got from us</p>\n</li>\n</ul>\n<p>When these have been set up you just need to ensure that hawk authentication is enabled on all requests and click on <code>Update Request</code> in the Authorisation Tab.</p>\n<h1 id=\"oauth-20-client-credentials-flow-user-mapped\">OAuth 2.0 Client Credentials Flow (User-Mapped)</h1>\n<h2 id=\"integration-guide\">Integration Guide</h2>\n<p>Our API supports a customized implementation of the <strong>OAuth 2.0 Client Credentials Flow</strong> that allows applications to obtain access tokens <strong>on behalf of a specific user</strong>. This ensures that all subsequent API requests using the token will reflect the permissions and access rights of that user.</p>\n<hr>\n<h2 id=\"what-is-this-flow\">What Is This Flow?</h2>\n<p>While the standard OAuth 2.0 Client Credentials Flow is meant for <strong>machine-to-machine communication with no user context</strong>, our implementation <strong>extends it to allow mapping the access token to a specific user</strong>.</p>\n<h3 id=\"how-it-works\">How It Works:</h3>\n<ul>\n<li><p>A client authenticates using <code>client_id</code> and <code>client_secret</code>.</p>\n</li>\n<li><p>The API issues an <strong>access token</strong> tied to the <strong>permissions of the specified user</strong>.</p>\n</li>\n<li><p>All API calls using this token <strong>operate within the scope of that user's role and permissions</strong>.</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"1-registering-an-oauth-client\">1. Registering an OAuth Client</h2>\n<h3 id=\"step-1-access-the-integrations-page\">Step 1: Access the Integrations Page</h3>\n<p>Log in to your <a href=\"https://app.absence.io\">absence.io</a> account and navigate to the <strong>Integrations</strong> tab in your <strong>profile settings</strong>.</p>\n<h3 id=\"step-2-register-a-new-client\">Step 2: Register a New Client</h3>\n<p>Create a new OAuth client to obtain your unique <code>client_id</code> and <code>client_secret</code>.</p>\n<hr>\n<h2 id=\"2-obtaining-an-access-token\">2. Obtaining an Access Token</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://app.absence.io/api/oauth/accesstoken\n\n</code></pre><h3 id=\"headers\">Headers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Content-Type: application/x-www-form-urlencoded\n\n</code></pre><h3 id=\"body-parameters\">Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>client_id</td>\n<td>your_client_id</td>\n</tr>\n<tr>\n<td>client_secret</td>\n<td>your_client_secret</td>\n</tr>\n<tr>\n<td>grant_type</td>\n<td>client_credentials</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">POST /api/oauth/accesstoken\nHost: app.absence.io\nContent-Type: application/x-www-form-urlencoded\nclient_id=your_client_id&amp;client_secret=your_client_secret&amp;grant_type=client_credentials\n\n</code></pre>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"access_token\": \"user_mapped_access_token\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 900\n}\n\n</code></pre>\n<hr>\n<h2 id=\"3-using-the-access-token\">3. Using the Access Token</h2>\n<p>Use the access token to authenticate API requests. The token enforces the permissions of the mapped user.</p>\n<h3 id=\"example\">Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET /api/v1/teams\nHost: app.absence.io\nAuthorization: Bearer user_mapped_access_token\n\n</code></pre>\n<hr>\n<h2 id=\"4-token-expiration-and-renewal\">4. Token Expiration and Renewal</h2>\n<p>Access tokens typically <strong>expire after a set duration</strong> (e.g., 15 minutes). You can always request a new token by repeating the token request with the same credentials.</p>\n<h1 id=\"general-concepts\">General Concepts</h1>\n<h2 id=\"creating-an-object\">Creating an Object</h2>\n<p>All requests to create a new object follow the following pattern</p>\n<p><code>HTTP POST https://app.absence.io/api/v2/[enitypath]/create</code></p>\n<h3 id=\"http-request\">HTTP Request:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>HTTP POST https://app.absence.io/api/v2/user\n{\n  firstName:'Peter',\n  lastName:'Mary',\n  email:'peter.mary@johndoe.com'\n}\n\n</code></pre><p>would result in a response similar to the following:</p>\n<h3 id=\"response\">Response:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  _id:\"114f86b938d1a200300996e7a\"\n  approverId:\"54fede756a42820300d74b7d\"\n  avatar:\"\"\n  company:\"54f81e196a72a10300e0f855\"\n  created:\"2015-03-05T14:43:31.237Z\"  \n  email:\"absence.owner@testaccount.io\"\n  firstLogin:false\n  firstName:\"Peter\"\n  holidayCountryLanguage:\"537eed02ed345b2e03965387\"\n  holidayIds:[]\n  holidaySubregion:\"custom\"\n  holidays:[\"537eed02ed345b2e0396530c\", \"537eed02ed345b2e03965358\", \"537eed02ed345b2e0396535e\",…]\n  id:\"54f86b938d1a200300996e7a\"\n  ident:25\n  inheritHolidays:true\n  isApprover:false\n  language:\"de\"\n  lastName:\"Mary\"\n  locationId:\"55bb1d28bb8cee0132771956\"\n  modified:\"2015-03-05T14:43:31.237Z\"\n  name:\"Peter Mary\"\n  notes:\"\"\n  role:\"000000000000000000001000\"\n  status:1\n  teamId:[\"54f8662b8d1a200300996de7\"]\n  vacationDays:26\n  workingDays:[[\"1970-01-01T00:00:00Z\", [1, 2, 3, 4, 5]]]\n}\n\n</code></pre><h2 id=\"updating-an-object\">Updating an Object</h2>\n<p>All requests to update an object follow the following pattern</p>\n<p><code>HTTP PUT https://app.absence.io/api/v2/[enitypath]/:id</code></p>\n<p>The request body only needs to contain the properties that are to be changed.</p>\n<p>The response will contain the full updated object.</p>\n<h3 id=\"http-request-1\">HTTP Request:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>HTTP PUT https://app.absence.io/api/v2/users/114f86b938d1a200300996e7a\n{\n  firstName:'Peter2'\n}\n\n</code></pre><p>would result in a response similar to the following:</p>\n<h3 id=\"response-1\">Response:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  _id:\"114f86b938d1a200300996e7a\"\n  approverId:\"54fede756a42820300d74b7d\"\n  avatar:\"\"\n  company:\"54f81e196a72a10300e0f855\"\n  created:\"2015-03-05T14:43:31.237Z\"  \n  email:\"absence.owner@testaccount.io\"\n  firstLogin:false\n  firstName:\"Peter2\"\n  holidayCountryLanguage:\"537eed02ed345b2e03965387\"\n  holidayIds:[]\n  holidaySubregion:\"custom\"\n  holidays:[\"537eed02ed345b2e0396530c\", \"537eed02ed345b2e03965358\", \"537eed02ed345b2e0396535e\",…]\n  ident:25\n  inheritHolidays:true\n  isApprover:false\n  language:\"de\"\n  lastName:\"Mary\"\n  locationId:\"55bb1d28bb8cee0132771956\"\n  modified:\"2015-03-05T14:43:31.237Z\"\n  name:\"Peter2 Mary\"\n  notes:\"\"\n  role:\"000000000000000000001000\"\n  status:1\n  teamId:[\"54f8662b8d1a200300996de7\"]\n  vacationDays:26\n  workingDays:[[\"1970-01-01T00:00:00Z\", [1, 2, 3, 4, 5]]]\n}\n\n</code></pre><h2 id=\"retrieving-a-single-object\">Retrieving a Single Object</h2>\n<p>All GET requests for a single object follow the following pattern</p>\n<p><code>HTTP GET https://app.absence.io/api/v2/[enitypath]/[id]</code></p>\n<p>e.g. calling</p>\n<h3 id=\"http-request-2\">HTTP Request:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>HTTP GET https://app.absence.io/api/v2/users/53ec876edf869a0200707ac3\n\n</code></pre><p>would result in a response like the following:</p>\n<h3 id=\"response-2\">Response:</h3>\n<p>A full object as described in the respective entity documentation.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  _id: \"53ec876edf869a0200707ac3\"\n  approverId:\"53ec876edf869a0200707ac3\", \n  avatar: \"76e3fe57-7304-45d6-b722-dba53be05b7b\"\n  email: \"john@doe.com\"\n  firstName:\"John\",\n  lastName:\"Doe\"\n  ...\n}\n\n</code></pre><h2 id=\"retrieving-data\">Retrieving Data</h2>\n<p>To retrieve a list of objects, you must send a POST request which will follow the following pattern:</p>\n<p><code>HTTP POST https://app.absence.io/api/v2/[enitypath]</code></p>\n<h3 id=\"http-request-3\">HTTP Request:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>HTTP POST https://app.absence.io/api/v2/users\n{\n  skip:0,\n  limit:50,\n  filter: {\n    name:'like john'\n  }\n}\n\n</code></pre><p>would result in a response like the following:</p>\n<h3 id=\"response-3\">Response:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  skip:0,\n  limit:50,\n  count:50,\n  totalCount:250,\n  data: [\n    .. array of user objects ..\n  ]\n}\n\n</code></pre><p>For further details on querying data, please see the section on <a href=\"#/docs/basics__querying.md\">querying</a>.</p>\n<h1 id=\"http-response-codes\">HTTP Response codes</h1>\n<p>When sending requests to the API you can expect the following HTTP Response Codes:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Name</th>\n<th>notes/description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>All good. A response object should be present</td>\n</tr>\n<tr>\n<td>201</td>\n<td>Create/Update</td>\n<td>All good. Empty Response</td>\n</tr>\n<tr>\n<td>202</td>\n<td>Accepted</td>\n<td>The request was accepted</td>\n</tr>\n<tr>\n<td>204</td>\n<td>OK</td>\n<td>The request was successfully handled. No response body is to be expected</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad Request</td>\n<td>- item1  <br>- item2</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>No, invalid or expired authorisation token</td>\n</tr>\n<tr>\n<td>412</td>\n<td>Precondition failed</td>\n<td>Could be insufficient permission\\ Overlapping absences  <br>Insufficient allowance  <br>No approver</td>\n</tr>\n<tr>\n<td>418</td>\n<td>Teapot</td>\n<td></td>\n</tr>\n<tr>\n<td>422</td>\n<td>Validation failed</td>\n<td>e.g. Missing input parameters</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal server error</td>\n<td>you broke the server</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"querying-objects\">Querying Objects</h1>\n<p>All methods for listing data follow the conventions describe in the following.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The http request body contains the following top level properties</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>property</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>limit</td>\n<td>the maximum number of rows to be returned. default 50. max 100</td>\n</tr>\n<tr>\n<td>skip</td>\n<td>the number of rows to skip. use this for paging</td>\n</tr>\n<tr>\n<td>filter</td>\n<td>(optional) the object describing how the data is to be filtered. See below for further details</td>\n</tr>\n<tr>\n<td>relations</td>\n<td>(optional) tells the query to resolve id properties to resolve their respective entities</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response-body\">Response Body</h2>\n<p>The http response body will contain the following properties:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>property</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>limit</td>\n<td>the requested limit or the applied limit if an illegal limit was requested</td>\n</tr>\n<tr>\n<td>skip</td>\n<td>the request \"page\"</td>\n</tr>\n<tr>\n<td>count</td>\n<td>the number of rows returned in this request</td>\n</tr>\n<tr>\n<td>totalCount</td>\n<td>the total number of rows available on the server</td>\n</tr>\n<tr>\n<td>data</td>\n<td>array containing the requested objects</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"the-filter-object\">The Filter Object</h2>\n<p>The filter object will usually contain one or more properties, specifing which rows to include/exclude in a query. If not filter or an empty filter object is passed, then all rows will be returned.</p>\n<p>The syntax used is very similar to the syntax mongo db</p>\n<h3 id=\"querying-for-equality\">Querying for equality</h3>\n<h4 id=\"pattern\">Pattern:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{  \n  filter:{\n    :\n  }\n}\n\n</code></pre><p>Where is a property of the object being queried and a value of the same type as .<br>For more complex queries can also be an object a query operator.</p>\n<h4 id=\"examples\">Examples</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/users\n{  \n  filter:{\n    firstName:'Peter'\n  }\n}\nwill return all users, where the value of firstName is Peter.\n\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  filter:{\n    assignedToId:'560bd9d03b4cbb24470ee7ee'\n  }\n}\nwill return all absences, which are assignedTo the user with the id 560bd9d03b4cbb24470ee7ee\n\n</code></pre><h3 id=\"querying-with-query-operators\">Querying with query operators</h3>\n<p>Query operators help you phrase more complex queries. Query operators all start with a <code>$</code> as the first letter.</p>\n<h3 id=\"query-operators\">Query operators</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>operator</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>$in</td>\n<td>Matches any of the values specified in an array</td>\n</tr>\n<tr>\n<td>$nin</td>\n<td>Matches none of the values specified in an array</td>\n</tr>\n<tr>\n<td>$gt</td>\n<td>Matches values that are greater than a specified value.</td>\n</tr>\n<tr>\n<td>$gte</td>\n<td>Matches values that are greater or equal than a specified value.</td>\n</tr>\n<tr>\n<td>$lt</td>\n<td>Matches values that are leass than a specified value.</td>\n</tr>\n<tr>\n<td>$lte</td>\n<td>Matches values that are leass or equal than a specified value.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"sorting\">Sorting</h2>\n<p>All queries support a sortBy Object, which can point to any properties on the main entity. Sort on relations is not supported.</p>\n<p>The following query will return all absences sorted by ascencding start date.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  sortBy:{\n    start:1\n  }\n}\n\n</code></pre><p>To retrieve all absences sorted by descending start date, set the sortValue to -1.<br>e.g.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  sortBy:{\n    start:-1\n  }\n}\n\n</code></pre><h2 id=\"logical-operators\">Logical Operators</h2>\n<p>By default, when passing mulitple properties in the filter object, an AND query will be peformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/users\n{  \n  filter:{\n    firstName:'Peter',\n    lastName:'Mary'\n  }\n}\nwill return all users, where the value of firstName is Peter AND the value of lastName is Mary. \n\n</code></pre><p>to turn this query into an OR query the following syntax does the job:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/users\n{  \n  filter:{\n    $or: [\n      {firstName:'Peter'},\n      {lastName:'Mary'}\n    ]\n  }\n}\nthis will return all users, where the value of firstName is Peter or the value of lastName is Mary. \n\n</code></pre><p>AND an OR can be also be combined:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/users\n{  \n  filter:{\n    locationId:'560bd9d03b4cbb24470ee7ee',\n    $or: [\n      {firstName:'Peter'},\n      {lastName:'Mary'}\n    ]\n  }\n}\nthis will return all users belonging to the specified location AND whos firstName is Peter or whos lastName is Mary. \n\n</code></pre><h2 id=\"querying-strings\">Querying Strings</h2>\n<p>When querying strings, by default a case-senstive exact match will be performed.</p>\n<p>To do a case insensitive substring match you can add a <code>like</code> at the begining of the string.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  filter:{\n    commentary:'like feeling blue'\n  }\n}\nThis will return all absences in which the comment contains the string `feeling blue`.\n\n</code></pre><h2 id=\"querying-dates\">Querying Dates</h2>\n<p>Date values must be passed in the ISO 8601 Format.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  filter:{\n    start:'2015-04-23T00:00:00.000Z'\n  }\n}\n\n</code></pre><p>or as YYYY-MM-DD</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  filter:{\n    start:'2015-04-23'\n  }\n}\n\n</code></pre><p>will evalue to '2015-04-23T00:00:00.000Z'</p>\n<h3 id=\"get-all-absences-and-sort-by-last-name-of-the-assigned-user\">Get all absences and sort by last name of the assigned user</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{ \n  sortBy:{'assignedToLastName':1}\n}\n\n</code></pre><h3 id=\"get-all-users-absent-today-from-the-dev-team\">Get all users absent today from the dev team</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/users\n{ \n    \"filter\": {\n    \"_id:absence.assignedTo\" : {\n      \"start\": {\"$lte\" : \"2015-12-28T00:00:00.000Z\"},\n        \"end\": {\"$gte\": \"2015-12-28T00:00:00.000Z\"},\n    },\n    \"teamId:teams._id\" :{\n      name:'development'\n    }\n    }\n}\n\n</code></pre><h1 id=\"relations\">Relations</h1>\n<p>Using relations, you can tell the service to resolve id properties to their respective objects.</p>\n<p>By adding a relations array to the request body, you tell the server to load the full object for the id property of the main entity</p>\n<p>e.g. To resolve the assignedToId to a property called assignedTo use the following syntax:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Request\nPOST http://localhost:3000/api/v2/absences\n{ \n    \"filter\": {\n      \"start\": {\"$lte\" : \"2015-12-20T00:00:00.000Z\"},\n        \"end\": {\"$gte\": \"2015-12-31T00:00:00.000Z\"}\n    },\n    relations:['assignedToId']\n}\n\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Response\n{\n  \"skip\": 0,\n  \"limit\": 50,\n  \"count\": 50,\n  \"totalCount\": 458,\n  \"data\": [\n    {\n      \"_id\": \"5480402809650202004df75b\",\n      \"modified\": \"2014-12-06T10:04:39.006Z\",\n      \"created\": \"2014-12-04T11:06:16.471Z\",\n      \"start\": \"2014-12-03T00:00:00.000Z\",\n      \"end\": \"2014-12-08T00:00:00.000Z\",\n      \"assignedToId\": \"63ec876edf869a0200707ac3\",\n      \"assignedTo\": {\n        \"_id\": \"63ec876edf869a0200707ac3\",   \n        \"email\": \"absence.owner@gmail.com\",\n        \"lastName\": \"Lebbe\",\n        \"firstName\": \"Christina\",      \n   ...\n   ...\n}\n\n</code></pre></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Authentication","slug":"authentication"},{"content":"OAuth 2.0 Client Credentials Flow (User-Mapped)","slug":"oauth-20-client-credentials-flow-user-mapped"},{"content":"General Concepts","slug":"general-concepts"},{"content":"HTTP Response codes","slug":"http-response-codes"},{"content":"Querying Objects","slug":"querying-objects"},{"content":"Relations","slug":"relations"}],"owner":"799608","collectionId":"4b3b52d8-ce58-4545-8bbf-b2497b68e3a0","publishedId":"RWaEyA7c","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-08-12T14:03:26.000Z"},"item":[{"name":"absence","item":[{"name":"/api/v2/absences/create","id":"d02c3522-dcc9-4282-9fca-9329ed9f5a3b","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468419816\", nonce=\"qzLUyK\", mac=\"aSwp8I3du5pZgMGosU5DpHBXMfB5vD9SLjELA2nShUo=\""}],"body":{"mode":"raw","raw":"  {\r\n    \"assignedToId\": \"5547707ac4930c030095e83a\",\r\n    \"approverId\": \"552d1635bd8a2e030008ba2d\",\r\n    \"start\": \"2016-10-01T00:00\",\r\n    \"end\": \"2016-10-02T23:00\",\r\n    \"reasonId\": \"552d1637bd8a2e030008ba2f\"\r\n  }\r\n\r\n"},"url":"{{url}}/api/v2/absences/create","description":"<p>Create absences</p>\n","urlObject":{"path":["api","v2","absences","create"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d02c3522-dcc9-4282-9fca-9329ed9f5a3b"},{"name":"/api/v2/absences","id":"aa505fea-c92d-4fd4-8277-81f81adfedf5","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468419757\", nonce=\"9QaQHd\", mac=\"S1X8oMs97Rbs2QikurboGAi0sgFvG7bKHBSYySbTyIY=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n  \"filter\": {  \r\n      \"approverId:user._id\": { \"firstName\": \"like s\" } \r\n  },\r\n  \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","description":"<p>Retrieve absences</p>\n","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"aa505fea-c92d-4fd4-8277-81f81adfedf5"},{"name":"/api/v2/absences/:id","id":"f2dfe93e-3ba1-4816-864b-8ca635215dc8","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468420473\", nonce=\"VqbhcN\", mac=\"SYzLdyGKiU7eUrf6Se31iGIgo/qeZ+turgfcPFT2m6c=\""}],"body":{"mode":"raw","raw":"  {\r\n    \"assignedToId\": \"5547707ac4930c030095e83a\",\r\n    \"approverId\": \"552d1635bd8a2e030008ba2d\",\r\n    \"start\": \"2016-10-01T00:00\",\r\n    \"end\": \"2016-10-02T23:00\",\r\n    \"reasonId\": \"552d1637bd8a2e030008ba2f\"\r\n  }\r\n\r\n"},"url":"{{url}}/api/v2/absences/56df2d3eaaac717e42f07115","description":"<p>Update an existing absence</p>\n","urlObject":{"path":["api","v2","absences","56df2d3eaaac717e42f07115"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2dfe93e-3ba1-4816-864b-8ca635215dc8"},{"name":"/api/v2/absences/:id","id":"8ab770dd-33c7-4e88-829a-86fdadac7492","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468421596\", nonce=\"ma7kIK\", mac=\"BLAFDqqrIi2mKJApGqSWUukHkAt5dR5cx585uVuKneE=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/absences/56df2d3eaaac717e42f07115","description":"<p>Retrieve an absence</p>\n","urlObject":{"path":["api","v2","absences","56df2d3eaaac717e42f07115"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ab770dd-33c7-4e88-829a-86fdadac7492"}],"id":"f9036934-35b1-486e-a17b-1599c30f0097","description":"<p>The absence object represents one absence for one user. </p>\n<h2 id=\"default-filter\">Default Filter</h2>\n<p>By default only \"visible\" absences are returned. In other words, absences which have beend rejected or deleted, will not be returned. </p>\n<h2 id=\"properties\">Properties</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>reasonId</td>\n<td>id</td>\n<td>required</td>\n<td>id of the associated absence Type</td>\n</tr>\n<tr>\n<td>assignedToId</td>\n<td>id</td>\n<td>required</td>\n<td>id of the user who is assgined to this absence</td>\n</tr>\n<tr>\n<td>approverId</td>\n<td>id</td>\n<td>required</td>\n<td>id of the user who will/has approved this absence. If the creator has sufficient permissions it will be the same as assigendToId</td>\n</tr>\n<tr>\n<td>start</td>\n<td>date</td>\n<td>required</td>\n<td>the start date and time of the absence. See notes on defining start and end dates below.</td>\n</tr>\n<tr>\n<td>end</td>\n<td>date</td>\n<td>required</td>\n<td>the end date and time of the absence. See notes on defining start and end dates below .</td>\n</tr>\n<tr>\n<td>commentary</td>\n<td>string</td>\n<td></td>\n<td>optional comment</td>\n</tr>\n<tr>\n<td>days</td>\n<td>array</td>\n<td>readOnly</td>\n<td>array detailing each day inside the absence date range</td>\n</tr>\n<tr>\n<td>daysCount</td>\n<td>int</td>\n<td>readOnly</td>\n<td>the number of working days this absence counts as</td>\n</tr>\n<tr>\n<td>denyReason</td>\n<td>string</td>\n<td></td>\n<td>an optional comment for a denied absence request</td>\n</tr>\n<tr>\n<td>status</td>\n<td>int</td>\n<td></td>\n<td>the status of the absence</td>\n</tr>\n<tr>\n<td>doctorsNote</td>\n<td></td>\n<td></td>\n<td>object with boolean value to determine if a note is required for an absence and if it was submitted</td>\n</tr>\n<tr>\n<td>substituteId</td>\n<td>id</td>\n<td></td>\n<td>id of the user who will act as a substitute during this absence</td>\n</tr>\n<tr>\n<td>created</td>\n<td>date</td>\n<td>readOnly</td>\n<td>date the absence was created</td>\n</tr>\n<tr>\n<td>modified</td>\n<td>date</td>\n<td>readOnly</td>\n<td>date the absence was updated</td>\n</tr>\n<tr>\n<td>[//]: &lt;&gt; (</td>\n<td>startType</td>\n<td>AM/PM</td>\n<td>required</td>\n</tr>\n<tr>\n<td>[//]: &lt;&gt; (</td>\n<td>endType</td>\n<td>AM/PM</td>\n<td>required</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"f9036934-35b1-486e-a17b-1599c30f0097"},{"name":"absence:query examples","item":[{"name":"All absences starting after a given date","id":"d0a4eab5-a642-4c5c-9ced-de997f5c8c69","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468493923\", nonce=\"3jUKrh\", mac=\"pV5M2QuGoUmLwm7ymJHdirVIv1BXykG6OfhpX0q8S6c=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n    \"filter\": {  \r\n        \"start\": {\"$gte\" : \"2015-12-28T00:00:00.000Z\"}\r\n    },\r\n    \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0a4eab5-a642-4c5c-9ced-de997f5c8c69"},{"name":"All absences today","id":"6f6f8b62-9415-4204-95dd-ee2748f7e350","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468477858\", nonce=\"mHoOr8\", mac=\"ExiyKNfGCQqNEPL6FVwBGIvr3n7WU40UFRg+NQJBX0I=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n    \"filter\": {  \r\n        \"start\": {\"$lte\" : \"2015-12-28T00:00:00.000Z\"},\r\n        \"end\": {\"$gte\": \"2015-12-28T00:00:00.000Z\"}      \r\n    },\r\n    \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","description":"<p>assuming that today is the 2015-12-28 the follwoing query would return all absences today</p>\n","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f6f8b62-9415-4204-95dd-ee2748f7e350"},{"name":"All absences inside a date range","id":"09f7bfb3-cc36-4373-9158-6db114e9f799","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468493862\", nonce=\"kRQ3ss\", mac=\"kBAda11Vyu9qA182iKTZPP465iiEeqXTQWfZTw65QR8=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n    \"filter\": {  \r\n        \"start\": {\"$lte\" : \"2015-12-31T00:00:00.000Z\"},\r\n        \"end\": {\"$gte\": \"2015-12-20T00:00:00.000Z\"}      \r\n    },\r\n    \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","description":"<p>To get all absences between 2015-12-20 and 2015-12-31, use the following query. \n(Note: that the start and end dates have been exchanged)</p>\n","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"09f7bfb3-cc36-4373-9158-6db114e9f799"},{"name":"All absences of a user by userId","id":"f4673e22-ff6b-4422-b42f-08458b1beca1","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468477804\", nonce=\"MKDhhk\", mac=\"/S83p5N1IHUhK2LxNG84SgkbvpBxnvEm5WS54ertkTo=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n    \"filter\": {  \r\n        \"assignedToId\":\"53ec876edf869a0200707ac3\"\r\n    },\r\n    \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f4673e22-ff6b-4422-b42f-08458b1beca1"},{"name":"All absences of user by email","id":"c9610fbc-96a9-4fc9-83cf-41b6bb62181f","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468478579\", nonce=\"Q7yzxm\", mac=\"165RwjzLynFO80FxXnSBYzJxu3x4cvpeGGCCitTuouA=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n  \"filter\": {  \r\n      \"assignedTo:user._id\":{\"email\":\"absence.owner@gmail.com\"}\r\n  },\r\n  \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c9610fbc-96a9-4fc9-83cf-41b6bb62181f"},{"name":"All absences where the comment contains a text","id":"d38860c0-207a-4cc2-9d63-3935e3c466e3","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468493998\", nonce=\"WhkWb7\", mac=\"8FMdXdmQMGPfuXDp7T7pidjpqQfvciTiPfBmfqzLQEs=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50, \r\n  \"filter\": {  \r\n      \"commentary\":\"like test\"\r\n  },\r\n  \"relations\": [\"assignedToId\", \"reasonId\", \"approverId\"]\r\n}\r\n"},"url":"{{url}}/api/v2/absences","description":"<p>The following query will return all absences where the comment contains the word test</p>\n","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d38860c0-207a-4cc2-9d63-3935e3c466e3"},{"name":"Everybody on vacation today","id":"266a23a1-29d7-4042-8ce2-a7aab16f6638","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468478610\", nonce=\"yk8i1m\", mac=\"yju0OH9pAWSqKt95r2LYpi3qdeN8qJBHXyusT92p3J0=\""}],"body":{"mode":"raw","raw":"{\r\n    \"skip\": 0,\r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"start\": {\r\n            \"$lte\": \"2015-12-28T00:00:00.000Z\"\r\n        },\r\n        \"end\": {\r\n            \"$gte\": \"2015-12-28T00:00:00.000Z\"\r\n        },\r\n        \"reasonId\": \"53ec876edf869a0200707ac5\"\r\n    },\r\n    \"relations\": [\r\n        \"assignedToId\",\r\n        \"reasonId\",\r\n        \"approverId\"\r\n    ]\r\n}"},"url":"{{url}}/api/v2/absences","description":"<p>assuming that today is the 2015-12-28 that the  reason id for vacation is \"53ec876edf869a0200707ac5\"  the follwoing query would return all absences today of type vacation</p>\n","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"266a23a1-29d7-4042-8ce2-a7aab16f6638"},{"name":"All absences with the reason name vacation","id":"32db91c1-2a80-446a-a685-c651d606dc71","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468494440\", nonce=\"K9yjNZ\", mac=\"Dkl+OxKv+njRkiKcJZ6y9DzROU4NgDfGXgTNTSoMz/c=\""}],"body":{"mode":"raw","raw":"{\r\n    \"skip\": 0,\r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"reasonId:absenceReason._id\": {\r\n            \"name\": \"vacation\"\r\n        }\r\n    },\r\n    \"relations\": [\r\n        \"assignedToId\",\r\n        \"reasonId\",\r\n        \"approverId\"\r\n    ]\r\n}"},"url":"{{url}}/api/v2/absences","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"32db91c1-2a80-446a-a685-c651d606dc71"},{"name":"All absences where the approvers firstName is Christina","id":"6e197db9-7e2f-4cd7-912c-280a7da6c5c9","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468494627\", nonce=\"FHGf9Y\", mac=\"u7PL0Fj4FZj9SGw1D2gieSe24TLjy56Q2fcZDxdmg/M=\""}],"body":{"mode":"raw","raw":"{\r\n    \"skip\": 0,\r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"approverId:user._id\": {\r\n            \"firstName\": \"Christina\"\r\n        }\r\n    },\r\n    \"relations\": [\r\n        \"assignedToId\",\r\n        \"reasonId\",\r\n        \"approverId\"\r\n    ]\r\n}"},"url":"{{url}}/api/v2/absences","urlObject":{"path":["api","v2","absences"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6e197db9-7e2f-4cd7-912c-280a7da6c5c9"}],"id":"0fad3854-cffa-489b-b6a3-ec173c535d20","description":"<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST http://app.absence.io/api/v2/absences\n{  \n  filter:{\n    start:{$gte:'2015-01-01'}\n  }\n}\nwill return all absences starting after or on January 1st 2015\n\n</code></pre>","_postman_id":"0fad3854-cffa-489b-b6a3-ec173c535d20"},{"name":"allowanceType","item":[{"name":"/api/v2/allowancetypes","id":"d3f7437a-e8ca-4d92-800f-fc2bf6039caf","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468487683\", nonce=\"3HZXLN\", mac=\"L4/zEIA2sOQtiWWy0taX9eces/kd9FelBHMr8X/4cpg=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50\r\n}\r\n"},"url":"{{url}}/api/v2/allowancetypes","description":"<p>Retrieve allowance types</p>\n","urlObject":{"path":["api","v2","allowancetypes"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3f7437a-e8ca-4d92-800f-fc2bf6039caf"},{"name":"/api/v2/allowancetypes/:id","id":"aea261ed-d5e3-4198-8468-e46d50f39b11","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468487733\", nonce=\"VoVZSi\", mac=\"pQKWLzugeWLT9/zlsO6+nFfz6D4uTgoDWu1xcI6XcQU=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/allowancetypes/556748828e3c265c4a601568","description":"<p>Retrieve a single allowance type</p>\n","urlObject":{"path":["api","v2","allowancetypes","556748828e3c265c4a601568"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"aea261ed-d5e3-4198-8468-e46d50f39b11"}],"id":"17442147-d7e7-4be9-88ee-55f17af2b91d","description":"<p>Represents the configuration for a yearly allowance assiociated to a one or more absence reasons. </p>\n<p>e.g. \n  A user might have a yearly allowance of 28 days. </p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>the unique id of the allowance</td>\n</tr>\n<tr>\n<td>active</td>\n<td>boolean</td>\n<td>indicates if it can be used currently.</td>\n</tr>\n<tr>\n<td>initialAllowance</td>\n<td>int</td>\n<td>the intial amount of days a user will have per year</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>the display name of the allowance</td>\n</tr>\n<tr>\n<td>residualLeaveAvailable</td>\n<td>bool</td>\n<td>indicates if unu</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"e28a27c8-138b-48cf-bdfc-453ed86ef853","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6df28bb3-ce7c-4079-8cf2-12688b7bcc22","type":"text/javascript","exec":[""]}}],"_postman_id":"17442147-d7e7-4be9-88ee-55f17af2b91d"},{"name":"department","item":[{"name":"/api/v2/departments","id":"6bb6ca14-2518-4026-91ab-ba1b9a9cee62","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468496106\", nonce=\"Yeg8Ub\", mac=\"1jUylVY8qiIRje3/9f0WcVKQolhVj7dzSneorW1BD6c=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50\r\n}\r\n"},"url":"{{url}}/api/v2/departments","description":"<p>Retrieve departments</p>\n","urlObject":{"path":["api","v2","departments"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6bb6ca14-2518-4026-91ab-ba1b9a9cee62"},{"name":"/api/v2/deparments/:id","id":"813c2fc9-6845-4530-a10d-e66cedbdbd55","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468496138\", nonce=\"b1ef1k\", mac=\"SKv4KRv1o5UHAIt1aJXupVT/Mmgc5NUIIgOjyV8R6gs=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/departments/56cd765ee271f1531205015c","description":"<p>Retrieve a single department</p>\n","urlObject":{"path":["api","v2","departments","56cd765ee271f1531205015c"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"813c2fc9-6845-4530-a10d-e66cedbdbd55"}],"id":"9b1ba0b6-4596-442c-85aa-1e0c1be62f5b","description":"<p>Represents a department to which a user belongs. A user can only be member of one department.</p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>required</td>\n<td>the name of the department</td>\n</tr>\n<tr>\n<td>icsLink</td>\n<td>string</td>\n<td>readOnly</td>\n<td>ics link for viewing absences in external applications, prefix: <a href=\"https://app.absence.io/\">https://app.absence.io/</a></td>\n</tr>\n<tr>\n<td>memberIds</td>\n<td>array [id]</td>\n<td></td>\n<td>list of users who are members of the department</td>\n</tr>\n<tr>\n<td>memberCount</td>\n<td>number</td>\n<td>readonly</td>\n<td>count of users who are members of the department</td>\n</tr>\n<tr>\n<td>approverIds</td>\n<td>array [id]</td>\n<td></td>\n<td>list of users who are approvers for the department</td>\n</tr>\n<tr>\n<td>emailList</td>\n<td>array [object]</td>\n<td></td>\n<td>defintion of subscribers</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"emaillist-object\">emailList object</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>required</td>\n<td>comma seperated emails. Emails do not need to be registered with absence..</td>\n</tr>\n<tr>\n<td>leaveTypes</td>\n<td>array [id]</td>\n<td></td>\n<td>reason ids for which notifications will be sent to the attached email if an absence is createed, deleted, or an update is approved</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"9b1ba0b6-4596-442c-85aa-1e0c1be62f5b"},{"name":"location","item":[{"name":"/api/v2/locations","id":"7ab4afd7-1583-4bf4-8ba3-e3e9a0d066b3","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468496684\", nonce=\"22txSM\", mac=\"PaZaGmm17tbDk5QMWs6LM9akfIF3MwzL8LEVAe2ewkE=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50\r\n}\r\n"},"url":"{{url}}/api/v2/locations","description":"<p>Retrieve locations</p>\n","urlObject":{"path":["api","v2","locations"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ab4afd7-1583-4bf4-8ba3-e3e9a0d066b3"},{"name":"/api/v2/locations/:id","id":"d668042a-8e2e-4f4d-9575-8586a0413aa1","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468496697\", nonce=\"bYucJr\", mac=\"439bfHyNUC6e6GXHsxe6vMA6NK0igEt3C3DYfDSSV1w=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/locations/55c10afb207236e26f729c81","description":"<p>Retrieve a single location</p>\n","urlObject":{"path":["api","v2","locations","55c10afb207236e26f729c81"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d668042a-8e2e-4f4d-9575-8586a0413aa1"}],"id":"f61830d3-49e9-42a8-bf4e-1df3fe674787","description":"<p>Represents the physical location of  user. A user can only be a member of one location.</p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>required</td>\n<td>the name of the location</td>\n</tr>\n<tr>\n<td>icsLink</td>\n<td>string</td>\n<td>readonly</td>\n<td>ics link for viewing absences in external applications, prefix: <a href=\"https://app.absence.io/\">https://app.absence.io/</a></td>\n</tr>\n<tr>\n<td>memberIds</td>\n<td>array [id]</td>\n<td></td>\n<td>list of users who are members of the location</td>\n</tr>\n<tr>\n<td>memberCount</td>\n<td>number</td>\n<td>readonly</td>\n<td>count of users who are members of the location</td>\n</tr>\n<tr>\n<td>mainLocation</td>\n<td>bool</td>\n<td>readonly</td>\n<td>bool to display if the location is the main one or not</td>\n</tr>\n<tr>\n<td>inheritHolidays</td>\n<td>bool</td>\n<td>required</td>\n<td>indicates if holidays are to be inherited from the main location</td>\n</tr>\n<tr>\n<td>holidayCountryLanguage</td>\n<td>id</td>\n<td>required</td>\n<td>the region used to determine the translated names of the holidays. Seperation to region needed when setting to <code>custom</code>.</td>\n</tr>\n<tr>\n<td>holidaySubregion</td>\n<td>string</td>\n<td>required</td>\n<td>the region used to rectrieve the holidays for this user. eg. \"de-by\"</td>\n</tr>\n<tr>\n<td>holidayIds</td>\n<td>id</td>\n<td>required</td>\n<td>list of holidays assigned to the location</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"f61830d3-49e9-42a8-bf4e-1df3fe674787"},{"name":"reason","item":[{"name":"/api/v2/reasons","id":"b2fd9b4b-2a6d-41da-8f56-62bf803b8b62","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468496090\", nonce=\"6XLYd8\", mac=\"HjcYo479M/Q1TFQA+8i+35XoJJmslfOiXy22sOzzhKo=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50\r\n}\r\n"},"url":"{{url}}/api/v2/reasons","description":"<p>Retrieve reasons</p>\n","urlObject":{"path":["api","v2","reasons"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b2fd9b4b-2a6d-41da-8f56-62bf803b8b62"},{"name":"/api/v2/reasons/:id","id":"d90e265d-01e2-4f48-8fdd-e92c0067d933","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468478204\", nonce=\"YdhGPO\", mac=\"AKj4CjQh9Lw/QaAuPgFipgluI9gwrEr3lQtjyfu5xcg=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/reasons/53ec876edf869a0200707ac5","description":"<p>Retrieve a single reason</p>\n","urlObject":{"path":["api","v2","reasons","53ec876edf869a0200707ac5"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d90e265d-01e2-4f48-8fdd-e92c0067d933"}],"id":"84bb3ce4-db50-4890-9592-5baa5602cc0b","description":"<p>Defines a absence reason. e.g. vacation, sickness, home office</p>\n<h2 id=\"properties\">Properties</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>colorId</td>\n<td>id</td>\n<td>required</td>\n<td>the color and icon associated with this reason</td>\n</tr>\n<tr>\n<td>allowanceTypeId</td>\n<td>id</td>\n<td>required</td>\n<td>the allowance type of which this reason deducts. If no allowance is defined then the reason won't deduct from any allowance</td>\n</tr>\n<tr>\n<td>doctorsNote</td>\n<td>object</td>\n<td></td>\n<td>defines if and when a doctorsNote is required for this reason</td>\n</tr>\n<tr>\n<td>isPublic</td>\n<td>bool</td>\n<td></td>\n<td>defines if other basic users can view details for absences of this reason type</td>\n</tr>\n<tr>\n<td>emailList</td>\n<td>array[string]</td>\n<td></td>\n<td>defines email addresses subscribed to this type of absence reason</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>required</td>\n<td>the display name of this reason</td>\n</tr>\n<tr>\n<td>reducesDays</td>\n<td>string</td>\n<td></td>\n<td>if true, an allowance type must be assigned, if false, the allowance type will be null</td>\n</tr>\n<tr>\n<td>requiresApproval</td>\n<td>bool</td>\n<td></td>\n<td>defines if this reason requires approval</td>\n</tr>\n<tr>\n<td>sortIndex</td>\n<td>int</td>\n<td></td>\n<td>defines the sort index of this reason on the ui</td>\n</tr>\n<tr>\n<td>allowanceHistory</td>\n<td>array[object]</td>\n<td>readonly</td>\n<td>shows the changes of allowance types on this object and the date they occured</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"84bb3ce4-db50-4890-9592-5baa5602cc0b"},{"name":"team","item":[{"name":"/api/v2/teams","id":"00553659-bd5d-4831-b15f-ca0bb7af9768","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468497275\", nonce=\"vCe3iv\", mac=\"RTd2KXpewL3X/ICL2aRbqtLJYjwdlXInt7KEvDcmqXU=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50\r\n}\r\n"},"url":"{{url}}/api/v2/teams","description":"<p>Retrieve teams</p>\n","urlObject":{"path":["api","v2","teams"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"00553659-bd5d-4831-b15f-ca0bb7af9768"},{"name":"/api/v2/teams/:id","id":"53759843-0fcb-4dc3-a7ce-ab0236902e3a","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468497306\", nonce=\"ljbPWf\", mac=\"zikY7uNoKdXt7ZRvUuddzxrXDkY3g6XDeIMLRHLWBPE=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/teams/56968e30a4c5b7f74f82718b","description":"<p>Retrieve a single team</p>\n","urlObject":{"path":["api","v2","teams","56968e30a4c5b7f74f82718b"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"53759843-0fcb-4dc3-a7ce-ab0236902e3a"}],"id":"900ccfac-5383-4160-a7a0-91fe87888081","description":"<p>Represent a team inside a company. A user can a member of multiple teams.</p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>required</td>\n<td>the name of the department</td>\n</tr>\n<tr>\n<td>emailList</td>\n<td>array</td>\n<td></td>\n<td>defintion of subscribers</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"24b287a5-94a4-4ed2-83e5-2e55abecd5ee","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5e3721cb-4e9a-4c6d-99f0-1e5eb3cfb997","type":"text/javascript","exec":[""]}}],"_postman_id":"900ccfac-5383-4160-a7a0-91fe87888081"},{"name":"user","item":[{"name":"/api/v2/users/invite","id":"fd581689-3351-4709-9f16-5b36d898579a","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468488422\", nonce=\"DRU9hY\", mac=\"HdlKh9rUbLvXsa6hwmWxgKNt8uHUO/GwBvG4fuyELxw=\""}],"body":{"mode":"raw","raw":"  {\r\n    \"email\": \"foo2.bar@bar.com\",\r\n    \"firstName\": \"foo\",\r\n    \"lastName\": \"foo\",\r\n    \"roleId\" : \"000000000000000000001000\"\r\n\r\n  }\r\n\r\n"},"url":"{{url}}/api/v2/users/invite","description":"<p>Register a new user for your company. The newly created user will recieve an invitation email. </p>\n","urlObject":{"path":["api","v2","users","invite"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd581689-3351-4709-9f16-5b36d898579a"},{"name":"/api/v2/users","id":"c930a947-51bf-4d90-84e8-3a2e0db64db6","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468488017\", nonce=\"hvoDIz\", mac=\"ZDubcgVGMl810GEcSX9jFrk2Gxy/K3GHXDCyHmPuPHo=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {}\r\n}\r\n"},"url":"{{url}}/api/v2/users","description":"<p>Retrieve users</p>\n","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c930a947-51bf-4d90-84e8-3a2e0db64db6"},{"name":"/api/v2/user/:id","id":"4310054e-cfc6-47cc-851a-5a2bee22f2a1","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468488038\", nonce=\"jXvJEp\", mac=\"mx4Mz9RwmdWwnV45AsMi8wmO/Fh9JD81kj7S38AwTeI=\""}],"body":{"mode":"raw","raw":""},"url":"{{url}}/api/v2/users/553748e9eed02b03007fa7b3","description":"<p>Retrieve a user</p>\n","urlObject":{"path":["api","v2","users","553748e9eed02b03007fa7b3"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4310054e-cfc6-47cc-851a-5a2bee22f2a1"},{"name":"/api/v2/users/:id","id":"abc38b67-7f19-4503-9b61-3d549e66b406","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468420473\", nonce=\"VqbhcN\", mac=\"SYzLdyGKiU7eUrf6Se31iGIgo/qeZ+turgfcPFT2m6c=\""}],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"foo\",\r\n    \"lastName\": \"foo\",\r\n    \"roleId\" : \"000000000000000000001000\"\r\n}"},"url":"{{url}}/api/v2/users/553748e9eed02b03007fa7b3","description":"<p>Update an existing user</p>\n","urlObject":{"path":["api","v2","users","553748e9eed02b03007fa7b3"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"abc38b67-7f19-4503-9b61-3d549e66b406"}],"id":"340c5d8a-0552-40be-aeec-bd8411632a17","description":"<p>The user object represents one registered user in absence.io</p>\n<h1 id=\"default-filter\">Default Filter</h1>\n<p>By default only \"active\" users, i.e. users which can login and create absences, are returned. This means that inactive and deleted users are filtered out. (Delete users are physically deleted 30 days after the deletion)</p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>role</td>\n<td>id</td>\n<td>required</td>\n<td>the role assigned to the user</td>\n</tr>\n<tr>\n<td>status</td>\n<td>int</td>\n<td></td>\n<td>the status of the user</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>required</td>\n<td>email used for authentication. On update, a verification email will be sent to the new address</td>\n</tr>\n<tr>\n<td>employeeId</td>\n<td>string</td>\n<td></td>\n<td>an optional custom identifier for the user</td>\n</tr>\n<tr>\n<td>firstName</td>\n<td>string</td>\n<td>required</td>\n<td></td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>string</td>\n<td>required</td>\n<td></td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>readonly</td>\n<td>first and last name concatentated for your convenience</td>\n</tr>\n<tr>\n<td>roleId</td>\n<td>id</td>\n<td>required</td>\n<td>the role of this user</td>\n</tr>\n<tr>\n<td>isApprover</td>\n<td>bool</td>\n<td></td>\n<td>if the user is only of role User, this field enables him to be set as an approver. If this is set to false for Owner,HR, Admin then these users will not appear in the approver selection combos. Technically they can still approve.</td>\n</tr>\n<tr>\n<td>language</td>\n<td>de/en</td>\n<td></td>\n<td>the language the UI will be displayed in</td>\n</tr>\n<tr>\n<td>departmentId</td>\n<td>id</td>\n<td>required</td>\n<td>the department this user belongs to</td>\n</tr>\n<tr>\n<td>locationId</td>\n<td>id</td>\n<td>required</td>\n<td>the location this user belongs to</td>\n</tr>\n<tr>\n<td>teamId</td>\n<td>array</td>\n<td></td>\n<td>array of team ids this user belongs to</td>\n</tr>\n<tr>\n<td>approverId</td>\n<td>id</td>\n<td></td>\n<td>the default approver for this user. If not set it will inherit the approver from the department</td>\n</tr>\n<tr>\n<td>avatar</td>\n<td>id</td>\n<td>readonly</td>\n<td>the id for the user avatar/image</td>\n</tr>\n<tr>\n<td>holidaySubregion</td>\n<td>string</td>\n<td>required</td>\n<td>the region used to rectrieve the holidays for this user. eg. \"de-by\"</td>\n</tr>\n<tr>\n<td>inheritHolidays</td>\n<td>bool</td>\n<td></td>\n<td>indicates if holidays are to be inherited from the location</td>\n</tr>\n<tr>\n<td>holidayCountryLanguage</td>\n<td>string</td>\n<td>required</td>\n<td>the region used to determine the translated names of the holidays. Seperation to region needed when setting to <code>custom</code>.</td>\n</tr>\n<tr>\n<td>holidayIds</td>\n<td>array</td>\n<td></td>\n<td>the actual holidays this user has assigned</td>\n</tr>\n<tr>\n<td>vacationDays</td>\n<td>number</td>\n<td></td>\n<td>the current default vaction days for this user. if not specified on creation, the companys default vactaionDays will be set.</td>\n</tr>\n<tr>\n<td>workingDays</td>\n<td>array</td>\n<td></td>\n<td>defines the working days for the user. see below for details</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>string</td>\n<td></td>\n<td>comment field on the user</td>\n</tr>\n<tr>\n<td>icsLink</td>\n<td>string</td>\n<td></td>\n<td>ics link for viewing absences in external applications, prefix: <a href=\"https://app.absence.io/\">https://app.absence.io/</a></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"user-roles\">User Roles</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>value</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>000000000000000000001000</td>\n<td>User</td>\n</tr>\n<tr>\n<td>000000000000000000003000</td>\n<td>Admin</td>\n</tr>\n<tr>\n<td>000000000000000000004000</td>\n<td>Owner</td>\n</tr>\n<tr>\n<td>5409e574a090a1e7056aabd8</td>\n<td>HR</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"status\">Status</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>value</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>Created: The account was created. The user cannot login yet</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Email Sent: The invitation email was sent. The user cannot login yet</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Active: Account is active. User can login</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Inactive: Account is inactive. User cannot login</td>\n</tr>\n<tr>\n<td>0</td>\n<td>Deleted: Account is deleted and will be removed from the system 30 days after deletion.</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"workingdays\">workingDays</h1>\n<p>Working days define the days in a week a user is expected to be working and allows a company to define work weeks on a per user basis. \nFor example:</p>\n<ul>\n<li>Weekend staff</li>\n<li>Part-time employees</li>\n<li>4-day work weeks</li>\n<li>Special cases</li>\n</ul>\n<p>Absences only count defined working days when calculating total days and reducing allowances\n<code>Working days array must be sent in full during update. If only one entry is sent the server will assume the user only has one entry in their working days</code>\nExample: </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>workingDays: [\n        ['1970-01-01', [1,2,3,4,5]], // Starting Jan 1, 1970 the user will be working mon-fri\n        ['2015-03-01', [0,1,2,3]],   // Starting Mar 1, 2015 the user will be working sun-wed\n       ]; \n</code></pre><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>position</th>\n<th>name</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>date</td>\n<td>date</td>\n<td>required</td>\n<td>date that the days will take effect on. Format 'yyyy-MM-dd'</td>\n</tr>\n<tr>\n<td>1</td>\n<td>days</td>\n<td>array</td>\n<td>required</td>\n<td>array of active working days</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"workingdays-days-definition\">Workingdays days definition</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>day</th>\n<th>value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Sunday</td>\n<td>0</td>\n</tr>\n<tr>\n<td>Monday</td>\n<td>1</td>\n</tr>\n<tr>\n<td>Tuesday</td>\n<td>2</td>\n</tr>\n<tr>\n<td>Wednesday</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Thursday</td>\n<td>4</td>\n</tr>\n<tr>\n<td>Friday</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Saturday</td>\n<td>6</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"340c5d8a-0552-40be-aeec-bd8411632a17"},{"name":"user: invite examples","item":[{"name":"Invite user without sending invitation email","id":"414ec698-9b1e-4893-979b-a9678252e6f5","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468488821\", nonce=\"PL8But\", mac=\"QOmuFY8Z6iSUUu/1E4tnj1Bk+eHTzphRYcLC+sZ20dg=\""}],"body":{"mode":"raw","raw":"  {\r\n    \"email\": \"foo223.baz@bar.com\",\r\n    \"firstName\": \"foo\",\r\n    \"lastName\": \"foo\",\r\n    \"roleId\" : \"000000000000000000001000\",\r\n    \"sendEmail\":false\r\n\r\n  }\r\n\r\n"},"url":"{{url}}/api/v2/users/invite","description":"<p>Register a new user for your company. The newly created user will NOT recieve an invitation email. </p>\n","urlObject":{"path":["api","v2","users","invite"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"414ec698-9b1e-4893-979b-a9678252e6f5"}],"id":"e39b74b8-e094-4b3b-a9ef-6cb3f6f22c5c","_postman_id":"e39b74b8-e094-4b3b-a9ef-6cb3f6f22c5c","description":""},{"name":"user: query examples","item":[{"name":"Find users by lastName","id":"4e483d15-fee3-437a-8137-3422894bf098","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468489238\", nonce=\"ROwwyD\", mac=\"ZADdwMOgA3+Gt6y44FdOBwTRhWwWoRzrgkYioXyS70U=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"lastName\":\"Lebbe\"\r\n    }\r\n}\r\n"},"url":"{{url}}/api/v2/users","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4e483d15-fee3-437a-8137-3422894bf098"},{"name":"Find users by firstNames","id":"40f62b69-3f6b-4b0e-82c9-8b79e28b6d8f","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468493232\", nonce=\"eQ2Xez\", mac=\"qK6JaLp0IkAy29lCCMJO11VK9/FjtxNDJxnx+dY2GIs=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"firstName\":{\"$in\":[\"Peter\",\"Paul\",\"Mary\"]}\r\n    }\r\n}\r\n"},"url":"{{url}}/api/v2/users","description":"<p>Will find all users whose firstname is either peter, paul or mary</p>\n","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"40f62b69-3f6b-4b0e-82c9-8b79e28b6d8f"},{"name":"Find users by names and location Id","id":"0fbc7686-24fc-4c38-bde6-544aa12a0879","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468493430\", nonce=\"vWPx5Y\", mac=\"CG5rFEKOigCvGnA1tuIJzBlrQwmGxvvew1ccDR7VgGE=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {\r\n        \"locationId\":\"560bd9d03b4cbb24470ee7ee\",\r\n    \"$or\": [\r\n      {\"firstName\":\"Peter\"},\r\n      {\"lastName\":\"Mary\"}\r\n    ]\r\n    }\r\n}\r\n"},"url":"{{url}}/api/v2/users","description":"<p>Will find all users which match the given location id and whose firstName is peter or lastName is mary.</p>\n","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0fbc7686-24fc-4c38-bde6-544aa12a0879"},{"name":"Find all approvers of a specific department","id":"73658443-7ddd-4906-a507-79c5d19cfc34","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468494913\", nonce=\"4tQxrC\", mac=\"JYBrGx9lQqcV5WWtvbzumd4pDW6fw53H3K7Sr+mJbIU=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {\r\n    \"departmentId\":\"56a5ef218283a42178c3d394\",\r\n        \"departmentRole\":\"approver\",\r\n    \"status\": {\"$in\":[1,2,4]}\r\n    }\r\n}\r\n"},"url":"{{url}}/api/v2/users","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"73658443-7ddd-4906-a507-79c5d19cfc34"},{"name":"Find all approvers for a user","id":"f415bb3d-d509-4cf9-b4f8-09910e75a08c","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468495052\", nonce=\"OolFDk\", mac=\"qrHzaeGBalVq60U4AyEBBymdnPtBzoLfQFFYIZ2kjXA=\""}],"body":{"mode":"raw","raw":"{ \r\n    \"skip\": 0, \r\n    \"limit\": 50,\r\n    \"filter\": {\r\n  \"_$approverForId\": \"5480357709650202004df6e1\"\r\n    }\r\n}\r\n"},"url":"{{url}}/api/v2/users","urlObject":{"path":["api","v2","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f415bb3d-d509-4cf9-b4f8-09910e75a08c"}],"id":"262d2a8a-a0c2-41fb-a9a1-af84eea44611","_postman_id":"262d2a8a-a0c2-41fb-a9a1-af84eea44611","description":""},{"name":"timespan","item":[{"name":"/api/v2/timespans/:id","id":"f7f099d6-68ac-4bef-aaca-83cc0da9cacd","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://app.absence.io/api/v2/timespans/{{timespanId}}","description":"<p>Retrieves a single time entry.</p>\n","urlObject":{"protocol":"https","path":["api","v2","timespans","{{timespanId}}"],"host":["app","absence","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"f7f099d6-68ac-4bef-aaca-83cc0da9cacd"},{"name":"/api/v2/timespans","id":"4324cdc4-0557-440c-8b72-e453318c102f","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"filter\": {\n    \"userId\": \"{{userId}}\",\n    \"start\": {\"$gte\": \"2018-02-04\"},\n    \"end\": {\"$lt\": \"2018-02-18\"}\n  },\n  \"limit\": 10,\n  \"skip\": 0\n}"},"url":"https://app.absence.io/api/v2/timespans","description":"<p>Queries a list of time entries.</p>\n","urlObject":{"protocol":"https","path":["api","v2","timespans"],"host":["app","absence","io"],"query":[],"variable":[]}},"response":[{"id":"662b6bb4-89b6-426a-8fd3-bef03c44262a","name":"Get Clocked-in Timespans","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"type\": \"work\",\n        \"end\": null\n    },\n    \"skip\": 0,\n    \"limit\": 50\n}","options":{"raw":{"language":"json"}}},"url":"https://app.absence.io/api/v2/timespans"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"skip\": 0,\n    \"limit\": 50,\n    \"count\": 1,\n    \"totalCount\": 1,\n    \"data\": [\n        {\n            \"compensations\": [],\n            \"source\": {\n                \"sourceType\": \"\",\n                \"sourceId\": \"\"\n            },\n            \"_id\": {{timespanId}},\n            \"type\": \"work\",\n            \"start\": \"2023-01-02T10:35:54.167Z\",\n            \"end\": null,\n            \"commentary\": null,\n            \"timezone\": \"+0100\",\n            \"millisecondOffset\": 3600000,\n            \"timezoneName\": \"Central European Standard Time\",\n            \"createdOn\": \"2023-01-02T10:35:54.571Z\",\n            \"modifiedOn\": \"2023-01-02T10:35:54.571Z\",\n            \"userId\": {{userId}},\n            \"companyId\": {{companyId}},\n            \"modifiedById\": {{userId}},\n            \"createdById\": {{userId}},\n            \"labelIds\": [],\n            \"effectiveStart\": \"2023-01-02T10:35:00.000Z\",\n            \"startInTimezone\": \"2023-01-02T11:35:54.167+01:00\"\n        }\n    ]\n}"},{"id":"a016c578-2418-44e2-acd0-684c7e51ccab","name":"Get Open Break Timespans","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"type\": \"break\",\n        \"end\": null\n    },\n    \"skip\": 0,\n    \"limit\": 50\n}","options":{"raw":{"language":"json"}}},"url":"https://app.absence.io/api/v2/timespans"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"skip\": 0,\n    \"limit\": 50,\n    \"count\": 1,\n    \"totalCount\": 1,\n    \"data\": [\n        {\n            \"compensations\": [],\n            \"source\": {\n                \"sourceType\": \"\",\n                \"sourceId\": \"\"\n            },\n            \"_id\": {{timespanId}},\n            \"type\": \"break\",\n            \"start\": \"2023-01-02T10:35:54.167Z\",\n            \"end\": null,\n            \"commentary\": \"out for lunch\",\n            \"timezone\": \"+0100\",\n            \"millisecondOffset\": 3600000,\n            \"timezoneName\": \"Central European Standard Time\",\n            \"createdOn\": \"2023-01-02T10:35:54.571Z\",\n            \"modifiedOn\": \"2023-01-02T10:35:54.571Z\",\n            \"userId\": {{userId}},\n            \"companyId\": {{companyId}},\n            \"modifiedById\": {{userId}},\n            \"createdById\": {{userId}},\n            \"labelIds\": [],\n            \"effectiveStart\": \"2023-01-02T10:35:00.000Z\",\n            \"startInTimezone\": \"2023-01-02T11:35:54.167+01:00\"\n        }\n    ]\n}"}],"_postman_id":"4324cdc4-0557-440c-8b72-e453318c102f"},{"name":"/api/v2/timespans/create","id":"07d820c1-36b5-4e7c-b511-42e0ee8f53af","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userId\": {{userId}},\n  \"start\": \"2018-02-27T13:13:13.013Z\",\n  \"end\": null,\n  \"timezoneName\": \"CET\",\n  \"timezone\": \"+0100\",\n  \"type\": \"work\"\n}"},"url":"https://app.absence.io/api/v2/timespans/create","description":"<p>Creates a new time entry.</p>\n","urlObject":{"protocol":"https","path":["api","v2","timespans","create"],"host":["app","absence","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"07d820c1-36b5-4e7c-b511-42e0ee8f53af"},{"name":"/api/v2/timespans/:id","id":"3bd58d53-f666-438c-9076-dff887601ed8","request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"start\": \"2018-02-27T13:13:13.013Z\",\n  \"end\": \"2018-02-27T13:13:19.013Z\",\n  \"timezoneName\": \"CET\",\n  \"timezone\": \"+0100\"\n}"},"url":"https://app.absence.io/api/v2/timespans/{{timespanId}}","description":"<p>Modifies one time entry.</p>\n","urlObject":{"protocol":"https","path":["api","v2","timespans","{{timespanId}}"],"host":["app","absence","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"3bd58d53-f666-438c-9076-dff887601ed8"},{"name":"/api/v2/timespans/:id","id":"090e261b-c3ce-4aca-9d97-957adb409930","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://app.absence.io/api/v2/timespans/{{timespanId}}","description":"<p>Deletes one time entry.</p>\n","urlObject":{"protocol":"https","path":["api","v2","timespans","{{timespanId}}"],"host":["app","absence","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"090e261b-c3ce-4aca-9d97-957adb409930"}],"id":"aba54999-2c0b-4fc2-afef-c8f2785c8a6f","description":"<p>Represent a single timetracking entry. Timespans can currently represent work or breaks.</p>\n<h1 id=\"properties\">Properties</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>type</th>\n<th>default</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>id</td>\n<td>readonly</td>\n<td>unique identifier</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>id</td>\n<td>required</td>\n<td>who the timespan is assigned to</td>\n</tr>\n<tr>\n<td>type</td>\n<td>string</td>\n<td>required</td>\n<td>defines the type of the timespan. Can be <code>work</code> or <code>break</code></td>\n</tr>\n<tr>\n<td>start</td>\n<td>date</td>\n<td>required</td>\n<td>start of the timespan. Format: \"2018-01-01T12:53:59.000Z\" stored in UTC</td>\n</tr>\n<tr>\n<td>end</td>\n<td>date</td>\n<td></td>\n<td>end of the timespan. Format: \"2018-01-01T12:59:57.000Z\" stored in UTC</td>\n</tr>\n<tr>\n<td>effectiveStart</td>\n<td>date</td>\n<td>readonly</td>\n<td>start truncated to the minute for in-app calculations</td>\n</tr>\n<tr>\n<td>effectiveEnd</td>\n<td>date</td>\n<td>readonly</td>\n<td>end truncated to the minute for in-app calculations</td>\n</tr>\n<tr>\n<td>timezone</td>\n<td>string</td>\n<td>+0000</td>\n<td>UTC offset of the timespan in format (+/-)0200. Example: +0200 or -0300</td>\n</tr>\n<tr>\n<td>timezoneName</td>\n<td>string</td>\n<td>GMT</td>\n<td>Name of the timezone the timespan should be associated with</td>\n</tr>\n<tr>\n<td>commentary</td>\n<td>string</td>\n<td></td>\n<td>optional comments on timespans</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"af38f946-5924-4090-96dd-259799f379d1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4e8f8070-b888-4227-b694-257dc9120270","type":"text/javascript","exec":[""]}}],"_postman_id":"aba54999-2c0b-4fc2-afef-c8f2785c8a6f"},{"name":"holidays","item":[{"name":"/api/v2/holidays/dates","id":"805f3984-9b11-4922-b643-4f31b58975df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"hawk","hawk":{"authId":"{{hawkId}}","authKey":"{{hawkKey}}","algorithm":"<algorithm>","user":"<user>","saveHelperData":"<save-helper-data>","nonce":"<nonce>","timestamp":"<timestamp>"},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Hawk id=\"53ec876edf869a0200707ac3\", ts=\"1468419816\", nonce=\"qzLUyK\", mac=\"aSwp8I3du5pZgMGosU5DpHBXMfB5vD9SLjELA2nShUo=\""}],"body":{"mode":"raw","raw":"{\n  \"filter\": {\n    \"userId\": \"<user_id>\",\n    \"locationId\": \"<location_id>\",\n    \"start\": \"2025-01-01T00:00:00Z\",\n    \"end\": \"2025-12-31T00:00:00Z\",\n    \"companyId\": \"<company_id>\",\n    \"dayType\": 0,\n    \"isMandatoryLeave\": true\n  }\n}"},"url":"{{url}}/api/v2/holidays/dates","description":"<p>This endpoint retrieves holidays for a user or location within a specified date range. It supports filtering by user, location, company, day type, and mandatory leave status. </p>\n<p><strong>Behavior for <code>userId and locationId</code>:</strong></p>\n<ul>\n<li><code>userId</code> and <code>locationId</code> are mutually exclusive. If both are provided, <code>userId</code> takes precedence.</li>\n</ul>\n<p><strong>Behavior for <code>companyId</code>:</strong></p>\n<ul>\n<li>When <code>companyId</code> is not provided, the endpoint returns both public and custom holidays.</li>\n<li>When <code>companyId</code> is <code>null</code>, the endpoint returns only public holidays.</li>\n<li>When <code>companyId</code> is set to a specific value (e.g., <code>&lt;companyId&gt;</code>), the endpoint returns only custom holidays for that company.</li>\n</ul>\n","urlObject":{"path":["api","v2","holidays","dates"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"eac6d54b-05bc-4e26-b00c-da0f2581bfa0","name":"Success","originalRequest":{"method":"POST","header":[],"url":"{{url}}/api/v2/holidays/dates"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"skip\": 0,\n  \"limit\": 50,\n  \"totalCount\": 21,\n  \"count\": 1,\n  \"data\": [\n    {\n      \"_id\": \"6420689e0669295casdf1234\",\n      \"name\": \"Neujahr\",\n      \"dayType\": 0,\n      \"isMandatoryLeave\": false,\n      \"date\": \"2025-01-01T00:00:00.000Z\"\n    }\n  ]\n}"}],"_postman_id":"805f3984-9b11-4922-b643-4f31b58975df"}],"id":"f0eb475d-fa63-471d-9529-2215c2128ce8","description":"<p>Endpoints related to holidays.</p>\n","_postman_id":"f0eb475d-fa63-471d-9529-2215c2128ce8"}],"event":[{"listen":"prerequest","script":{"id":"a25e1ef0-398c-4e31-970e-eab6071d86f5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7e106c3f-9ad1-4626-b0f7-5ea9f505a3be","type":"text/javascript","exec":[""]}}]}