Simple In/Out API v4 Documentation

Welcome to the Simple In/Out API! You can use our API to access Simple In/Out data. You can request both read and write access.

The Simple In/Out v4 API is a RESTful (mostly) API protected by OAuth 2.

Rate Limiting

APIv4 is protected by daily rate limits. Currently, your application can access APIv4 up to 10,000 times per 24 hour period. Every request to APIv4 will return with two headers: X-RateLimit-Limit and X-RateLimit-Remaining. X-RateLimit-Limit will indicate the total number of requests that can be made against APIv4 over a 24 hour period (always 10,000 for now). X-RateLimit-Remaining will indicate how many requests you have left.

When you’ve run out of requests, APIv4 will return a HTTP status of 429 indicating Too Many Requests.

Expansions

Some of our APIs allow you to include additional information. This saves on API calls, as you can retrieve related information in the primary call and avoid additional requests.

When an API supports including additional information, it does so via the expand query parameter. This is a comma-delimited list of resources to include. We support expansions via embedding directly into the payload.

The Meta object

Most API payloads include a meta object to provide additional details about the requested resource(s). This includes paging most often, and sometimes additional information about the user making the request. For some payloads there may be additional items in the meta.

Here’s an example of a meta object

{"meta": {
  "paging": {
    "page": 1,
    "page_size": 25,
    "page_count": 2,
    "count": 47,
    "previous_page": null,
    "next_page": 2,
    "first_href": "https://www.simpleinout.com/api/v4/beacons",
    "last_href": "https://www.simpleinout.com/api/v4/beacons?page=2",
    "previous_href": null,
    "next_href": "https://www.simpleinout.com/api/v4/beacons?page=2"
  },
  "last_updated_at": {
    "beacons": 1435250484,
    "favorites": 1437151284,
    "fences": 1436546484,
    "groups": 1436287284,
    "settings": 1439916084
  }
}}

Pagination

Pagination occurs when requesting multiple objects. Information about this appears in the meta object.

Name Description
page the page number currently being returned
page_size the number of results per page
page_count the total number of pages available
count the total number of results
previous_page the number of the previous page
next_page the number of the next page
first_href the URL of the API call for the first page of results
last_href the URL of the API call for the last page of results
previous_href the URL of the API call for the page of results prior to the current page
next_href the URL of the API call for the page of results after the current page

Last Update At

The last_updated_at attribute in the meta object returns the epoch time indicating the last time certain resources have been updated. This applies to the authorized user’s company. By storing these dates, you can discover when resources have been updated without having to poll those resources on a regular basis.

If Modified Since and If None Match

Most of the GET requests to the API support the If-Modified-Since and If-None-Match headers. If these two headers are present, the GET request will only return a payload if the relevant data has been updated since the time specified in the If-Modified-Since header and the ETag in the If-None-Match header. If it has been updated since, the payload will be the same as usual. If the data has not been updated, the return will be empty with a HTTP status of 304 (Not Modified). The format of the time is in the HTTP specification, while the ETag should be the same as that returned when a request has been made previously.

When a GET API returns data, the Last-Modified header will be present providing the exact time it’s been modified. This date should be used for future If-Modified-Since requests. The ETag header will be present providing the hash value representing the returned payload. This hash should be used for future If-None-Match requests.

Range Searching

Some integer or date/time fields can be searched by using operators. This permits exact searches, as well as less than, greater than, or between. For these fields, you have an array of options.

  • For exact matches, simply include the value. Date/time fields use epoch time, so it’s almost impossible to get an exact match to the second. Examples are 18 or 1524168783.
  • For ranges based on a single value, you may prepend a symbol to the front of the value. The symbols <, >, <=, or >= are supported. Examples are <18 or >=1524168783.
  • For between range searches, the .. operator is used in between the two values. This includes the values on both ends, as well as those in between. Examples are 9..18 or 1523854800..1524459599.

Sorting

When requesting multiple objects, most of the time you’ll have some sorting options available. Sorting occurs by passing in the sort query parameter. The value is a comma-delimited string of fields in the order you wish them to be sorted. By default, all fields will sort in ascending fashion, but you can sort in descending fashion by including a - sign before the field. An example of this would be sort=name,-begin_at.

Errors

Error objects in Simple In/Out consist of three parts: code, message, and details.

  • code corresponds with those listed below. These provide context as to what type of error occurred.
  • message is an English plain-text reading of what happened. This should be used for further developer debugging, but should not be relied on to remain consistent over time. While these messages can be displayed to end-users, it is highly discouraged as they can change without notice and they are always going to be in English.
  • details provides an array of information in the case of validation failures. This will typically be populated with 5005 validation errors, though they also can appear with improperly formatted status updates (2002). The format of the objects in the array are key: value pairs, whereby key is the name of a field and value is one of a number of possible strings to indicated more specfically what was invalid with the input. Please note that while the key will typically be a parameter on the object, it can occassionally be base for errors that fail validation but don’t apply to a particular field.

An example of an error payload:

{
  "code": 5005,
  "message": "Validation Failure: Name can't be blank, UUID is invalid, Beacons exceed company limit of 100",
  "details": [
    { "name": "blank" },
    { "uuid": "invalid" },
    { "base": "greater_than" }
  ]
}

Error Codes

1002: Company is Disabled

Either the user’s company was on a trial and the trial has expired or the company has let their subscription to Simple In/Out expire. This error will present itself on almost all APIs and will return with the status code 403.


2002: Status Failure

The status update could not be completed.


5001: Bad Range

The integer or date value/range is invalid.


5002: Unknown Sort

The sort requested does not exist. The full message of this error will provide more explanation.


5003: Unknown Expansion

The expansion requested does not exist. The full message of this error will provide more explanation.


5005: Validation Failure

When attempting to create/update/delete the object, some data was either missing or invalid. The full message of this error will provide more explanation.


5007: Parameters Missing

A required parameter for this API was missing.


5008: Array Required

A parameter which is required to be an array was passed something other than an array.


5009: Unknown Only

The only field requested does not exist. The full message of this error will provide more explanation.


5010: Invalid Float

The floating point number is invalid.


5012: Invalid JSON

The posted JSON body is invalid.


5013: Invalid Page Size of Zero

The page_size parameter cannot be zero.

Error Details

taken

The attribute is not unique

inclusion

The attribute is not in the list of acceptable values

invalid

The attribute is not valid

empty

The attribute cannot be empty

blank

The attribute cannot be blank

too_long

The attribute is too long

not_a_hex

The attribute is not a valid hex color code

not_a_number

The attribute is not a number

not_an_integer

The attribute is not an integer

greater_than

The attribute is greater than a predefined limit

greater_than_or_equal_to

The attribute is greater than or equal to a predefined limit

less_than

The attribute is less than a predefined floor

less_than_or_equal_to

The attribute is greater than or equal to a predefined floor

too_long

The attribute is longer than allowed

too_short

The attribute is shorter than allowed

Forbidden Requests (403)

When the user is authenticated, but doesn’t have the necessary permissions to perform an action, the server will respond with the status code of 403 and include the user’s privileges in the payload.

Example payload:

{
  "company": {
    "id": "1",
    "scheduled_statuses": true
  },
  "user": {
    "id": "5",
    "roles": {
      "name": "Regular User",
      "billing": false
      "followed_users": false,
      "reminders": false,
      "safeties": false,
      "tablet_access": false,
      "manage_company_and_users": false,
      "manage_groups_and_memberships": false,
      "manage_others_archives": false,
      "manage_others_futures": false,
      "manage_others_status": false,
      "manage_own_archives": false,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_badges": false,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": false,
      "view_status_updated_at": true,
      "view_users": true,
      "created_at": 1506268448,
      "updated_at": 1506269853
    }
  }
}

The privileges payload may not exist on all forbidden responses. In the cases when an error code is used, such as when a company is disabled, only the code and message will be returned.

Web Hooks

Web Hooks are a great way to be notified when something happens inside Simple In/Out. When you add a Web Hook URL to Simple In/Out, we’ll send a request to that URL with JSON in the body to tell you about things that have happened.

Currently, this applies to only three event types: status.new, status.schedule, and status.destroy, though many may be added in the future. It is strongly advised that you code against the type attribute on the root of the JSON object to avoid new event types being added in the future having unexpected impacts on your code.

The root JSON keys define the basics and out of the box are compatible with Slack’s imcoming webhooks. This also means that the text with be formatted in Markdown. Within the data object is much of the information specific to Simple In/Out, including ids that can be used in combination with APIv4 to request further information.

{
  "username": "Bojack Horseman",
  "email": "bojack@simplymadeapps.com",
  "icon_url": "http://bojackhorseman.com/avatar.gif",
  "text": "*In*: In Hollywoo",
  "type": "status.new",
  "data": {
    "user_id": "34858",
    "status": "in",
    "comment": "In Hollywoo",
    "created_at": 1448046759,
    "admin": {
      "id": "2844", "name": "Princess Carolyn"
    },
    "application": {
      "id": "84774", "name": "Simple In/Out iOS"
    }
  }
}



Authentication

Authorization

Authorization is required to access the Simple In/Out API. This results in a HTTP 302 redirect to simpleinout.com. There, Simple In/Out will ask the user for their credentials and verify they wish to grant your application permission to act on their behalf. If they allow it, Simple In/Out will send a request to your redirect_uri with a code that you can use in the Authorization Code grant to have access and refresh tokens to access the API.

Endpoint

GET /oauth/authorize

Parameters

Name Description
response_type required (string) the type of authorization to use, in this case always 'code'
client_id required (string) your API client key
redirect_uri required (string) the URI to return the user to after authenticating, must match those registered with Simple In/Out
scope required (string) requested scope, either 'read' or 'write', by default 'read'
locale (string) the language for authorization. Available locales: en, en-au, en-ca, en-gb, es. Defaults to 'en'

Request

Route

GET /oauth/authorize?response_type=code&client_id=PLACE_YOUR_API_CLIENT_ID_HERE&redirect_uri=https%3A%2F%2Fwww.simplymadeapps.com%2Fredirect%2Furl&scope=write&locale=en

Query Parameters

response_type=code
client_id=PLACE_YOUR_API_CLIENT_ID_HERE
redirect_uri=https://www.simplymadeapps.com/redirect/url
scope=write
locale=en

cURL

curl -g "https://www.simpleinout.com/oauth/authorize?response_type=code&client_id=PLACE_YOUR_API_CLIENT_ID_HERE&redirect_uri=https%3A%2F%2Fwww.simplymadeapps.com%2Fredirect%2Furl&scope=write&locale=en" -X GET 

Response

Simulated Response

Status

302

Body

<html><body>You are being <a href="http://example.org/en/users/sign_in">redirected</a>.</body></html>

Authorization Code grant

Authorization Code should be used for accessing the API on behalf of a particular user. This is useful for pulling information about the user, or customizing the return of some APIs by the user’s preference.

The first step here is to have your user authorize your app for use. To do this, send your user to our site as noted to the left, passing your client_id and your redirect_uri. We’ll handle asking for the user, authenticating they are who they say they are, and handling the authorization (asking the user for permission on your behalf).

Once your user successfully authorizes your application, they will be redirected back to you. In this response will be a code in the form of a query string. Use this code to request tokens from Simple In/Out. You’ll then receive an access token and refresh token.

Endpoint

POST /oauth/token

Parameters

Name Description
grant_type required (string) type of grant to use
client_id required (string) your API client key
client_secret required (string) your API client secret
code required (string) if using Authorization Code grant, this is the code that is returned from Simple In/Out
redirect_uri required (string) the URI to return the user to after authenticating, must match those registered with Simple In/Out
scope (string) requested scope, either 'read' or 'write', defaults to 'read'

Request

Route

POST /oauth/token

Body

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_API_CLIENT_ID",
  "client_secret": "YOUR_API_CLIENT_SECRET",
  "code": "21b6e75fa7f0277bd94f42b3e11093f70aded66b1b1e5dddae7374d869b8263d",
  "redirect_uri": "https://www.simplymadeapps.com/redirect/url"
}

cURL

curl "https://www.simpleinout.com/oauth/token" -d '{"grant_type":"authorization_code","client_id":"YOUR_API_CLIENT_ID","client_secret":"YOUR_API_CLIENT_SECRET","code":"21b6e75fa7f0277bd94f42b3e11093f70aded66b1b1e5dddae7374d869b8263d","redirect_uri":"https://www.simplymadeapps.com/redirect/url"}' -X POST 

Response

Simulated Response

Response Fields

Name Description
access_token (string) the access token used to make API requests
refresh_token (string) used with the Refresh Token grant type to request a new token
token_type (string) identifies the type of token
expires_in (integer) length of time, in seconds, that the token will be honored
scope (string) the scope of the token, either 'read' or 'write'
created_at (integer) the time the token was issued
user (object) the authenticated user's id, company id, and role.

Status

200

Headers

ETag: W/"9b4e49f2e1495f59c9d61b484aba6e81"

Body

{
  "access_token": "52870ac1fd0cf0d0c747f646fd953faa0fc2acb41d70fb989ada5bbf2d908587",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "7132dbcee6181e27c8d46a46e77ff6efe4e945bee52a9c42f210a06acfcfca33",
  "scope": "write",
  "created_at": 1569787008,
  "user": {
    "id": "263210",
    "company_id": "151153",
    "roles": {
      "id": "670628",
      "name": "Administrator",
      "billing": true,
      "followed_users": true,
      "reminders": true,
      "safeties": true,
      "user_board": true,
      "manage_company_and_users": true,
      "manage_groups_and_memberships": true,
      "manage_others_archives": true,
      "manage_others_futures": true,
      "manage_others_status": true,
      "manage_own_archives": true,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": true,
      "view_user_board_updated_at": true,
      "created_at": 1569787008,
      "updated_at": 1569787008
    }
  }
}

Refresh Token grant

Refresh Token should be used to renew your access token in the event that it has expired. This is useful for regaining access without again having to as the user for credentials.

Endpoint

POST /oauth/token

Parameters

Name Description
grant_type required (string) type of grant to use, in this case always 'refresh_token'
refresh_token required (string) your refresh token

Request

Route

POST /oauth/token

Body

{
  "grant_type": "refresh_token",
  "refresh_token": "jkzaf2ebgmfbpcf41ljgd99xse8w7ay5"
}

cURL

curl "https://www.simpleinout.com/oauth/token" -d '{"grant_type":"refresh_token","refresh_token":"jkzaf2ebgmfbpcf41ljgd99xse8w7ay5"}' -X POST 

Response

Simulated Response

Response Fields

Name Description
access_token (string) the access token used to make API requests
refresh_token (string) used with the Refresh Token grant type to request a new token
token_type (string) identifies the type of token
expires_in (integer) length of time, in seconds, that the token will be honored
scope (string) the scope of the token, either 'read' or 'write'
created_at (integer) the time the token was issued
user (object) the authenticated user's id and role.

Status

200

Headers

ETag: W/"e7f3f551d9be39b718ce388c607c3779"

Body

{
  "access_token": "f9c3c3974d532763e0778fffc692dcea7119228552e8b2324d77a94321e452c2",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "40ebb9199cabe6fef8be8d687a54a03471a20f460fcb804593cba18a6dae27e3",
  "scope": "write",
  "created_at": 1569787009,
  "user": {
    "id": "263213",
    "company_id": "151155",
    "roles": {
      "id": "670636",
      "name": "Administrator",
      "billing": true,
      "followed_users": true,
      "reminders": true,
      "safeties": true,
      "user_board": true,
      "manage_company_and_users": true,
      "manage_groups_and_memberships": true,
      "manage_others_archives": true,
      "manage_others_futures": true,
      "manage_others_status": true,
      "manage_own_archives": true,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": true,
      "view_user_board_updated_at": true,
      "created_at": 1569787009,
      "updated_at": 1569787009
    }
  }
}

Revoke a token

Revokes a token, rendering it invalid.

Endpoint

POST /oauth/revoke

Parameters

Name Description
client_id required (string) your API client key
client_secret required (string) your API client secret
token required (string) the token to revoke

Request

Route

POST /oauth/revoke

Body

{
  "client_id": "PLACE_YOUR_API_CLIENT_ID_HERE",
  "client_secret": "PLACE_YOUR_API_CLIENT_SECRET_HERE",
  "token": "5a327d2f1aad27c05f83bdfc915d239fb36a3ed0f7f03b3db3dfcbd726159924"
}

cURL

curl "https://www.simpleinout.com/oauth/revoke" -d '{"client_id":"PLACE_YOUR_API_CLIENT_ID_HERE","client_secret":"PLACE_YOUR_API_CLIENT_SECRET_HERE","token":"5a327d2f1aad27c05f83bdfc915d239fb36a3ed0f7f03b3db3dfcbd726159924"}' -X POST 

Response

Simulated Response

Status

200

Headers

ETag: W/"44136fa355b3678a1146ad16f7e8649e"

Body

{}

Token information

Provides details about the OAuth token.

Endpoint

GET /oauth/token/info

Request

Route

GET /oauth/token/info

Headers

Authorization: Bearer 61856a581315e369c07c8b6c41e298aa209a3a19b793342b0f07d7025dd8e4ac

cURL

curl -g "https://www.simpleinout.com/oauth/token/info" -X GET \
	-H "Authorization: Bearer 61856a581315e369c07c8b6c41e298aa209a3a19b793342b0f07d7025dd8e4ac"

Response

Simulated Response

Response Fields

Name Description
resource_owner_id (integer) the id of the user
scopes (array) the scopes this token is authorized to use
expires_in_seconds (integer) the number of seconds until the token expires
application (object) information about the application
created_at (integer) the time the token was issued

Status

200

Headers

ETag: W/"f0a7f904d3384f1c8f333f749f4a9505"

Body

{
  "resource_owner_id": 263215,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "3002906154433"
  },
  "created_at": 1569787009
}

Beacons

Create a beacon

Creates a new beacon. Once this beacon is created, it will appear in the company’s beacons within the Simple In/Out apps. The UUID can then be added to a hardware beacon to broadcast. Users must have a role that permits managing the company to create beacons. Companies are limited to 100 Beacons.

Endpoint

POST /api/v4/beacons

Parameters

Name Description
beacon[name] required (string) the name of the beacon
beacon[uuid] (string) the unique beacon identifier
beacon[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
beacon[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
beacon[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
beacon[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

POST /api/v4/beacons

Headers

Authorization: Bearer a0c803f4e1446e2e554e292765f48b2b22de266b20708d710fb1492df5cbb0c0

Body

{
  "beacon": {
    "name": "My Office",
    "uuid": "6EA4801F-4D41-4114-AFA7-7EC977C81B41"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/beacons" -d '{"beacon":{"name":"My Office","uuid":"6EA4801F-4D41-4114-AFA7-7EC977C81B41"}}' -X POST \
	-H "Authorization: Bearer a0c803f4e1446e2e554e292765f48b2b22de266b20708d710fb1492df5cbb0c0"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"029ed0fd25ab5c78f7761dec2f1514bd"

Body

{
  "beacons": {
    "id": "13662",
    "name": "My Office",
    "uuid": "6EA4801F-4D41-4114-AFA7-7EC977C81B41",
    "comment_on_entry": "In at My Office",
    "comment_on_exit": "Left My Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787010,
    "updated_at": 1569787010
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569787010,
      "favorites": 1564171010,
      "fences": 1562875010,
      "groups": 1561579010,
      "networks": 0,
      "roles": 1569787010,
      "settings": 1569787010
    }
  }
}

Delete a beacon

Deletes an existing beacon. Users must have a role that permits managing the company to delete beacons.

Endpoint

DELETE /api/v4/beacons/:id

Request

Route

DELETE /api/v4/beacons/13663

Headers

Authorization: Bearer ccf6eb43baad5fb5a678e69b76dc94e63bfd239ae87aa73a211c7572c80dbab4

cURL

curl "https://www.simpleinout.com/api/v4/beacons/13663" -d '' -X DELETE \
	-H "Authorization: Bearer ccf6eb43baad5fb5a678e69b76dc94e63bfd239ae87aa73a211c7572c80dbab4"

Response

Simulated Response

Status

204

List all beacons

Return a list of all the beacons belonging to the company.

Endpoint

GET /api/v4/beacons

Parameters

Name Description
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/beacons

Headers

Authorization: Bearer a43af76eccd915e3e2eaa92765ee71f2a0e0c40d915c8c17405b146c9e3a669d

cURL

curl -g "https://www.simpleinout.com/api/v4/beacons" -X GET \
	-H "Authorization: Bearer a43af76eccd915e3e2eaa92765ee71f2a0e0c40d915c8c17405b146c9e3a669d"

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"16e4dd75e8f15bf89b3c3637d6af9652"
Last-Modified: Sun, 29 Sep 2019 19:56:51 GMT

Body

{
  "beacons": [
    {
      "id": "13666",
      "name": "Corkery LLC",
      "uuid": "8CD3040C-AD21-46FA-B853-6CA6BFDD57BD",
      "comment_on_entry": "In at Corkery LLC",
      "comment_on_exit": "Left Corkery LLC",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787011,
      "updated_at": 1569787011
    },
    {
      "id": "13665",
      "name": "McKenzie-Feil",
      "uuid": "D3391033-11BA-4DDE-9380-53C2DC992662",
      "comment_on_entry": "In at McKenzie-Feil",
      "comment_on_exit": "Left McKenzie-Feil",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787011,
      "updated_at": 1569787011
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/beacons",
      "last_href": "http://example.org/api/v4/beacons",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1569787011,
      "favorites": 1562183811,
      "fences": 1562356611,
      "groups": 1561665411,
      "networks": 0,
      "roles": 1569787011,
      "settings": 1569787011
    }
  }
}

Update a beacon

Updates an existing beacon. Please note that if the UUID of the beacon is updated, any corresponding hardware must also be updated to broadcast the new UUID. Users must have a role that permits managing the company to update beacons.

Endpoint

PATCH /api/v4/beacons/:id

Parameters

Name Description
beacon[name] (string) the name of the beacon
beacon[uuid] (string) the unique beacon identifier
beacon[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
beacon[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
beacon[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
beacon[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

PATCH /api/v4/beacons/13664

Headers

Authorization: Bearer 48de761434a87ef9e4231d39cf31b20de784a68a0dc3f65496aae557819d10ed

Body

{
  "beacon": {
    "name": "My Renamed Office"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/beacons/13664" -d '{"beacon":{"name":"My Renamed Office"}}' -X PATCH \
	-H "Authorization: Bearer 48de761434a87ef9e4231d39cf31b20de784a68a0dc3f65496aae557819d10ed"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"7ca0ed07bc05561c16909fc71b5038e5"

Body

{
  "beacons": {
    "id": "13664",
    "name": "My Renamed Office",
    "uuid": "EA94CAD4-2DCF-44FE-9056-2E61EDF9F3AC",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787011,
    "updated_at": 1569787011
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569787011,
      "favorites": 1561924610,
      "fences": 1565899010,
      "groups": 1568231810,
      "networks": 0,
      "roles": 1569787011,
      "settings": 1569787011
    }
  }
}

Companies

Retrieve the current company

Return the company the authorized user belongs to.

Endpoint

GET /api/v4/companies/my

Parameters

Name Description
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'billing', 'beacons', 'fences', 'groups', 'favorites', 'networks', 'roles'

Request

Route

GET /api/v4/companies/my

Headers

Authorization: Bearer 3fdc408d5f88e5569bc8f6ec4781c2117783c17615dac955d05e8bc7315fbdde

cURL

curl -g "https://www.simpleinout.com/api/v4/companies/my" -X GET \
	-H "Authorization: Bearer 3fdc408d5f88e5569bc8f6ec4781c2117783c17615dac955d05e8bc7315fbdde"

Response

Simulated Response

Response Fields

Name Description
companies[name] (string) the authorized user's company name
companies[logo_url] (string) url of an image to be used as a fullscreen logo
companies[default_role_id] (string) the unique identifier for the default role
companies[scheduled_statuses] (boolean) whether Scheduled Statuses feature is enabled
companies[created_at] (integer) epoch time the company was created

Status

200

Headers

ETag: W/"b3584c2ab65d29777736c172a6296a72"
Last-Modified: Sun, 29 Sep 2019 19:56:44 GMT

Body

{
  "companies": {
    "id": "151115",
    "name": "Zieme-Dibbert",
    "scheduled_statuses": true,
    "default_role_id": "670478",
    "logo_url": null,
    "created_at": 1569787004
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569787004,
      "favorites": 1568750204,
      "fences": 1565639804,
      "groups": 1569095804,
      "networks": 0,
      "roles": 1569787004,
      "settings": 1569787004
    }
  }
}

Futures

Delete a future status

Deletes an existing scheduled status. The company must have scheduled statuses turned on. Users must have a role that permits managing their own scheduled statuses to delete one of their scheduled statuses. Users must have a role that permits managing the scheduled statuses of others to delete another user’s scheduled status.

Endpoint

DELETE /api/v4/futures/:id

Request

Route

DELETE /api/v4/futures/7342

Headers

Authorization: Bearer 585fad8bba66251078e337c30d0b4d10efa22e471a8078dc8e67c382c71ec4fd

cURL

curl "https://www.simpleinout.com/api/v4/futures/7342" -d '' -X DELETE \
	-H "Authorization: Bearer 585fad8bba66251078e337c30d0b4d10efa22e471a8078dc8e67c382c71ec4fd"

Response

Simulated Response

Status

204

List future statuses

List all the scheduled statuses. The company must have scheduled statuses turned on. Users must have a role that permits viewing the scheduled statuses of others or only the authorized user’s scheduled statuses will be returned.

Endpoint

GET /api/v4/futures

Parameters

Name Description
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results
status (string) the status, either 'in' or 'out'
comment (string) the comment, case sensitive, included with the status change
apply_at (string) a date range string for the time this status will be added
user_id (string) the ID of a particular user
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'apply_at', 'status', 'comment'"
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'changed_by_user'

Request

Route

GET /api/v4/futures

Headers

Authorization: Bearer ac0541926ef2c53812d413f5b0110693b92e26f4b68867e97693373556c6310d

cURL

curl -g "https://www.simpleinout.com/api/v4/futures" -X GET \
	-H "Authorization: Bearer ac0541926ef2c53812d413f5b0110693b92e26f4b68867e97693373556c6310d"

Response

Simulated Response

Response Fields

Name Description
futures (array) an array of matching future statuses

Status

200

Headers

ETag: W/"e131aaf1259e4b63ab97271a584dd667"
Last-Modified: Sun, 29 Sep 2019 19:56:51 GMT

Body

{
  "futures": [
    {
      "id": "7343",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1572375600,
      "user_id": "263239",
      "changed_by_user_id": null
    },
    {
      "id": "7344",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1585508400,
      "user_id": "263239",
      "changed_by_user_id": null
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/futures",
      "last_href": "http://example.org/api/v4/futures",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1564171011,
      "favorites": 1568491011,
      "fences": 1563479811,
      "groups": 1568059011,
      "networks": 0,
      "roles": 1569787011,
      "settings": 1569787011
    }
  }
}

Geofences

Create a fence

Creates a new fence. Once this fence is created, it will appear in the company’s fences within the Simple In/Out apps and website. Users must have a role that permits managing the company to create fences. Companies are limited to 150 Geofences.

Endpoint

POST /api/v4/fences

Parameters

Name Description
fence[name] required (string) the name of the fence
fence[latitude] required (float) the latitude of the center point of the fence
fence[longitude] required (float) the longitude of the center point of the fence
fence[radius] required (integer) the radius of the fence, in meters
fence[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
fence[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
fence[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
fence[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

POST /api/v4/fences

Headers

Authorization: Bearer 52ad9c1117a4ad84be176d9b9369f95f1f6d3beb5b95efe90d7ace9ac44a0cb8

Body

{
  "fence": {
    "name": "My Office",
    "latitude": 46.877931,
    "longitude": -96.787459,
    "radius": 150
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/fences" -d '{"fence":{"name":"My Office","latitude":46.877931,"longitude":-96.787459,"radius":150}}' -X POST \
	-H "Authorization: Bearer 52ad9c1117a4ad84be176d9b9369f95f1f6d3beb5b95efe90d7ace9ac44a0cb8"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"e17799ca8b176a3f8dac62ebc3096ce0"

Body

{
  "fences": {
    "id": "8266",
    "name": "My Office",
    "latitude": "46.877931",
    "longitude": "-96.787459",
    "radius": 150,
    "comment_on_entry": "In at My Office",
    "comment_on_exit": "Left My Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787008,
    "updated_at": 1569787008
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566071808,
      "favorites": 1562443008,
      "fences": 1569787008,
      "groups": 1561319808,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Delete a fence

Deletes an existing fence. Users must have a role that permits managing the company to delete fences.

Endpoint

DELETE /api/v4/fences/:id

Request

Route

DELETE /api/v4/fences/8265

Headers

Authorization: Bearer efc1adb5c09ba261f6dc88654602633d5ecbab97199643e10ef7b1100238595f

cURL

curl "https://www.simpleinout.com/api/v4/fences/8265" -d '' -X DELETE \
	-H "Authorization: Bearer efc1adb5c09ba261f6dc88654602633d5ecbab97199643e10ef7b1100238595f"

Response

Simulated Response

Status

204

List all fences

Return a list of all the fences belonging to the company.

Endpoint

GET /api/v4/fences

Parameters

Name Description
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name', 'radius
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/fences

Headers

Authorization: Bearer 0dad62dc5a00ffc37e6336db841d265ef3561bfeea76692f95776e82dd50d625

cURL

curl -g "https://www.simpleinout.com/api/v4/fences" -X GET \
	-H "Authorization: Bearer 0dad62dc5a00ffc37e6336db841d265ef3561bfeea76692f95776e82dd50d625"

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"fe05aefacbb1c08d7925a4fd2d706bf9"
Last-Modified: Sun, 29 Sep 2019 19:56:48 GMT

Body

{
  "fences": [
    {
      "id": "8268",
      "name": "56y36nfb57xzgeefc399",
      "latitude": "-37.0766925876",
      "longitude": "117.3473685164",
      "radius": 16740,
      "comment_on_entry": "In at 56y36nfb57xzgeefc399",
      "comment_on_exit": "Left 56y36nfb57xzgeefc399",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787008,
      "updated_at": 1569787008
    },
    {
      "id": "8267",
      "name": "xrqxma8y6v9tikhzqmz1",
      "latitude": "-60.8951377849",
      "longitude": "106.4324629461",
      "radius": 16354,
      "comment_on_entry": "In at xrqxma8y6v9tikhzqmz1",
      "comment_on_exit": "Left xrqxma8y6v9tikhzqmz1",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787008,
      "updated_at": 1569787008
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/fences",
      "last_href": "http://example.org/api/v4/fences",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1566503808,
      "favorites": 1566763008,
      "fences": 1569787008,
      "groups": 1564343808,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Update a fence

Updates an existing fence. Users must have a role that permits managing the company to update fences.

Endpoint

PATCH /api/v4/fences/:id

Parameters

Name Description
fence[name] (string) the name of the fence
fence[latitude] (float) the latitude of the center point of the fence
fence[longitude] (float) the longitude of the center point of the fence
fence[radius] (integer) the radius of the fence, in meters
fence[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
fence[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
fence[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
fence[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

PATCH /api/v4/fences/8264

Headers

Authorization: Bearer a7ff6806318a1dd07f6587fce2b782b22b21cb529ab21554a7cec475a4c4ad82

Body

{
  "fence": {
    "name": "My Renamed Geofence"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/fences/8264" -d '{"fence":{"name":"My Renamed Geofence"}}' -X PATCH \
	-H "Authorization: Bearer a7ff6806318a1dd07f6587fce2b782b22b21cb529ab21554a7cec475a4c4ad82"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"51f4c5ab91a2ce730fa658b098463c05"

Body

{
  "fences": {
    "id": "8264",
    "name": "My Renamed Geofence",
    "latitude": "78.1288179468",
    "longitude": "101.1026145808",
    "radius": 1773,
    "comment_on_entry": "In at My Renamed Geofence",
    "comment_on_exit": "Left My Renamed Geofence",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787008,
    "updated_at": 1569787008
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1563479808,
      "favorites": 1563047808,
      "fences": 1569787008,
      "groups": 1569700608,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Groups

Create a group

Creates a new group. Once this group is created, it will appear in the company’s groups within the Simple In/Out apps and website. Users must have a role that permits managing groups/memberships to create groups. Companies are limited to 100 Groups.

Endpoint

POST /api/v4/groups

Parameters

Name Description
group[name] required (string) the name of the group

Request

Route

POST /api/v4/groups

Headers

Authorization: Bearer 72b70607f047169031d8fc408255c7be586eec6378c064df265794b684e9d607

Body

{
  "group": {
    "name": "New Department"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/groups" -d '{"group":{"name":"New Department"}}' -X POST \
	-H "Authorization: Bearer 72b70607f047169031d8fc408255c7be586eec6378c064df265794b684e9d607"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"06c070eae0166d0436de09b999fda065"

Body

{
  "groups": {
    "id": "10234",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1564862208,
      "favorites": 1569787008,
      "fences": 1562011008,
      "groups": 1569787008,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Delete a group

Deletes an existing group. Users must have a role that permits managing groups/memberships to delete groups.

Endpoint

DELETE /api/v4/groups/:id

Request

Route

DELETE /api/v4/groups/10232

Headers

Authorization: Bearer 1afe0c76b73c516cbcbbf9f93ffb154d970cfacc90288084be3ee1f7da141c21

cURL

curl "https://www.simpleinout.com/api/v4/groups/10232" -d '' -X DELETE \
	-H "Authorization: Bearer 1afe0c76b73c516cbcbbf9f93ffb154d970cfacc90288084be3ee1f7da141c21"

Response

Simulated Response

Status

204

List all groups

Return a list of all the groups belonging to the company.

Endpoint

GET /api/v4/groups

Parameters

Name Description
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/groups

Headers

Authorization: Bearer bba2941f4992b788387c6738164c861603fe22a85c992e3da82d47b45a5d738e

cURL

curl -g "https://www.simpleinout.com/api/v4/groups" -X GET \
	-H "Authorization: Bearer bba2941f4992b788387c6738164c861603fe22a85c992e3da82d47b45a5d738e"

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"75c2364102e7a26ec8905b178f3e8af0"
Last-Modified: Sun, 29 Sep 2019 19:56:48 GMT

Body

{
  "groups": [
    {
      "id": "10236",
      "name": "Runte-Schmeler"
    },
    {
      "id": "10235",
      "name": "O'Kon-Ruecker"
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/groups",
      "last_href": "http://example.org/api/v4/groups",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1569787008,
      "favorites": 1561319808,
      "fences": 1562615808,
      "groups": 1569787008,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Update a group

Updates an existing group. Users must have a role that permits managing groups/memberships to update groups.

Endpoint

PATCH /api/v4/groups/:id

Parameters

Name Description
group[name] (string) the name of the group

Request

Route

PATCH /api/v4/groups/10233

Headers

Authorization: Bearer f86229a511203ad8680ed5ee62da4de5fa3785b11698b3fc6692be4ae3d6ddaf

Body

{
  "group": {
    "name": "Renamed Department"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/groups/10233" -d '{"group":{"name":"Renamed Department"}}' -X PATCH \
	-H "Authorization: Bearer f86229a511203ad8680ed5ee62da4de5fa3785b11698b3fc6692be4ae3d6ddaf"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"49183fd83f570c0589f309b55e9bb3c5"

Body

{
  "groups": {
    "id": "10233",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1563998208,
      "favorites": 1566331008,
      "fences": 1561924608,
      "groups": 1569787008,
      "networks": 0,
      "roles": 1569787008,
      "settings": 1569787008
    }
  }
}

Networks

Create a network

Creates a new network. Once this network is created, it will appear in the company’s networks within the Simple In/Out apps. Users must have a role that permits managing the company to create networks. Companies are limited to 100 Networks.

Endpoint

POST /api/v4/networks

Parameters

Name Description
network[name] required (string) the name of the network, no longer than 44 characters
network[ssid] required (string) the unique network identifier, no longer than 250 characters
network[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
network[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
network[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
network[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

POST /api/v4/networks

Headers

Authorization: Bearer 9f786d32177cf0ce04c5c08556b09ee81c96faa0567b144a069274461bb60e93

Body

{
  "network": {
    "name": "My Office",
    "ssid": "Office WiFi Hotspot"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/networks" -d '{"network":{"name":"My Office","ssid":"Office WiFi Hotspot"}}' -X POST \
	-H "Authorization: Bearer 9f786d32177cf0ce04c5c08556b09ee81c96faa0567b144a069274461bb60e93"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"a751a7d3b914c846f23f1b01ad30d4e0"

Body

{
  "networks": {
    "id": "4101",
    "name": "My Office",
    "ssid": "Office WiFi Hotspot",
    "comment_on_entry": "In at My Office",
    "comment_on_exit": "Left My Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787010,
    "updated_at": 1569787010
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1561579010,
      "favorites": 1569700610,
      "fences": 1562011010,
      "groups": 1564689410,
      "networks": 1569787010,
      "roles": 1569787010,
      "settings": 1569787010
    }
  }
}

Delete a network

Deletes an existing network. Users must have a role that permits managing the company to delete networks.

Endpoint

DELETE /api/v4/networks/:id

Request

Route

DELETE /api/v4/networks/4103

Headers

Authorization: Bearer ef83d00db8ff815a615ac12d2bbf697b9e60af9e78f093864bc3593e2694fde9

cURL

curl "https://www.simpleinout.com/api/v4/networks/4103" -d '' -X DELETE \
	-H "Authorization: Bearer ef83d00db8ff815a615ac12d2bbf697b9e60af9e78f093864bc3593e2694fde9"

Response

Simulated Response

Status

204

List all networks

Return a list of all the networks belonging to the company.

Endpoint

GET /api/v4/networks

Parameters

Name Description
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/networks

Headers

Authorization: Bearer e68d8d400f07c2db40e35ccbee2ffbd5a01c1fead6200cf7fa557851351fa750

cURL

curl -g "https://www.simpleinout.com/api/v4/networks" -X GET \
	-H "Authorization: Bearer e68d8d400f07c2db40e35ccbee2ffbd5a01c1fead6200cf7fa557851351fa750"

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"a0deaedd70388e474a78b09271f90d0c"
Last-Modified: Sun, 29 Sep 2019 19:56:50 GMT

Body

{
  "networks": [
    {
      "id": "4104",
      "name": "Medhurst, Keebler and Schowalter",
      "ssid": "4v0k3kij56b9tl7pj4cn9cihvytldct8",
      "comment_on_entry": "In at Medhurst, Keebler and Schowalter",
      "comment_on_exit": "Left Medhurst, Keebler and Schowalter",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787010,
      "updated_at": 1569787010
    },
    {
      "id": "4105",
      "name": "Abernathy, Ziemann and Keeling",
      "ssid": "d2s3pex8z61h2i1vss7hnyyj1arhr565",
      "comment_on_entry": "In at Abernathy, Ziemann and Keeling",
      "comment_on_exit": "Left Abernathy, Ziemann and Keeling",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1569787010,
      "updated_at": 1569787010
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/networks",
      "last_href": "http://example.org/api/v4/networks",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1565812610,
      "favorites": 1568059010,
      "fences": 1565121410,
      "groups": 1566503810,
      "networks": 1569787010,
      "roles": 1569787010,
      "settings": 1569787010
    }
  }
}

Update a network

Updates an existing network. Please note that if the SSID of the network is updated, any corresponding hardware must also be updated to broadcast the new SSID. Users must have a role that permits managing the company to update networks.

Endpoint

PATCH /api/v4/networks/:id

Parameters

Name Description
network[name] (string) the name of the network, no longer than 44 characters
network[ssid] (string) the unique network identifier, no longer than 250 characters
network[comment_on_entry] (string) the comment applied to status updates on entry, defaults to 'In at {name}'
network[comment_on_exit] (string) the comment applied to status updates on exit, defaults to 'Left {name}'
network[status_on_entry] (string) the status to apply on entry: 'in', 'out', or 'off', defaults to 'in'
network[status_on_exit] (string) the status to apply on exit: 'in', 'out', or 'off', defaults to 'out'

Request

Route

PATCH /api/v4/networks/4102

Headers

Authorization: Bearer 10e9c95d13e46cd92d371d7cad3938037e55329fd1b65cafa5ffaf57fa87f9c1

Body

{
  "network": {
    "name": "My Renamed Office"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/networks/4102" -d '{"network":{"name":"My Renamed Office"}}' -X PATCH \
	-H "Authorization: Bearer 10e9c95d13e46cd92d371d7cad3938037e55329fd1b65cafa5ffaf57fa87f9c1"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"ab47f47cb9e47aec683b3bfd670f1b21"

Body

{
  "networks": {
    "id": "4102",
    "name": "My Renamed Office",
    "ssid": "rmhn7sw0rx0noikj8tajnkkmiw9uhb40",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1569787010,
    "updated_at": 1569787010
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1567540610,
      "favorites": 1568663810,
      "fences": 1566417410,
      "groups": 1567281410,
      "networks": 1569787010,
      "roles": 1569787010,
      "settings": 1569787010
    }
  }
}

Ok

Make sure things are Ok

This API is only used to verify you’ve successfully authorized.

Endpoint

GET /api/v4/ok

Request

Route

GET /api/v4/ok

Headers

Authorization: Bearer 017a09721eb9784f7b6f0a6b620d03ccfdc89c1b32335fac4b20bce687af4d69

cURL

curl -g "https://www.simpleinout.com/api/v4/ok" -X GET \
	-H "Authorization: Bearer 017a09721eb9784f7b6f0a6b620d03ccfdc89c1b32335fac4b20bce687af4d69"

Response

Simulated Response

Status

204

Roles

Create a role

Creates a new role. Once this role is created, it will be available to assign to users within the Simple In/Out apps and website. Users must have a role that permits managing the company to create roles. Companies are limited to 100 Roles.

Endpoint

POST /api/v4/roles

Parameters

Name Description
role[name] required (string) the name of the role, no longer than 255 characters, must be unique for the company
role[billing] (boolean) these users can change the company's plan, credit card, and invoice email/information.
role[followed_users] (boolean) these users can receive notifications on their devices when another user updates their status.
role[reminders] (boolean) these users can manage notifications sent to other users reminding them to update their status.
role[safeties] (boolean) these users can receive notifications when another user hasn't updated their status.
role[user_board] (boolean) these users can see other users and their current status.
role[manage_groups_and_memberships] (boolean) these users can manage groups and which users are assigned to each group.
role[manage_others_archives] (boolean) these users can change the past statuses of others by adding and deleting status updates.
role[manage_others_futures] (boolean) these users can schedule future status updates for other users.
role[manage_others_status] (boolean) these users can change the current status of other users.
role[manage_own_archives] (boolean) these users can change their own past statuses by adding and deleting status updates.
role[manage_own_futures] (boolean) these users can schedule future status updates for themselves.
role[manage_own_status] (boolean) these users can update their own status from any device or the website. If a user is not allowed to update their own status, they can only update their status from a common device running FrontDesk or TimeClock.
role[view_others_archives] (boolean) these users can view the past status updates made by other users.
role[view_others_futures] (boolean) these users can view the scheduled status updates for other users.
role[view_others_reports] (boolean) these users can run reports on the status history of other users.
role[view_user_board_updated_at] (boolean) these users can view the time that status updates were made on the board.

Request

Route

POST /api/v4/roles

Headers

Authorization: Bearer c48465498cd02728b14eebe529b3839e5abfcac3117a4c59ffbacf84f6a66e30

Body

{
  "role": {
    "name": "Billing Role",
    "billing": true,
    "followed_users": false,
    "reminders": false,
    "safeties": false,
    "user_board": false,
    "manage_groups_and_memberships": false,
    "manage_others_archives": false,
    "manage_others_futures": false,
    "manage_others_status": false,
    "manage_own_archives": false,
    "manage_own_futures": false,
    "manage_own_status": false,
    "view_others_archives": false,
    "view_others_futures": false,
    "view_others_reports": false,
    "view_user_board_updated_at": false
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/roles" -d '{"role":{"name":"Billing Role","billing":true,"followed_users":false,"reminders":false,"safeties":false,"user_board":false,"manage_groups_and_memberships":false,"manage_others_archives":false,"manage_others_futures":false,"manage_others_status":false,"manage_own_archives":false,"manage_own_futures":false,"manage_own_status":false,"view_others_archives":false,"view_others_futures":false,"view_others_reports":false,"view_user_board_updated_at":false}}' -X POST \
	-H "Authorization: Bearer c48465498cd02728b14eebe529b3839e5abfcac3117a4c59ffbacf84f6a66e30"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"ed38ae139f909f908e481323dc6b8c72"

Body

{
  "roles": {
    "id": "670467",
    "name": "Billing Role",
    "billing": true,
    "followed_users": false,
    "reminders": false,
    "safeties": false,
    "user_board": false,
    "manage_company_and_users": false,
    "manage_groups_and_memberships": false,
    "manage_others_archives": false,
    "manage_others_futures": false,
    "manage_others_status": false,
    "manage_own_archives": false,
    "manage_own_futures": false,
    "manage_own_status": false,
    "view_others_archives": false,
    "view_others_futures": false,
    "view_others_reports": false,
    "view_user_board_updated_at": false,
    "created_at": 1569787003,
    "updated_at": 1569787003
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566676603,
      "favorites": 1562788603,
      "fences": 1563047803,
      "groups": 1563479803,
      "networks": 0,
      "roles": 1569787003,
      "settings": 1569787003
    }
  }
}

Delete a role

Deletes an existing role. Users must have a role that permits managing the company to delete roles.

Endpoint

DELETE /api/v4/roles/:id

Request

Route

DELETE /api/v4/roles/670462

Headers

Authorization: Bearer 1e5fcbd0e33b05f596223148af8fa1490269f9c46fabb39c2ba32c5ce7e5470f

cURL

curl "https://www.simpleinout.com/api/v4/roles/670462" -d '' -X DELETE \
	-H "Authorization: Bearer 1e5fcbd0e33b05f596223148af8fa1490269f9c46fabb39c2ba32c5ce7e5470f"

Response

Simulated Response

Status

204

List all roles

Return a list of all the roles belonging to the company.

Endpoint

GET /api/v4/roles

Parameters

Name Description
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/roles

Headers

Authorization: Bearer 03f05cdcc1e5309658ae96805b1295d4384a4261af94cf370e2a67008ffa1db6

cURL

curl -g "https://www.simpleinout.com/api/v4/roles" -X GET \
	-H "Authorization: Bearer 03f05cdcc1e5309658ae96805b1295d4384a4261af94cf370e2a67008ffa1db6"

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"e91cf2f6320c4797df447b6063042741"
Last-Modified: Sun, 29 Sep 2019 19:56:43 GMT

Body

{
  "roles": [
    {
      "id": "670454",
      "name": "Administrator",
      "billing": true,
      "followed_users": true,
      "reminders": true,
      "safeties": true,
      "user_board": true,
      "manage_company_and_users": true,
      "manage_groups_and_memberships": true,
      "manage_others_archives": true,
      "manage_others_futures": true,
      "manage_others_status": true,
      "manage_own_archives": true,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": true,
      "view_user_board_updated_at": true,
      "created_at": 1569787003,
      "updated_at": 1569787003
    },
    {
      "id": "670455",
      "name": "Manager",
      "billing": false,
      "followed_users": false,
      "reminders": false,
      "safeties": false,
      "user_board": true,
      "manage_company_and_users": false,
      "manage_groups_and_memberships": false,
      "manage_others_archives": false,
      "manage_others_futures": true,
      "manage_others_status": true,
      "manage_own_archives": false,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": true,
      "view_user_board_updated_at": true,
      "created_at": 1569787003,
      "updated_at": 1569787003
    },
    {
      "id": "670456",
      "name": "Regular User",
      "billing": false,
      "followed_users": false,
      "reminders": false,
      "safeties": false,
      "user_board": true,
      "manage_company_and_users": false,
      "manage_groups_and_memberships": false,
      "manage_others_archives": false,
      "manage_others_futures": false,
      "manage_others_status": false,
      "manage_own_archives": false,
      "manage_own_futures": true,
      "manage_own_status": true,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": false,
      "view_user_board_updated_at": true,
      "created_at": 1569787003,
      "updated_at": 1569787003
    },
    {
      "id": "670457",
      "name": "Limited User",
      "billing": false,
      "followed_users": false,
      "reminders": false,
      "safeties": false,
      "user_board": true,
      "manage_company_and_users": false,
      "manage_groups_and_memberships": false,
      "manage_others_archives": false,
      "manage_others_futures": false,
      "manage_others_status": false,
      "manage_own_archives": false,
      "manage_own_futures": false,
      "manage_own_status": false,
      "view_others_archives": true,
      "view_others_futures": true,
      "view_others_reports": false,
      "view_user_board_updated_at": true,
      "created_at": 1569787003,
      "updated_at": 1569787003
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 4,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/roles",
      "last_href": "http://example.org/api/v4/roles",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1562097403,
      "favorites": 1563739003,
      "fences": 1567281403,
      "groups": 1567108603,
      "networks": 0,
      "roles": 1569787003,
      "settings": 1569787003
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/670448

Headers

Authorization: Bearer f4ad95d1b70d6f02b6d3362f559797e9144f20201f58fd2883b9e8161d29c3d7

cURL

curl -g "https://www.simpleinout.com/api/v4/roles/670448" -X GET \
	-H "Sio-Version: 1.0.0" \
	-H "Authorization: Bearer f4ad95d1b70d6f02b6d3362f559797e9144f20201f58fd2883b9e8161d29c3d7"

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"344f5271de0d5121be5e8fa3860db4f4"
Last-Modified: Sun, 29 Sep 2019 19:56:43 GMT

Body

{
  "roles": {
    "id": "670448",
    "name": "Nienow Group",
    "billing": false,
    "followed_users": false,
    "reminders": false,
    "safeties": false,
    "user_board": false,
    "manage_company_and_users": false,
    "manage_groups_and_memberships": false,
    "manage_others_archives": false,
    "manage_others_futures": false,
    "manage_others_status": false,
    "manage_own_archives": false,
    "manage_own_futures": false,
    "manage_own_status": false,
    "view_others_archives": false,
    "view_others_futures": false,
    "view_others_reports": false,
    "view_user_board_updated_at": false,
    "created_at": 1569787003,
    "updated_at": 1569787003
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1561233403,
      "favorites": 1562097403,
      "fences": 1568059003,
      "groups": 1568059003,
      "networks": 0,
      "roles": 1569787003,
      "settings": 1569787003
    },
    "update_available": false
  }
}

Update a role

Updates an existing role. Users must have a role that permits managing the company to update roles.

Endpoint

PATCH /api/v4/roles/:id

Parameters

Name Description
role[name] (string) the name of the role, no longer than 255 characters, must be unique for the company
role[billing] (boolean) these users can change the company's plan, credit card, and invoice email/information.
role[followed_users] (boolean) these users can receive notifications on their devices when another user updates their status.
role[reminders] (boolean) these users can manage notifications sent to other users reminding them to update their status.
role[safeties] (boolean) these users can receive notifications when another user hasn't updated their status.
role[user_board] (boolean) these users can see other users and their current status.
role[manage_groups_and_memberships] (boolean) these users can manage groups and which users are assigned to each group.
role[manage_others_archives] (boolean) these users can change the past statuses of others by adding and deleting status updates.
role[manage_others_futures] (boolean) these users can schedule future status updates for other users.
role[manage_others_status] (boolean) these users can change the current status of other users.
role[manage_own_archives] (boolean) these users can change their own past statuses by adding and deleting status updates.
role[manage_own_futures] (boolean) these users can schedule future status updates for themselves.
role[manage_own_status] (boolean) these users can update their own status from any device or the website. If a user is not allowed to update their own status, they can only update their status from a common device running FrontDesk or TimeClock.
role[view_others_archives] (boolean) these users can view the past status updates made by other users.
role[view_others_futures] (boolean) these users can view the scheduled status updates for other users.
role[view_others_reports] (boolean) these users can run reports on the status history of other users.
role[view_user_board_updated_at] (boolean) these users can view the time that status updates were made on the board.

Request

Route

PATCH /api/v4/roles/670453

Headers

Authorization: Bearer adbe1700ee42ab2d9e3e524ca61334cc137532e6cffc7f5390c8556c7c9eabe6

Body

{
  "role": {
    "name": "My Renamed Role",
    "billing": false,
    "view_others_archives": true,
    "view_others_futures": true
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/roles/670453" -d '{"role":{"name":"My Renamed Role","billing":false,"view_others_archives":true,"view_others_futures":true}}' -X PATCH \
	-H "Authorization: Bearer adbe1700ee42ab2d9e3e524ca61334cc137532e6cffc7f5390c8556c7c9eabe6"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"c1d78fb0235de41b8571dcdcbff0e455"

Body

{
  "roles": {
    "id": "670453",
    "name": "My Renamed Role",
    "billing": false,
    "followed_users": false,
    "reminders": false,
    "safeties": false,
    "user_board": false,
    "manage_company_and_users": false,
    "manage_groups_and_memberships": false,
    "manage_others_archives": false,
    "manage_others_futures": false,
    "manage_others_status": false,
    "manage_own_archives": false,
    "manage_own_futures": false,
    "manage_own_status": false,
    "view_others_archives": true,
    "view_others_futures": true,
    "view_others_reports": false,
    "view_user_board_updated_at": false,
    "created_at": 1569787003,
    "updated_at": 1569787003
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565035003,
      "favorites": 1567108603,
      "fences": 1563047803,
      "groups": 1561406203,
      "networks": 0,
      "roles": 1569787003,
      "settings": 1569787003
    }
  }
}

Statuses

List statuses

List all the statuses within the time period specified by the ‘created_at’ date range. Users must have a role that permits viewing the status history of others or only the authorized user’s statuses will be returned.

Endpoint

GET /api/v4/statuses

Parameters

Name Description
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results
created_at required (string) a date range string for the time the status was created
status (string) the status, either 'in' or 'out'
comment (string) the comment, case sensitive, included with the status change
user_id (string) the ID of a particular user
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'created_at', 'status', 'comment'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'user.memberships', 'user.memberships.group', 'user.phones', 'changed_by_user', 'application'

Request

Route

GET /api/v4/statuses?created_at=1569128400..1569387599

Headers

Authorization: Bearer 6b12019c4063ecbdd866f9d37e6e21b411338769134a59b2590dd7868bccaf4e

Query Parameters

created_at=1569128400..1569387599

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1569128400..1569387599" -X GET \
	-H "Authorization: Bearer 6b12019c4063ecbdd866f9d37e6e21b411338769134a59b2590dd7868bccaf4e"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"d62e41f003b87028c6e90be19399961f"
Last-Modified: Mon, 23 Sep 2019 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569135600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569150000
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569153600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569171600
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569222000
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263219",
      "changed_by_user_id": null,
      "created_at": 1569243600
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "user_id": "263219",
      "changed_by_user_id": "263220",
      "created_at": 1569247200
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 7,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/statuses?created_at=1569128400..1569387599",
      "last_href": "http://example.org/api/v4/statuses?created_at=1569128400..1569387599",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1568663809,
      "favorites": 1567886209,
      "fences": 1565899009,
      "groups": 1565467009,
      "networks": 0,
      "roles": 1569787009,
      "settings": 1569787009
    }
  }
}

Users

Archive a user

Archives an existing user. Users must have a role that permits managing users.

Endpoint

POST /api/v4/users/:id/archive

Request

Route

POST /api/v4/users/263229/archive

Headers

Authorization: Bearer d44cc9e23db0e37170d3dacafab06539116adecbd780276988361324d3440eda

cURL

curl "https://www.simpleinout.com/api/v4/users/263229/archive" -d '' -X POST \
	-H "Authorization: Bearer d44cc9e23db0e37170d3dacafab06539116adecbd780276988361324d3440eda"

Response

Simulated Response

Status

204

Create a future status update for a user

Add a scheduled status for a specific user. Users must have a role that permits managing their own scheduled statuses if updating themselves or be permitted to manage the scheduled statuses of others if updating another user. The company must also have scheduled statuses enabled.

Endpoint

POST /api/v4/users/:id/futures

Parameters

Name Description
future[status] required (string) must be 'in' or 'out'
future[apply_at] required (integer) epoch time to apply status change, must be in the future, have minutes within (00, 15, 30, 45), and seconds of 0
future[comment] (string) up to 50 character description of the status update
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'changed_by_user'

Request

Route

POST /api/v4/users/263168/futures

Headers

Authorization: Bearer ca2a0905f9d02cf799fce0ad5937ca60de133b20df04819357e4cbc12416371c

Body

{
  "future": {
    "status": "out",
    "apply_at": 1575057600,
    "comment": "On Vacation"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/263168/futures" -d '{"future":{"status":"out","apply_at":1575057600,"comment":"On Vacation"}}' -X POST \
	-H "Authorization: Bearer ca2a0905f9d02cf799fce0ad5937ca60de133b20df04819357e4cbc12416371c"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"74f7d4ba978a2baf7ba79296a15b8fa4"

Body

{
  "futures": {
    "id": "7337",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1575057600,
    "user_id": "263168",
    "changed_by_user_id": "263167"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1568491005,
      "favorites": 1561319805,
      "fences": 1568750205,
      "groups": 1564603005,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    }
  }
}

Create a future status update for the current user

Add a scheduled status for the current user. Users must have a role that permits managing their own scheduled statuses and the company must have scheduled statuses enabled.

Endpoint

POST /api/v4/users/my/futures

Parameters

Name Description
future[status] required (string) must be 'in' or 'out'
future[apply_at] required (integer) epoch time to apply status change, must be in the future and have minutes within (00, 15, 30, 45), and seconds of 0
future[comment] (string) up to 50 character description of the status update
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'changed_by_user'

Request

Route

POST /api/v4/users/my/futures

Headers

Authorization: Bearer ff4b209673f2360ebff72005f276e50e65ce2ff54ff6a1bd61b6ff396a4eccad

Body

{
  "future": {
    "status": "out",
    "apply_at": 1575057600,
    "comment": "On Vacation"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my/futures" -d '{"future":{"status":"out","apply_at":1575057600,"comment":"On Vacation"}}' -X POST \
	-H "Authorization: Bearer ff4b209673f2360ebff72005f276e50e65ce2ff54ff6a1bd61b6ff396a4eccad"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"56ae3ad7ab0eeb4c7001fe4431a1ca5d"

Body

{
  "futures": {
    "id": "7336",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1575057600,
    "user_id": "263159",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566590205,
      "favorites": 1561406205,
      "fences": 1566935805,
      "groups": 1562529405,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    }
  }
}

Create a status update for a user

Changes a user’s status. Users must have a role that permits managing their own current status or their own past statuses if updating themselves. Users must be permitted to manage the current status of others or the past status of others if updating another user.

Endpoint

POST /api/v4/users/:id/statuses

Parameters

Name Description
status[status] required (string) must be 'in' or 'out'
status[comment] (string) up to 50 character description of the status update
status[created_at] (integer) epoch time to apply status change, defaults to the current time (if this paramter is passed the date must be in the past)
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'user.memberships', 'user.phones', 'user.recents', 'changed_by_user', 'application'

Request

Route

POST /api/v4/users/263183/statuses

Headers

Authorization: Bearer 41c2f5e154e2362f1cf51291036c30ec9ddb64766f3cc3b45c8c76dfea819a21

Body

{
  "status": {
    "status": "in",
    "comment": "In at HQ"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/263183/statuses" -d '{"status":{"status":"in","comment":"In at HQ"}}' -X POST \
	-H "Authorization: Bearer 41c2f5e154e2362f1cf51291036c30ec9ddb64766f3cc3b45c8c76dfea819a21"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"1c4efbf9a274834306e3c897d9e8a7e5"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "user_id": "263183",
    "changed_by_user_id": "263182",
    "created_at": 1569787006
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569700606,
      "favorites": 1566503806,
      "fences": 1563739006,
      "groups": 1562183806,
      "networks": 0,
      "roles": 1569787006,
      "settings": 1569787006
    }
  }
}

Create a status update for the current user

Changes the current user’s status. Users must have a role that permits managing their own current status or their own past statuses.

Endpoint

POST /api/v4/users/my/statuses

Parameters

Name Description
status[status] required (string) must be 'in' or 'out'
status[comment] (st`ring) up to 50 character description of the status update
status[created_at] (integer) epoch time to apply status change, defaults to the current time (if this paramter is passed the date must be in the past)
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'user.memberships', 'user.phones', 'user.recents', 'changed_by_user', 'application'

Request

Route

POST /api/v4/users/my/statuses

Headers

Authorization: Bearer 2fe993cb8f659ca899082344d13f1ae08bbf7ced48872785195f0e34a7c6ebd3

Body

{
  "status": {
    "status": "in",
    "comment": "In at HQ"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses" -d '{"status":{"status":"in","comment":"In at HQ"}}' -X POST \
	-H "Authorization: Bearer 2fe993cb8f659ca899082344d13f1ae08bbf7ced48872785195f0e34a7c6ebd3"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"d0399f462bb14d525afe0a74ac5bee64"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "user_id": "263160",
    "changed_by_user_id": null,
    "created_at": 1569787005
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565726205,
      "favorites": 1563307005,
      "fences": 1565985405,
      "groups": 1561233405,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    }
  }
}

Create a user

Creates a new user. When this is completed, the user will be sent a welcome email from Simple In/Out with a link to choose their own password. Users must have a role that permits managing the company/users to create users. Companies are limited to the number of users their plan supports, and attempting to add more users will result in a greater_than error on the base parameter.

Endpoint

POST /api/v4/users

Parameters

Name Description
user[email] required (string) new user's email address
user[name] required (string) new user's full name
user[details] (string) additional text information about the user
user[lang] (string) preferred locale of the user defaulting to the locale of the authorized user, can be en, en-au, en-ca, en-gb, es
user[phones_attributes] (array) phone objects to attach to the user, each with a 'number' attribute
user[memberships_attributes] (array) membership objects to place the user in the group, each with a 'group_id' attribute
user[role_id] required (string) the ID of the role to assign to the user
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

POST /api/v4/users

Headers

Authorization: Bearer 9f2bd139a06390592edccda579c382bd3b1a62eddd85e30fd3e02d1df538db5a

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "name": "Bojack Horseman",
    "details": "Lead Actor",
    "lang": "en",
    "phones_attributes": [
      {
        "number": "(698) 941-9174 x26224"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 10231
      }
    ],
    "role_id": "670568"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users" -d '{"user":{"email":"bojack@simplymadeapps.com","name":"Bojack Horseman","details":"Lead Actor","lang":"en","phones_attributes":[{"number":"(698) 941-9174 x26224"}],"memberships_attributes":[{"group_id":10231}],"role_id":"670568"}}' -X POST \
	-H "Authorization: Bearer 9f2bd139a06390592edccda579c382bd3b1a62eddd85e30fd3e02d1df538db5a"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"5506d06014a8a36cb5c7476dfa5ea826"

Body

{
  "users": {
    "id": "263189",
    "name": "Bojack Horseman",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/5ad1a29567d78b60c0b648318813aca7.png?s=270\u0026d=blank",
    "details": "Lead Actor",
    "lang": "en",
    "role_id": "670568",
    "created_at": 1569787007,
    "updated_at": 1569787007,
    "cached_at": "1569787007.242914000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569441407,
      "favorites": 1566503807,
      "fences": 1569441407,
      "groups": 1569787007,
      "networks": 0,
      "roles": 1569787007,
      "settings": 1569787007
    }
  }
}

Delete a user

Deletes an existing user. Users must have a role that permits managing the company/users to delete users. Companies must have at least one user with the Administrator role, if you attempt to delete the last user with the Administrator role, this will result in a less_than error on the base parameter.

Endpoint

DELETE /api/v4/users/:id

Request

Route

DELETE /api/v4/users/263179

Headers

Authorization: Bearer aa4c5809812286a14fd3f378362ff55f499c013697d9eea75c023c8243cdd621

cURL

curl "https://www.simpleinout.com/api/v4/users/263179" -d '' -X DELETE \
	-H "Authorization: Bearer aa4c5809812286a14fd3f378362ff55f499c013697d9eea75c023c8243cdd621"

Response

Simulated Response

Status

204

Favorite a status for the current user

Designates a previous status update as a favorite for the current user’s Quick Picks.

Endpoint

PATCH /api/v4/users/my/statuses/favorite

Parameters

Name Description
status[status] required (string) must be 'in' or 'out'
status[comment] (string) up to 50 character description of the status update

Request

Route

PATCH /api/v4/users/my/statuses/favorite

Headers

Authorization: Bearer f39e89464a3d9d8f8de6f2380b5ebca96e3b567b4acb7737591008547277675c

Body

{
  "status": {
    "status": "in",
    "comment": "At Lunch"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/favorite" -d '{"status":{"status":"in","comment":"At Lunch"}}' -X PATCH \
	-H "Authorization: Bearer f39e89464a3d9d8f8de6f2380b5ebca96e3b567b4acb7737591008547277675c"

Response

Simulated Response

Status

204

Hide a status for the current user

Hides a previous status update from the current user’s Quick Picks.

Endpoint

PATCH /api/v4/users/my/statuses/hide

Parameters

Name Description
status[status] required (string) must be 'in' or 'out'
status[comment] (string) up to 50 character description of the status update

Request

Route

PATCH /api/v4/users/my/statuses/hide

Headers

Authorization: Bearer 5135e88affa025079c0e12e196eafa0f51e61484d876b70f5ecb8f3340df93c6

Body

{
  "status": {
    "status": "in",
    "comment": "At Lunch"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/hide" -d '{"status":{"status":"in","comment":"At Lunch"}}' -X PATCH \
	-H "Authorization: Bearer 5135e88affa025079c0e12e196eafa0f51e61484d876b70f5ecb8f3340df93c6"

Response

Simulated Response

Status

204

List all archived users

Return a list of all the archived users belonging to the company. Users must have a role that permits managing users.

Endpoint

GET /api/v4/users?archived=true

Request

Route

GET /api/v4/users?archived=true

Headers

Authorization: Bearer bf66c3fb74ddae6d0dc3333463f7b0a78e2c5e309f7b64eb06b8d3249b28599c

Query Parameters

archived=true

cURL

curl -g "https://www.simpleinout.com/api/v4/users?archived=true" -X GET \
	-H "Authorization: Bearer bf66c3fb74ddae6d0dc3333463f7b0a78e2c5e309f7b64eb06b8d3249b28599c"

Response

Simulated Response

Status

200

Headers

ETag: W/"bffe9b0fda768326d4659e26cd7c0f7b"
Last-Modified: Sun, 29 Sep 2019 19:56:50 GMT

Body

{
  "users": [
    {
      "id": "263231",
      "name": "Walker Oberbrunner",
      "email": null,
      "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
      "details": "Quidem praesentium provident.",
      "lang": "en",
      "role_id": null,
      "created_at": 1569787010,
      "updated_at": 1569787010,
      "cached_at": "1569787010.750054800"
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 1,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users?archived=true",
      "last_href": "http://example.org/api/v4/users?archived=true",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1565035010,
      "favorites": 1564257410,
      "fences": 1569009410,
      "groups": 1565467010,
      "networks": 0,
      "roles": 1569787010,
      "settings": 1569787010
    },
    "trusted_cached_at": "1569786995.772156000"
  }
}

List all future statuses for a user

List all the scheduled statuses for the specified user. Please note that the user making this request must have a role with permission to view the scheduled statuses of others and the company must have scheduled statuses enabled.

Endpoint

GET /api/v4/users/:id/futures

Parameters

Name Description
comment (string) the comment, case sensitive, included with the status change
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'apply_at', 'status', 'comment'
apply_at (string) a date range string for the time the status will be added
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'changed_by_user'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/users/263191/futures

Headers

Authorization: Bearer ca7dafce66a9f4f5f2c9422c8a34e2126b2fddddf98a8df541af2f6c7c4391ac

cURL

curl -g "https://www.simpleinout.com/api/v4/users/263191/futures" -X GET \
	-H "Authorization: Bearer ca7dafce66a9f4f5f2c9422c8a34e2126b2fddddf98a8df541af2f6c7c4391ac"

Response

Simulated Response

Response Fields

Name Description
futures (array) an array of matching scheduled statuses

Status

200

Headers

ETag: W/"a3bdcf6338571baa66200aa3a3c32166"
Last-Modified: Sun, 29 Sep 2019 19:56:47 GMT

Body

{
  "futures": [
    {
      "id": "7340",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1570345200,
      "user_id": "263191",
      "changed_by_user_id": null
    },
    {
      "id": "7341",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1575806400,
      "user_id": "263191",
      "changed_by_user_id": "263192"
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users/263191/futures?user_id=263191",
      "last_href": "http://example.org/api/v4/users/263191/futures?user_id=263191",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1563998207,
      "favorites": 1561924607,
      "fences": 1569355007,
      "groups": 1562529407,
      "networks": 0,
      "roles": 1569787007,
      "settings": 1569787007
    }
  }
}

List all future statuses for the current user

List all the scheduled statuses for the current user. Please note that the company must have scheduled statuses enabled for users to see their scheduled statuses.

Endpoint

GET /api/v4/users/my/futures

Parameters

Name Description
comment (string) the comment, case sensitive, included with the status change
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'apply_at', 'status', 'comment'
apply_at (string) a date range string for the time the status will be added
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'changed_by_user'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/users/my/futures

Headers

Authorization: Bearer de061195a8cd95a422e89b46054afa5a350d67c34becd0936f2ae1ada2756843

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/futures" -X GET \
	-H "Authorization: Bearer de061195a8cd95a422e89b46054afa5a350d67c34becd0936f2ae1ada2756843"

Response

Simulated Response

Response Fields

Name Description
futures (array) an array of matching scheduled statuses

Status

200

Headers

ETag: W/"c9a7634a1de886fe94967369644c6e3d"
Last-Modified: Sun, 29 Sep 2019 19:56:46 GMT

Body

{
  "futures": [
    {
      "id": "7338",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1570345200,
      "user_id": "263170",
      "changed_by_user_id": null
    },
    {
      "id": "7339",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1575806400,
      "user_id": "263170",
      "changed_by_user_id": "263171"
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 2,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users/my/futures?user_id=263170",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=263170",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1565553405,
      "favorites": 1565207805,
      "fences": 1567367805,
      "groups": 1564171005,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    }
  }
}

List all statuses for a user

List all the statuses for the specified user within the time period specified by the ‘created_at’ date range. Users must have a role that permits viewing the past statuses of others if viewing another user. They can always view their own past statuses.

Endpoint

GET /api/v4/users/:id/statuses

Parameters

Name Description
created_at required (string) a date range string for the time the status was created
comment (string) the comment, case sensitive, included with the status change
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'created_at', 'status', 'comment'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'user.memberships', 'user.phones', 'user.recents', 'changed_by_user', 'application'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/users/263197/statuses?created_at=1569128400..1569387599

Headers

Authorization: Bearer 0e43f2821c6df3e159523d76ea53015ffe0e60712bf4808b2bb738849434bbe4

Query Parameters

created_at=1569128400..1569387599

cURL

curl -g "https://www.simpleinout.com/api/v4/users/263197/statuses?created_at=1569128400..1569387599" -X GET \
	-H "Authorization: Bearer 0e43f2821c6df3e159523d76ea53015ffe0e60712bf4808b2bb738849434bbe4"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"c7f7a30d2b0972d5333674a85cdf650f"
Last-Modified: Mon, 23 Sep 2019 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569135600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569150000
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569153600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569171600
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569222000
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263197",
      "changed_by_user_id": null,
      "created_at": 1569243600
    },
    {
      "status": "out",
      "comment": "Vacation",
      "user_id": "263197",
      "changed_by_user_id": "263198",
      "created_at": 1569247200
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 7,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users/263197/statuses?created_at=1569128400..1569387599\u0026user_id=263197",
      "last_href": "http://example.org/api/v4/users/263197/statuses?created_at=1569128400..1569387599\u0026user_id=263197",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1562702207,
      "favorites": 1563307007,
      "fences": 1567799807,
      "groups": 1563825407,
      "networks": 0,
      "roles": 1569787007,
      "settings": 1569787007
    }
  }
}

List all statuses for the current user

List all the statuses for the current user within the time period specified by the ‘created_at’ date range.

Endpoint

GET /api/v4/users/my/statuses

Parameters

Name Description
created_at required (string) a date range string for the time the status was created
comment (string) the comment, case sensitive, included with the status change
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'created_at', 'status', 'comment'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'user', 'user.memberships', 'user.phones', 'user.recents', 'changed_by_user', 'application'
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results

Request

Route

GET /api/v4/users/my/statuses?created_at=1569128400..1569387599

Headers

Authorization: Bearer 3ded1943d14b82f8b796f8758f4213d1a69c967e7321d304af90e79a2d936c23

Query Parameters

created_at=1569128400..1569387599

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/statuses?created_at=1569128400..1569387599" -X GET \
	-H "Authorization: Bearer 3ded1943d14b82f8b796f8758f4213d1a69c967e7321d304af90e79a2d936c23"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"6f2006d7aae46de72dc2499ebdec34c4"
Last-Modified: Mon, 23 Sep 2019 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569135600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569150000
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569153600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569171600
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569222000
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "263157",
      "changed_by_user_id": null,
      "created_at": 1569243600
    },
    {
      "status": "out",
      "comment": "Vacation",
      "user_id": "263157",
      "changed_by_user_id": "263158",
      "created_at": 1569247200
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 7,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users/my/statuses?created_at=1569128400..1569387599\u0026user_id=263157",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1569128400..1569387599\u0026user_id=263157",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1568491005,
      "favorites": 1561319805,
      "fences": 1566676605,
      "groups": 1565294205,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    }
  }
}

List all users

Return a list of all the users belonging to the company. Users must have a role that permits viewing users.

Endpoint

GET /api/v4/users

Parameters

Name Description
page_size (integer) number of results to return per page, defaults to 25
page (integer) page number of results
name (string) return users with this name
email (string) return users with this email
id (array) return users by an array of ids
group_id (string/array) return users belonging to a group id, which can be a string or array in the form of group_id[]=INT
cached_at (integer/float) return users updated that have made a significant change since an epoch time, accurate to nanoseconds
sort (string) order of the return with optional '-' to denote descending, possibilities include: 'name', 'email', 'cached_at', 'status.status', 'status.created_at'
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

GET /api/v4/users

Headers

Authorization: Bearer 133843946869d4d6ddf1ee1f79ac8322e132cadacfd22c9f6fcbc2799f370e0c

cURL

curl -g "https://www.simpleinout.com/api/v4/users" -X GET \
	-H "Authorization: Bearer 133843946869d4d6ddf1ee1f79ac8322e132cadacfd22c9f6fcbc2799f370e0c"

Response

Simulated Response

Response Fields

Name Description
users (array) an array of users
trusted_cached_at (string in the meta object) the server time minus an amount to account for network delivery time

Status

200

Headers

ETag: W/"22bce3894e0f06a28397f66370d7429d"
Last-Modified: Sun, 29 Sep 2019 19:56:45 GMT

Body

{
  "users": [
    {
      "id": "263166",
      "name": "Ray Gillette",
      "email": "ray@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/568d24da7c180b33aaff58442062126d.png?s=270\u0026d=blank",
      "details": "Illo nihil dicta.",
      "lang": "en",
      "role_id": "670522",
      "created_at": 1569787005,
      "updated_at": 1569787005,
      "cached_at": "1569787005.766461000"
    },
    {
      "id": "263165",
      "name": "Lana Kane",
      "email": "lana@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/59b99926dd1b78d777b8ee0fd2c65575.png?s=270\u0026d=blank",
      "details": "Vitae autem quia.",
      "lang": "en",
      "role_id": "670522",
      "created_at": 1569787005,
      "updated_at": 1569787005,
      "cached_at": "1569787005.750175000"
    },
    {
      "id": "263164",
      "name": "Sterling Archer",
      "email": "sterling@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
      "details": "Odit ut error.",
      "lang": "en",
      "role_id": "670522",
      "created_at": 1569787005,
      "updated_at": 1569787005,
      "cached_at": "1569787005.730500000"
    },
    {
      "id": "263163",
      "name": "Malory Archer",
      "email": "malory@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/551eccbc6a509e7d8121efb87dffaf6f.png?s=270\u0026d=blank",
      "details": "Voluptatum excepturi totam.",
      "lang": "en",
      "role_id": "670520",
      "created_at": 1569787005,
      "updated_at": 1569787005,
      "cached_at": "1569787005.710650200"
    }
  ],
  "meta": {
    "paging": {
      "page": 1,
      "page_size": 25,
      "page_count": 1,
      "count": 4,
      "previous_page": null,
      "next_page": null,
      "first_href": "http://example.org/api/v4/users",
      "last_href": "http://example.org/api/v4/users",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1569441405,
      "favorites": 1566244605,
      "fences": 1569787005,
      "groups": 1563134205,
      "networks": 0,
      "roles": 1569787005,
      "settings": 1569787005
    },
    "trusted_cached_at": "1569786990.787855900"
  }
}

Retrieve a user

Retrieve an existing user. Users must have a role that permits viewing users.

Endpoint

GET /api/v4/users/:id

Parameters

Name Description
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

GET /api/v4/users/263187

Headers

Authorization: Bearer c8672ef0aed3206b4d9f20ea1aa7e1afbee0057466c72d1d07b39d97dde6cdba

cURL

curl -g "https://www.simpleinout.com/api/v4/users/263187" -X GET \
	-H "Authorization: Bearer c8672ef0aed3206b4d9f20ea1aa7e1afbee0057466c72d1d07b39d97dde6cdba"

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"3d0121a3c61ea51125844547fdbb737b"
Last-Modified: Sun, 29 Sep 2019 19:56:47 GMT

Body

{
  "users": {
    "id": "263187",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Velit quo pariatur.",
    "lang": "en",
    "role_id": "670566",
    "created_at": 1569787007,
    "updated_at": 1569787007,
    "cached_at": "1569787007.114890000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1563047807,
      "favorites": 1567022207,
      "fences": 1564430207,
      "groups": 1568577407,
      "networks": 0,
      "roles": 1569787007,
      "settings": 1569787007
    }
  }
}

Retrieve the current user

Retrieve the current user who is authorized.

Endpoint

GET /api/v4/users/my

Parameters

Name Description
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

GET /api/v4/users/my

Headers

Authorization: Bearer a5c3a56b9a3466f8d8dade76dab4d0bbf248d21e5c6dc4f40eaf5a0a86fc2c0c

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my" -X GET \
	-H "Authorization: Bearer a5c3a56b9a3466f8d8dade76dab4d0bbf248d21e5c6dc4f40eaf5a0a86fc2c0c"

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"0133853731cf7de26aac7330704d79ef"
Last-Modified: Sun, 29 Sep 2019 19:56:47 GMT

Body

{
  "users": {
    "id": "263196",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "In mollitia soluta.",
    "lang": "en",
    "role_id": "670586",
    "created_at": 1569787007,
    "updated_at": 1569787007,
    "cached_at": "1569787007.678804900"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1568577407,
      "favorites": 1568145407,
      "fences": 1563739007,
      "groups": 1567799807,
      "networks": 0,
      "roles": 1569787007,
      "settings": 1569787007
    }
  }
}

Unarchive a user

Unarchives an archived user. Users must have a role that permits managing users.

Endpoint

POST /api/v4/users/:id/unarchive

Parameters

Name Description
user[email] required (string) the user's email address
user[name] (string) the user's full name
user[details] (string) additional text information about the user
user[lang] (string) preferred locale of the user defaulting to the locale of the authorized user, can be en, en-au, en-ca, en-gb, es
user[phones_attributes] (array) phone objects to attach to the user, each with a 'number' attribute
user[memberships_attributes] (array) membership objects to place the user in the group, each with a 'group_id' attribute
user[role_id] required (string) the ID of the role to assign to the user
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

POST /api/v4/users/263143/unarchive

Headers

Authorization: Bearer 7760e3379f17f26745300b4bed09231a2ca38b01756a2c479d01ab49a7a9e548

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "role_id": "670468"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/263143/unarchive" -d '{"user":{"email":"bojack@simplymadeapps.com","role_id":"670468"}}' -X POST \
	-H "Authorization: Bearer 7760e3379f17f26745300b4bed09231a2ca38b01756a2c479d01ab49a7a9e548"

Response

Simulated Response

Status

200

Headers

ETag: W/"c96a0791df61ff20471a0bd5a3f6c6b9"

Body

{
  "users": {
    "id": "263143",
    "name": "Dr. Fidel Shanahan",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
    "details": "Ex omnis sunt.",
    "lang": "en",
    "role_id": "670468",
    "created_at": 1569787004,
    "updated_at": 1569787004,
    "cached_at": "1569787004.118234200"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1567281404,
      "favorites": 1567281404,
      "fences": 1561579004,
      "groups": 1562875004,
      "networks": 0,
      "roles": 1569787004,
      "settings": 1569787004
    }
  }
}

Unfavorite a status for the current user

Undoes a previous status’ favorite designation for the current user’s Quick Picks.

Endpoint

PATCH /api/v4/users/my/statuses/unfavorite

Parameters

Name Description
status[status] required (string) must be 'in' or 'out'
status[comment] (string) up to 50 character description of the status update

Request

Route

PATCH /api/v4/users/my/statuses/unfavorite

Headers

Authorization: Bearer 54355d53a4cdc95e02be5117f88b02185dd959d1712721d134aaf2070cd05658

Body

{
  "status": {
    "status": "in",
    "comment": "At Lunch"
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/unfavorite" -d '{"status":{"status":"in","comment":"At Lunch"}}' -X PATCH \
	-H "Authorization: Bearer 54355d53a4cdc95e02be5117f88b02185dd959d1712721d134aaf2070cd05658"

Response

Simulated Response

Status

204

Update a user

Updates an existing user. Users must have a role that permits managing the company/users to update users. Companies must have at least one user with the Administrator role, if you attempt to change the role of the last user with the Administrator role, this will result in a less_than error on the base parameter.

Endpoint

PATCH /api/v4/users/:id

Parameters

Name Description
user[email] (string) new user's email address
user[name] (string) new user's full name
user[details] (string) additional text information about the user
user[lang] (string) preferred locale of the user, can be en, en-au, en-ca, en-gb, es
user[phones_attributes] (array) phone objects to attach to the user if both 'id' and 'number' are passed in, the existing phone number will be updated if just 'number' is passed in, a new phone will be added if both 'id' and '_destroy' are passed in ('_destroy' being truthy like 'true' or '1'), the phone number will be removed
user[memberships_attributes] (array) group objects to attach to the user if both 'id' and 'group_id' are passed in, the existing membership will be updated if just 'group_id' is passed in, a new membership will be added if both 'id' and '_destroy' are passed in ('_destroy' being truthy like 'true' or '1'), the group membership will be removed
user[role_id] (string) the ID of the role to assign to the user
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

PATCH /api/v4/users/263181

Headers

Authorization: Bearer 7ad7c2184273320f5a1ca5645718011d4e9f8c940592173465b988b0e27ba8d1

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "(115) 455-5204 x02633"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 10230
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/263181" -d '{"user":{"phones_attributes":[{"number":"(115) 455-5204 x02633"}],"memberships_attributes":[{"group_id":10230}]}}' -X PATCH \
	-H "Authorization: Bearer 7ad7c2184273320f5a1ca5645718011d4e9f8c940592173465b988b0e27ba8d1"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"aa790060e6d93454d75791e33b1dd97f"

Body

{
  "users": {
    "id": "263181",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Praesentium labore quis.",
    "lang": "en",
    "role_id": "670554",
    "created_at": 1569787006,
    "updated_at": 1569787006,
    "cached_at": "1569787006.817328200"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1563134206,
      "favorites": 1568836606,
      "fences": 1566417406,
      "groups": 1569787006,
      "networks": 0,
      "roles": 1569787006,
      "settings": 1569787006
    }
  }
}

Update the current user

Updates the currently authorized user. The current user cannot update their own role.

Endpoint

PATCH /api/v4/users/my

Parameters

Name Description
user[email] (string) new user's email address
user[name] (string) new user's full name
user[details] (string) additional text information about the user
user[lang] (string) preferred locale of the user, can be en, en-au, en-ca, en-gb, es
user[phones_attributes] (array) phone objects to attach to the user if both 'id' and 'number' are passed in, the existing phone number will be updated if just 'number' is passed in, a new phone will be added if both 'id' and '_destroy' are passed in ('_destroy' being truthy like 'true' or '1'), the phone number will be removed
user[memberships_attributes] (array) group objects to attach to the user if both 'id' and 'group_id' are passed in, the existing membership will be updated if just 'group_id' is passed in, a new membership will be added if both 'id' and '_destroy' are passed in ('_destroy' being truthy like 'true' or '1') the group membership will be removed
only (string) comma-delimited list of fields to render only, possibilities include: 'id', 'name', 'email', 'image_url', 'details', 'lang', 'created_at', 'updated_at', 'cached_at'
expand (string) comma-delimited list of extra information to include in the response, possibilities include: 'memberships', 'memberships.group', 'phones', 'status', 'status.application', 'status.changed_by_user', 'recents', 'role'

Request

Route

PATCH /api/v4/users/my

Headers

Authorization: Bearer 923486e80efc7ad5ab5ed476d443c513a16c14b32090d15fd557b3748873633a

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "(550) 669-0762 x035"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 10227
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d '{"user":{"phones_attributes":[{"number":"(550) 669-0762 x035"}],"memberships_attributes":[{"group_id":10227}]}}' -X PATCH \
	-H "Authorization: Bearer 923486e80efc7ad5ab5ed476d443c513a16c14b32090d15fd557b3748873633a"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"25be787da8076f978c09adc78bae2ec8"

Body

{
  "users": {
    "id": "263172",
    "name": "Ines Abshire",
    "email": "mallory@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/a52e9ca0dba44563ab69e63a40cbb771.png?s=270\u0026d=blank",
    "details": "Quasi asperiores quae.",
    "lang": "en",
    "role_id": "670532",
    "created_at": 1569787006,
    "updated_at": 1569787006,
    "cached_at": "1569787006.182652000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565812606,
      "favorites": 1562788606,
      "fences": 1565035006,
      "groups": 1569787006,
      "networks": 0,
      "roles": 1569787006,
      "settings": 1569787006
    }
  }
}