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,
    "networks": 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 specifically what was invalid with the input. Please note that while the key will typically be a parameter on the object, it can occasionally 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 incoming 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, fr, fr-ca. 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

Headers

Content-Type: application/json

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 \
	-H "Content-Type: application/json"

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

Headers

Content-Type: application/json

Body

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_API_CLIENT_ID",
  "client_secret": "YOUR_API_CLIENT_SECRET",
  "code": "fad96012571c5be3eff1f078ccebef99689ea4ba98677c9af0f4503922e7cbf4",
  "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":"fad96012571c5be3eff1f078ccebef99689ea4ba98677c9af0f4503922e7cbf4","redirect_uri":"https://www.simplymadeapps.com/redirect/url"}' -X POST \
	-H "Content-Type: application/json"

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/"fef2fa437849dbedf035209b2dcf0a4a"

Body

{
  "access_token": "92fe92752ec8a681103187e083edba94599335f547f815ea957f46660ddb5ffa",
  "token_type": "bearer",
  "expires_in": 7200,
  "refresh_token": "21b166e334f0eb32325c1a5c171965d010b1d1f1db4779e5b16f32bb4d1b1370",
  "scope": "write",
  "created_at": 1592594063,
  "user": {
    "id": "108148",
    "company_id": "61581",
    "roles": {
      "id": "273990",
      "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": 1592594063,
      "updated_at": 1592594063
    }
  }
}

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

Headers

Content-Type: application/json

Body

{
  "grant_type": "refresh_token",
  "refresh_token": "ifrw5q85os8z4epb18lyefyf4rsxym6m"
}

cURL

curl "https://www.simpleinout.com/oauth/token" -d '{"grant_type":"refresh_token","refresh_token":"ifrw5q85os8z4epb18lyefyf4rsxym6m"}' -X POST \
	-H "Content-Type: application/json"

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/"fa006a3fb1fdf024a4c2f4aae7ab929e"

Body

{
  "access_token": "6999778df7dfe7d7490deb05793734920f8100ed0d56ffd2ba41e8f94921fd7a",
  "token_type": "bearer",
  "expires_in": 7200,
  "refresh_token": "672e6816ba90a1ed56fa7f34f6b5f8264a7a97a7db19c40440a0a5f3afef2bd1",
  "scope": "write",
  "created_at": 1592594063,
  "user": {
    "id": "108147",
    "company_id": "61580",
    "roles": {
      "id": "273986",
      "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": 1592594063,
      "updated_at": 1592594063
    }
  }
}

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

Headers

Content-Type: application/json

Body

{
  "client_id": "PLACE_YOUR_API_CLIENT_ID_HERE",
  "client_secret": "PLACE_YOUR_API_CLIENT_SECRET_HERE",
  "token": "3c1fedc71788f22f162ca282a6d93ae1b8f4f66764447ac19b316bafe021f3ae"
}

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":"3c1fedc71788f22f162ca282a6d93ae1b8f4f66764447ac19b316bafe021f3ae"}' -X POST \
	-H "Content-Type: application/json"

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

Content-Type: application/json
Authorization: Bearer f7c0259322fc71167a04396ef56b2a3e8580e3f575935bb64b741d33a763d4dd

cURL

curl -g "https://www.simpleinout.com/oauth/token/info" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer f7c0259322fc71167a04396ef56b2a3e8580e3f575935bb64b741d33a763d4dd"

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/"63af54764262a0caad7b2b54906ea54d"

Body

{
  "resource_owner_id": 108146,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "6392807579860"
  },
  "created_at": 1592594063
}

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

Content-Type: application/json
Authorization: Bearer c7538422bad5b00bf07bddbd82be5d97e66c8c8b7888915b3626ce54b48d7565

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 "Content-Type: application/json" \
	-H "Authorization: Bearer c7538422bad5b00bf07bddbd82be5d97e66c8c8b7888915b3626ce54b48d7565"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"1754c68baf69985bdd2a420a22caa8e6"

Body

{
  "beacons": {
    "id": "5321",
    "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": 1592594064,
    "updated_at": 1592594064
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1592594064,
      "favorites": 1584645263,
      "fences": 1587496463,
      "groups": 1591816463,
      "networks": 1589224463,
      "roles": 1592594063,
      "settings": 1592594063
    }
  }
}

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/5322

Headers

Content-Type: application/json
Authorization: Bearer 285eea7ac42686fddb6d6e9342aba53094e202015cb4ef230fcfd794052c0b5e

cURL

curl "https://www.simpleinout.com/api/v4/beacons/5322" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 285eea7ac42686fddb6d6e9342aba53094e202015cb4ef230fcfd794052c0b5e"

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

Content-Type: application/json
Authorization: Bearer 150701caa1bc3ad044171fdf951f912486ebd1095bbdd92b49427a2ef7d72dff

cURL

curl -g "https://www.simpleinout.com/api/v4/beacons" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 150701caa1bc3ad044171fdf951f912486ebd1095bbdd92b49427a2ef7d72dff"

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"6a8ab3555aa904e85720e120ad2c5382"
Last-Modified: Fri, 19 Jun 2020 19:14:24 GMT

Body

{
  "beacons": [
    {
      "id": "5324",
      "name": "Franecki-Nienow",
      "uuid": "502B01E8-E4B6-401B-93DE-8B4B212B5417",
      "comment_on_entry": "In at Franecki-Nienow",
      "comment_on_exit": "Left Franecki-Nienow",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594064,
      "updated_at": 1592594064
    },
    {
      "id": "5323",
      "name": "Oberbrunner-Mayer",
      "uuid": "5EBB0157-FDCF-45DB-AF09-A7FECDCBE9D9",
      "comment_on_entry": "In at Oberbrunner-Mayer",
      "comment_on_exit": "Left Oberbrunner-Mayer",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594064,
      "updated_at": 1592594064
    }
  ],
  "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": 1592594064,
      "favorites": 1587582864,
      "fences": 1584213264,
      "groups": 1584990864,
      "networks": 1589829264,
      "roles": 1592594064,
      "settings": 1592594064
    }
  }
}

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/5325

Headers

Content-Type: application/json
Authorization: Bearer 0915e21c5029a81b4dce3c42bfaf04c6301564454579aea8f408934db7e1e434

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/beacons/5325" -d '{"beacon":{"name":"My Renamed Office"}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 0915e21c5029a81b4dce3c42bfaf04c6301564454579aea8f408934db7e1e434"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"4a83218b6ce3ee9a823db19c03f6422d"

Body

{
  "beacons": {
    "id": "5325",
    "name": "My Renamed Office",
    "uuid": "A42DCE36-C585-40DF-8076-B6D6DE4DB245",
    "comment_on_entry": "In at Little-Schinner",
    "comment_on_exit": "Left Little-Schinner",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1592594064,
    "updated_at": 1592594064
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1592594064,
      "favorites": 1588619664,
      "fences": 1590174864,
      "groups": 1588360464,
      "networks": 1591298064,
      "roles": 1592594064,
      "settings": 1592594064
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 161f0a28d636b4ced7b6644fb76f5a2396af248f47adfaffbd20445e7bb3f0b1

cURL

curl -g "https://www.simpleinout.com/api/v4/companies/my" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 161f0a28d636b4ced7b6644fb76f5a2396af248f47adfaffbd20445e7bb3f0b1"

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/"81cb5549aa0bc2f81df09a0c7cb0609d"
Last-Modified: Fri, 19 Jun 2020 19:14:18 GMT

Body

{
  "companies": {
    "id": "61550",
    "name": "Mraz Inc",
    "scheduled_statuses": true,
    "default_role_id": "273868",
    "logo_url": null,
    "created_at": 1592594058
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1588533258,
      "favorites": 1589138058,
      "fences": 1592334858,
      "groups": 1589483658,
      "networks": 1591816458,
      "roles": 1592594058,
      "settings": 1592594058
    }
  }
}

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/2752

Headers

Content-Type: application/json
Authorization: Bearer 726b0fe14721c68014f119a8df538cb46d3655a0d66392aa823e78793b140213

cURL

curl "https://www.simpleinout.com/api/v4/futures/2752" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 726b0fe14721c68014f119a8df538cb46d3655a0d66392aa823e78793b140213"

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

Content-Type: application/json
Authorization: Bearer 11579bb83195ec968600fe599d0c0ac8ebd1143268ea88896bf122d6145cc635

cURL

curl -g "https://www.simpleinout.com/api/v4/futures" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 11579bb83195ec968600fe599d0c0ac8ebd1143268ea88896bf122d6145cc635"

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"514b4758f549787d90965fcc06d10a12"
Last-Modified: Fri, 19 Jun 2020 19:14:15 GMT

Body

{
  "futures": [
    {
      "id": "2750",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1595185200,
      "user_id": "108073",
      "changed_by_user_id": null
    },
    {
      "id": "2751",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1608408000,
      "user_id": "108073",
      "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": 1585509255,
      "favorites": 1591557255,
      "fences": 1591643655,
      "groups": 1584990855,
      "networks": 1591211655,
      "roles": 1592594055,
      "settings": 1592594055
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 942233e7ad4c0716ec607b6a941002d191cf6a0eff4e1a9a7a20837ab4be01eb

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 942233e7ad4c0716ec607b6a941002d191cf6a0eff4e1a9a7a20837ab4be01eb"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"f178fb6a63ca8427849a053f669f0673"

Body

{
  "fences": {
    "id": "1614",
    "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": 1592594054,
    "updated_at": 1592594054
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1587064453,
      "favorites": 1587150853,
      "fences": 1592594054,
      "groups": 1584645253,
      "networks": 1588533253,
      "roles": 1592594053,
      "settings": 1592594053
    }
  }
}

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/1617

Headers

Content-Type: application/json
Authorization: Bearer 4693cb4514771ece53565eba6a8e9a430242de48d7b07e56b6424b26637352b5

cURL

curl "https://www.simpleinout.com/api/v4/fences/1617" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 4693cb4514771ece53565eba6a8e9a430242de48d7b07e56b6424b26637352b5"

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

Content-Type: application/json
Authorization: Bearer e81e3a1fa1fd8c8a46010883fa8dcefcf8551ec9d744fc14eece116fee1d5b0b

cURL

curl -g "https://www.simpleinout.com/api/v4/fences" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer e81e3a1fa1fd8c8a46010883fa8dcefcf8551ec9d744fc14eece116fee1d5b0b"

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"7df204772f4d7bf76e928943a0228c69"
Last-Modified: Fri, 19 Jun 2020 19:14:14 GMT

Body

{
  "fences": [
    {
      "id": "1616",
      "name": "zcie67n3rp0rgzmz4a8y",
      "latitude": "-67.1455999716",
      "longitude": "-116.3519527388",
      "radius": 4947,
      "comment_on_entry": "In at zcie67n3rp0rgzmz4a8y",
      "comment_on_exit": "Left zcie67n3rp0rgzmz4a8y",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594054,
      "updated_at": 1592594054
    },
    {
      "id": "1615",
      "name": "anilb1jkdjcgb1164nfs",
      "latitude": "21.8725609679",
      "longitude": "124.2930023497",
      "radius": 6977,
      "comment_on_entry": "In at anilb1jkdjcgb1164nfs",
      "comment_on_exit": "Left anilb1jkdjcgb1164nfs",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594054,
      "updated_at": 1592594054
    }
  ],
  "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": 1590779654,
      "favorites": 1592507654,
      "fences": 1592594054,
      "groups": 1588274054,
      "networks": 1591125254,
      "roles": 1592594054,
      "settings": 1592594054
    }
  }
}

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/1618

Headers

Content-Type: application/json
Authorization: Bearer 89ce42f27cbede70fc7e2793cea43c41f75c659dd0aac9db483227139639d9ae

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/fences/1618" -d '{"fence":{"name":"My Renamed Geofence"}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 89ce42f27cbede70fc7e2793cea43c41f75c659dd0aac9db483227139639d9ae"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"939f0433335b85b4b391b9afb0df5687"

Body

{
  "fences": {
    "id": "1618",
    "name": "My Renamed Geofence",
    "latitude": "-50.4318639874",
    "longitude": "119.7075407932",
    "radius": 12398,
    "comment_on_entry": "In at 450v9h1kbxiw2m044d5z",
    "comment_on_exit": "Left 450v9h1kbxiw2m044d5z",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1592594054,
    "updated_at": 1592594054
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1586978054,
      "favorites": 1591211654,
      "fences": 1592594054,
      "groups": 1592507654,
      "networks": 1586978054,
      "roles": 1592594054,
      "settings": 1592594054
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 57e39966a90c8f7d393dff0e640e16a5cc9f8fc1681b36978eb979cf1794f2f9

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/groups" -d '{"group":{"name":"New Department"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 57e39966a90c8f7d393dff0e640e16a5cc9f8fc1681b36978eb979cf1794f2f9"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"adf3c89bd2dbc5c11401835c49e8cc66"

Body

{
  "groups": {
    "id": "4304",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1589224459,
      "favorites": 1590952459,
      "fences": 1587582859,
      "groups": 1592594059,
      "networks": 1587150859,
      "roles": 1592594059,
      "settings": 1592594059
    }
  }
}

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/4307

Headers

Content-Type: application/json
Authorization: Bearer b187d37f10ecd6aebc03176ff0ecd2c8ba9c7e27b6e68fdba0f863bd622faeb5

cURL

curl "https://www.simpleinout.com/api/v4/groups/4307" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer b187d37f10ecd6aebc03176ff0ecd2c8ba9c7e27b6e68fdba0f863bd622faeb5"

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

Content-Type: application/json
Authorization: Bearer 986fe303106ce238fdac03e9b646bf195b0fea45a5acc94b15874071c487b9b5

cURL

curl -g "https://www.simpleinout.com/api/v4/groups" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 986fe303106ce238fdac03e9b646bf195b0fea45a5acc94b15874071c487b9b5"

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"335bca59ddd1092fc9028d6ec22e690f"
Last-Modified: Fri, 19 Jun 2020 19:14:19 GMT

Body

{
  "groups": [
    {
      "id": "4306",
      "name": "Wiegand, Hansen and Buckridge"
    },
    {
      "id": "4305",
      "name": "Mante Group"
    }
  ],
  "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": 1587237259,
      "favorites": 1592507659,
      "fences": 1591298059,
      "groups": 1592594059,
      "networks": 1586978059,
      "roles": 1592594059,
      "settings": 1592594059
    }
  }
}

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/4308

Headers

Content-Type: application/json
Authorization: Bearer acc91e7cab7ac8ab269262f1d38d043cdc980e0209aeee2befcc5d07fade0731

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/groups/4308" -d '{"group":{"name":"Renamed Department"}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer acc91e7cab7ac8ab269262f1d38d043cdc980e0209aeee2befcc5d07fade0731"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"77be90553c67887db385918fa983c589"

Body

{
  "groups": {
    "id": "4308",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1584558860,
      "favorites": 1587323660,
      "fences": 1588706060,
      "groups": 1592594060,
      "networks": 1590606860,
      "roles": 1592594060,
      "settings": 1592594060
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 7b92b0ccdc33b5b50f9d7dad0b317695ec5be61c05190c18163ddc901a482666

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 7b92b0ccdc33b5b50f9d7dad0b317695ec5be61c05190c18163ddc901a482666"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"592985a7329fdf4964f00bf9662b5c65"

Body

{
  "networks": {
    "id": "1466",
    "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": 1592594062,
    "updated_at": 1592594062
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1592162062,
      "favorites": 1591989262,
      "fences": 1586546062,
      "groups": 1590088462,
      "networks": 1592594062,
      "roles": 1592594062,
      "settings": 1592594062
    }
  }
}

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/1469

Headers

Content-Type: application/json
Authorization: Bearer e30148b4053fd6914350fad9623655c9596b7ac7c76ded74e2cf5f4caefe321e

cURL

curl "https://www.simpleinout.com/api/v4/networks/1469" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer e30148b4053fd6914350fad9623655c9596b7ac7c76ded74e2cf5f4caefe321e"

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

Content-Type: application/json
Authorization: Bearer b87880bb88bf032dc90a315f9268b50ebc719b5488c2ca9bd0662c4918f6d8c0

cURL

curl -g "https://www.simpleinout.com/api/v4/networks" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer b87880bb88bf032dc90a315f9268b50ebc719b5488c2ca9bd0662c4918f6d8c0"

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"189267d8259d0783fdfec2ebd2172c98"
Last-Modified: Fri, 19 Jun 2020 19:14:22 GMT

Body

{
  "networks": [
    {
      "id": "1467",
      "name": "Bernier-Effertz",
      "ssid": "rvbe7koldsokwdgyd68ruzqlsiq7sd7x",
      "comment_on_entry": "In at Bernier-Effertz",
      "comment_on_exit": "Left Bernier-Effertz",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594062,
      "updated_at": 1592594062
    },
    {
      "id": "1468",
      "name": "Kertzmann, Gislason and Kling",
      "ssid": "15y7fln9yuwu7zas0tdsi6fswtc88cta",
      "comment_on_entry": "In at Kertzmann, Gislason and Kling",
      "comment_on_exit": "Left Kertzmann, Gislason and Kling",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1592594062,
      "updated_at": 1592594062
    }
  ],
  "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": 1590261262,
      "favorites": 1586027662,
      "fences": 1591643662,
      "groups": 1585595662,
      "networks": 1592594062,
      "roles": 1592594062,
      "settings": 1592594062
    }
  }
}

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/1470

Headers

Content-Type: application/json
Authorization: Bearer 495d8fd2e511a92070389ce8a19aacab6dbb51d50aef6a173fdf678f37bd56ef

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/networks/1470" -d '{"network":{"name":"My Renamed Office"}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 495d8fd2e511a92070389ce8a19aacab6dbb51d50aef6a173fdf678f37bd56ef"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"914e7ceffd0ac987610d2c0d519b0f14"

Body

{
  "networks": {
    "id": "1470",
    "name": "My Renamed Office",
    "ssid": "9mj2st4u338tt1x066njjaf1lmi01bih",
    "comment_on_entry": "In at Pacocha, Rice and Boyle",
    "comment_on_exit": "Left Pacocha, Rice and Boyle",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1592594063,
    "updated_at": 1592594063
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1589915663,
      "favorites": 1587496463,
      "fences": 1584558863,
      "groups": 1591470863,
      "networks": 1592594063,
      "roles": 1592594063,
      "settings": 1592594063
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 468cef74c006662e0370360a98e8e97ba4894ec3718ba08e2f45941f18d16afe

cURL

curl -g "https://www.simpleinout.com/api/v4/ok" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 468cef74c006662e0370360a98e8e97ba4894ec3718ba08e2f45941f18d16afe"

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

Content-Type: application/json
Authorization: Bearer 38253e7d066de79084f58fa00eec736c308dcea9c86bab426d8dc5f60697cb41

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 38253e7d066de79084f58fa00eec736c308dcea9c86bab426d8dc5f60697cb41"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"7b632d7ecd031e08169d2216e968db19"

Body

{
  "roles": {
    "id": "273847",
    "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": 1592594057,
    "updated_at": 1592594057
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1586805257,
      "favorites": 1588619657,
      "fences": 1589483657,
      "groups": 1588446857,
      "networks": 1590347657,
      "roles": 1592594057,
      "settings": 1592594057
    }
  }
}

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/273857

Headers

Content-Type: application/json
Authorization: Bearer b5042b0ff6c3a5e3f0ef02891483fc386b8c3df1a0dd0a58c74b22151f269f79

cURL

curl "https://www.simpleinout.com/api/v4/roles/273857" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer b5042b0ff6c3a5e3f0ef02891483fc386b8c3df1a0dd0a58c74b22151f269f79"

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

Content-Type: application/json
Authorization: Bearer 7dded360e64b9592e6a9d87f2284fbfe5378fffda886a4a80b836ddfccb4631a

cURL

curl -g "https://www.simpleinout.com/api/v4/roles" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 7dded360e64b9592e6a9d87f2284fbfe5378fffda886a4a80b836ddfccb4631a"

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"c8778bc9c9514b60c32616916c7f43ae"
Last-Modified: Fri, 19 Jun 2020 19:14:17 GMT

Body

{
  "roles": [
    {
      "id": "273839",
      "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": 1592594057,
      "updated_at": 1592594057
    },
    {
      "id": "273840",
      "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": 1592594057,
      "updated_at": 1592594057
    },
    {
      "id": "273841",
      "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": 1592594057,
      "updated_at": 1592594057
    },
    {
      "id": "273842",
      "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": 1592594057,
      "updated_at": 1592594057
    }
  ],
  "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": 1588878857,
      "favorites": 1591298057,
      "fences": 1588533257,
      "groups": 1585077257,
      "networks": 1587237257,
      "roles": 1592594057,
      "settings": 1592594057
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/273838

Headers

Content-Type: application/json
Authorization: Bearer c35750320be6289cb498418a9e0d791d0de8db077cffb1d9ff9d2da65837c0c4

cURL

curl -g "https://www.simpleinout.com/api/v4/roles/273838" -X GET \
	-H "Content-Type: application/json" \
	-H "Sio-Version: 1.0.0" \
	-H "Authorization: Bearer c35750320be6289cb498418a9e0d791d0de8db077cffb1d9ff9d2da65837c0c4"

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"357422796a0b6edf4498e87fbe5e390a"
Last-Modified: Fri, 19 Jun 2020 19:14:17 GMT

Body

{
  "roles": {
    "id": "273838",
    "name": "Stroman 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": 1592594057,
    "updated_at": 1592594057
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1586373257,
      "favorites": 1589656457,
      "fences": 1592075657,
      "groups": 1585250057,
      "networks": 1591211657,
      "roles": 1592594057,
      "settings": 1592594057
    },
    "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/273852

Headers

Content-Type: application/json
Authorization: Bearer 343f4948b0c3ee13a7b04f2feceafedae04b57004d55ff5d73c6ec799afcdbe2

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/273852" -d '{"role":{"name":"My Renamed Role","billing":false,"view_others_archives":true,"view_others_futures":true}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 343f4948b0c3ee13a7b04f2feceafedae04b57004d55ff5d73c6ec799afcdbe2"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"f190985211c978aa7f54df59c9a6e90d"

Body

{
  "roles": {
    "id": "273852",
    "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": 1592594057,
    "updated_at": 1592594057
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1586027657,
      "favorites": 1585077257,
      "fences": 1585422857,
      "groups": 1587669257,
      "networks": 1587410057,
      "roles": 1592594057,
      "settings": 1592594057
    }
  }
}

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
automatic (boolean) only find automatic statuses
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', 'automatic'
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=1591938000..1592197199

Headers

Content-Type: application/json
Authorization: Bearer d53f43529bac8d907c6f680d79bb483d1ed708a5c32ea5954957edef939ebeef

Query Parameters

created_at=1591938000..1592197199

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1591938000..1592197199" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer d53f43529bac8d907c6f680d79bb483d1ed708a5c32ea5954957edef939ebeef"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"4e8873958a14411fa65d595ca7858602"
Last-Modified: Sat, 13 Jun 2020 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1591945200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1591959600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1591963200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1591981200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": true,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1592031600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "108084",
      "changed_by_user_id": null,
      "created_at": 1592053200
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "automatic": false,
      "user_id": "108084",
      "changed_by_user_id": "108085",
      "created_at": 1592056800
    }
  ],
  "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=1591938000..1592197199",
      "last_href": "http://example.org/api/v4/statuses?created_at=1591938000..1592197199",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1588014856,
      "favorites": 1592248456,
      "fences": 1588446856,
      "groups": 1591470856,
      "networks": 1586200456,
      "roles": 1592594056,
      "settings": 1592594056
    }
  }
}

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/108095/archive

Headers

Content-Type: application/json
Authorization: Bearer 2075879bf75699591fc7a678340e6aff638bd6426e74c1a219b61581bc132695

cURL

curl "https://www.simpleinout.com/api/v4/users/108095/archive" -d '' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 2075879bf75699591fc7a678340e6aff638bd6426e74c1a219b61581bc132695"

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/108180/futures

Headers

Content-Type: application/json
Authorization: Bearer 79f889c3e03808006b99139326e447d8ce4c56c0984f6dd01d972821efbe17b6

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/108180/futures" -d '{"future":{"status":"out","apply_at":1597863600,"comment":"On Vacation"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 79f889c3e03808006b99139326e447d8ce4c56c0984f6dd01d972821efbe17b6"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"eaec31b4bba477a3618d07e662f94fa6"

Body

{
  "futures": {
    "id": "2757",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1597863600,
    "user_id": "108180",
    "changed_by_user_id": "108179"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1587669267,
      "favorites": 1592421267,
      "fences": 1585509267,
      "groups": 1584040467,
      "networks": 1590779667,
      "roles": 1592594067,
      "settings": 1592594067
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 08f13c7a457d54a6b29d45a0c2db815d83f2fb6c1f5ac3fdc57efe1b21800b62

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/my/futures" -d '{"future":{"status":"out","apply_at":1597863600,"comment":"On Vacation"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 08f13c7a457d54a6b29d45a0c2db815d83f2fb6c1f5ac3fdc57efe1b21800b62"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"1f2733bfa8648f0bc7adb568e55166bf"

Body

{
  "futures": {
    "id": "2758",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1597863600,
    "user_id": "108191",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1592334867,
      "favorites": 1592507667,
      "fences": 1591557267,
      "groups": 1586632467,
      "networks": 1590434067,
      "roles": 1592594068,
      "settings": 1592594068
    }
  }
}

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 parameter 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/108188/statuses

Headers

Content-Type: application/json
Authorization: Bearer 70e213e35e61760b9337f7168c2cd3fdb529808992116c299db41546ccbfdd7f

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/108188/statuses" -d '{"status":{"status":"in","comment":"In at HQ"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 70e213e35e61760b9337f7168c2cd3fdb529808992116c299db41546ccbfdd7f"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"624c3a9975525e2e974681bd05f0f502"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "108188",
    "changed_by_user_id": "108187",
    "created_at": 1592594067
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1590002067,
      "favorites": 1584472467,
      "fences": 1588965267,
      "groups": 1589829267,
      "networks": 1589742867,
      "roles": 1592594067,
      "settings": 1592594067
    }
  }
}

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 parameter 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

Content-Type: application/json
Authorization: Bearer 3b43f7a389a50b7712aacb7c9e78218dc1b7d6448f5906f794b9aafe89353cc5

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 3b43f7a389a50b7712aacb7c9e78218dc1b7d6448f5906f794b9aafe89353cc5"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"53031dbc9fa563d22f78c9b735d15665"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "108158",
    "changed_by_user_id": null,
    "created_at": 1592594065
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1589915664,
      "favorites": 1591384464,
      "fences": 1591989264,
      "groups": 1584126864,
      "networks": 1587150864,
      "roles": 1592594064,
      "settings": 1592594064
    }
  }
}

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, fr, fr-ca
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

Content-Type: application/json
Authorization: Bearer f98452baf8dc48742cc92efc48f51d0e5b6a2298e117e4252301b728adecbbbd

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "name": "Bojack Horseman",
    "details": "Lead Actor",
    "lang": "en",
    "phones_attributes": [
      {
        "number": "(781) 175-2194"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 4309
      }
    ],
    "role_id": "274014"
  }
}

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":"(781) 175-2194"}],"memberships_attributes":[{"group_id":4309}],"role_id":"274014"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer f98452baf8dc48742cc92efc48f51d0e5b6a2298e117e4252301b728adecbbbd"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"6e86db62d1822f4171aeb56c340d4138"

Body

{
  "users": {
    "id": "108157",
    "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": "274014",
    "created_at": 1592594064,
    "updated_at": 1592594064,
    "cached_at": "1592594064.845783000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1589829264,
      "favorites": 1591298064,
      "fences": 1584040464,
      "groups": 1592594064,
      "networks": 1591384464,
      "roles": 1592594064,
      "settings": 1592594064
    }
  }
}

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/108182

Headers

Content-Type: application/json
Authorization: Bearer ba56a8ea7741e52a010d541c64fb1a0221c0b73f43392845d63c231ec42bc97a

cURL

curl "https://www.simpleinout.com/api/v4/users/108182" -d '' -X DELETE \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer ba56a8ea7741e52a010d541c64fb1a0221c0b73f43392845d63c231ec42bc97a"

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

Content-Type: application/json
Authorization: Bearer 7f906f2cf930f2dc771b812d5bb4c90b42270f474146056e562cd01ee442fa36

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 7f906f2cf930f2dc771b812d5bb4c90b42270f474146056e562cd01ee442fa36"

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

Content-Type: application/json
Authorization: Bearer 07737c32f98f7c3887db6daaadc1d16577fcd5b1d5df58346f1fc18056b8983a

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 07737c32f98f7c3887db6daaadc1d16577fcd5b1d5df58346f1fc18056b8983a"

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

Content-Type: application/json
Authorization: Bearer f27ab2c4cae2bf076ea523a4230367a7ffc323eb0f6214ed2cf67bc0b158b38e

Query Parameters

archived=true

cURL

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

Response

Simulated Response

Status

200

Headers

ETag: W/"3cd39a0c77bf8f6bd56e60f654c42499"
Last-Modified: Fri, 19 Jun 2020 19:14:17 GMT

Body

{
  "users": [
    {
      "id": "108093",
      "name": "Oren Ebert",
      "email": null,
      "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
      "details": "Soluta sint reprehenderit.",
      "lang": "en",
      "role_id": null,
      "created_at": 1592594057,
      "updated_at": 1592594057,
      "cached_at": "1592594057.978168000"
    }
  ],
  "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": 1588792457,
      "favorites": 1587323657,
      "fences": 1586286857,
      "groups": 1587928457,
      "networks": 1588274057,
      "roles": 1592594057,
      "settings": 1592594057
    },
    "trusted_cached_at": "1592594043.089653000"
  }
}

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/108169/futures

Headers

Content-Type: application/json
Authorization: Bearer c348188e22307a1ac012f9f2839d7c005b168805979f1f694c5231688244937b

cURL

curl -g "https://www.simpleinout.com/api/v4/users/108169/futures" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer c348188e22307a1ac012f9f2839d7c005b168805979f1f694c5231688244937b"

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"89f84b0448f5c0ed12fcb52eedc37ff8"
Last-Modified: Fri, 19 Jun 2020 19:14:25 GMT

Body

{
  "futures": [
    {
      "id": "2755",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1593154800,
      "user_id": "108169",
      "changed_by_user_id": null
    },
    {
      "id": "2756",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1598612400,
      "user_id": "108169",
      "changed_by_user_id": "108170"
    }
  ],
  "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/108169/futures?user_id=108169",
      "last_href": "http://example.org/api/v4/users/108169/futures?user_id=108169",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1588014865,
      "favorites": 1586200465,
      "fences": 1588446865,
      "groups": 1591989265,
      "networks": 1586200465,
      "roles": 1592594065,
      "settings": 1592594065
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer b58167867ce77b44ee12471e46a0bc92840c7bf94635353a3d8216cefd7a1e1b

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/futures" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer b58167867ce77b44ee12471e46a0bc92840c7bf94635353a3d8216cefd7a1e1b"

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"7aaa228c575e998e18eda47f4a03e8c7"
Last-Modified: Fri, 19 Jun 2020 19:14:25 GMT

Body

{
  "futures": [
    {
      "id": "2753",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1593154800,
      "user_id": "108164",
      "changed_by_user_id": null
    },
    {
      "id": "2754",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1598612400,
      "user_id": "108164",
      "changed_by_user_id": "108165"
    }
  ],
  "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=108164",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=108164",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1584213265,
      "favorites": 1588187665,
      "fences": 1585077265,
      "groups": 1585682065,
      "networks": 1588014865,
      "roles": 1592594065,
      "settings": 1592594065
    }
  }
}

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/108173/statuses?created_at=1591938000..1592197199

Headers

Content-Type: application/json
Authorization: Bearer ddf6edd953cc5c89a22cc6443c92c20def37e31e42d686ee997ac83f39638fca

Query Parameters

created_at=1591938000..1592197199

cURL

curl -g "https://www.simpleinout.com/api/v4/users/108173/statuses?created_at=1591938000..1592197199" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer ddf6edd953cc5c89a22cc6443c92c20def37e31e42d686ee997ac83f39638fca"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"4af96abe38f162bdaafb34c6ba7d5167"
Last-Modified: Sat, 13 Jun 2020 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1591945200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1591959600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1591963200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1591981200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1592031600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": null,
      "created_at": 1592053200
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "108173",
      "changed_by_user_id": "108174",
      "created_at": 1592056800
    }
  ],
  "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/108173/statuses?created_at=1591938000..1592197199\u0026user_id=108173",
      "last_href": "http://example.org/api/v4/users/108173/statuses?created_at=1591938000..1592197199\u0026user_id=108173",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1589138066,
      "favorites": 1588965266,
      "fences": 1586200466,
      "groups": 1588187666,
      "networks": 1585163666,
      "roles": 1592594066,
      "settings": 1592594066
    }
  }
}

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=1591938000..1592197199

Headers

Content-Type: application/json
Authorization: Bearer c113dea5118193fd93e5220bd673b9d10eca7351ce4a36f1905459f6d6fa36b1

Query Parameters

created_at=1591938000..1592197199

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/statuses?created_at=1591938000..1592197199" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer c113dea5118193fd93e5220bd673b9d10eca7351ce4a36f1905459f6d6fa36b1"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"52e236d51a58086f358aab0e3bf7da5e"
Last-Modified: Sat, 13 Jun 2020 14:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1591945200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1591959600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1591963200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1591981200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1592031600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": null,
      "created_at": 1592053200
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "108195",
      "changed_by_user_id": "108196",
      "created_at": 1592056800
    }
  ],
  "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=1591938000..1592197199\u0026user_id=108195",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1591938000..1592197199\u0026user_id=108195",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1584990868,
      "favorites": 1589310868,
      "fences": 1585682068,
      "groups": 1592421268,
      "networks": 1584818068,
      "roles": 1592594068,
      "settings": 1592594068
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 029fb679b0a3a1e522762e67fd2e0525c0fca694a5f1e37d2681053861916e8a

cURL

curl -g "https://www.simpleinout.com/api/v4/users" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 029fb679b0a3a1e522762e67fd2e0525c0fca694a5f1e37d2681053861916e8a"

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/"ea22afc8ff1a6736d941ed5c6fc06432"
Last-Modified: Fri, 19 Jun 2020 19:14:28 GMT

Body

{
  "users": [
    {
      "id": "108200",
      "name": "Ray Gillette",
      "email": "ray@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/568d24da7c180b33aaff58442062126d.png?s=270\u0026d=blank",
      "details": "Nostrum aspernatur voluptates.",
      "lang": "en",
      "role_id": "274104",
      "created_at": 1592594068,
      "updated_at": 1592594068,
      "cached_at": "1592594068.775563000"
    },
    {
      "id": "108199",
      "name": "Lana Kane",
      "email": "lana@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/59b99926dd1b78d777b8ee0fd2c65575.png?s=270\u0026d=blank",
      "details": "Quos ea qui.",
      "lang": "en",
      "role_id": "274104",
      "created_at": 1592594068,
      "updated_at": 1592594068,
      "cached_at": "1592594068.757037200"
    },
    {
      "id": "108198",
      "name": "Sterling Archer",
      "email": "sterling@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
      "details": "Sapiente qui at.",
      "lang": "en",
      "role_id": "274104",
      "created_at": 1592594068,
      "updated_at": 1592594068,
      "cached_at": "1592594068.735049000"
    },
    {
      "id": "108197",
      "name": "Malory Archer",
      "email": "malory@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/551eccbc6a509e7d8121efb87dffaf6f.png?s=270\u0026d=blank",
      "details": "Voluptatibus id illum.",
      "lang": "en",
      "role_id": "274102",
      "created_at": 1592594068,
      "updated_at": 1592594068,
      "cached_at": "1592594068.717451000"
    }
  ],
  "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": 1589656468,
      "favorites": 1592075668,
      "fences": 1592594068,
      "groups": 1590779668,
      "networks": 1591211668,
      "roles": 1592594068,
      "settings": 1592594068
    },
    "trusted_cached_at": "1592594053.850668000"
  }
}

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/108162

Headers

Content-Type: application/json
Authorization: Bearer 0076c34db11dccf67e7197c09a6ad7032ef3519af825cb3264df9ebaec272dee

cURL

curl -g "https://www.simpleinout.com/api/v4/users/108162" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 0076c34db11dccf67e7197c09a6ad7032ef3519af825cb3264df9ebaec272dee"

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"cd5b0f0fa1ca89b3dfe3a6bfb2fdccf8"
Last-Modified: Fri, 19 Jun 2020 19:14:25 GMT

Body

{
  "users": {
    "id": "108162",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Blanditiis veritatis rem.",
    "lang": "en",
    "role_id": "274028",
    "created_at": 1592594065,
    "updated_at": 1592594065,
    "cached_at": "1592594065.311450000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1587237265,
      "favorites": 1589397265,
      "fences": 1586805265,
      "groups": 1587582865,
      "networks": 1591557265,
      "roles": 1592594065,
      "settings": 1592594065
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer dca702ebaf181b385ac6bb3a044778857637a1fd6ac23d46b4e915bb18baaa2c

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer dca702ebaf181b385ac6bb3a044778857637a1fd6ac23d46b4e915bb18baaa2c"

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"2b8b9945bd18a79f24a5b451c14b59cf"
Last-Modified: Fri, 19 Jun 2020 19:14:27 GMT

Body

{
  "users": {
    "id": "108184",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Commodi consectetur quibusdam.",
    "lang": "en",
    "role_id": "274076",
    "created_at": 1592594067,
    "updated_at": 1592594067,
    "cached_at": "1592594067.423927000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1590606867,
      "favorites": 1585682067,
      "fences": 1590520467,
      "groups": 1592334867,
      "networks": 1592075667,
      "roles": 1592594067,
      "settings": 1592594067
    }
  }
}

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, fr, fr-ca
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/108105/unarchive

Headers

Content-Type: application/json
Authorization: Bearer 99ece483a5600944f65d1646ab0f24dfe09d1586532cd19deb4f2e818c02240d

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/108105/unarchive" -d '{"user":{"email":"bojack@simplymadeapps.com","role_id":"273890"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 99ece483a5600944f65d1646ab0f24dfe09d1586532cd19deb4f2e818c02240d"

Response

Simulated Response

Status

200

Headers

ETag: W/"2cd72b2d45bd372c5f085687762f6ba3"

Body

{
  "users": {
    "id": "108105",
    "name": "Dr. Nia Carter",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
    "details": "Quasi vel ratione.",
    "lang": "en",
    "role_id": "273890",
    "created_at": 1592594059,
    "updated_at": 1592594059,
    "cached_at": "1592594059.512799000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1592594059,
      "favorites": 1590088459,
      "fences": 1588533259,
      "groups": 1589829259,
      "networks": 1586718859,
      "roles": 1592594059,
      "settings": 1592594059
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 6ed7d2e25ae84e44b095ea7f9dd972297a7cf9a06f62ae230e965f3970168a8e

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 "Content-Type: application/json" \
	-H "Authorization: Bearer 6ed7d2e25ae84e44b095ea7f9dd972297a7cf9a06f62ae230e965f3970168a8e"

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, fr, fr-ca
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/108193

Headers

Content-Type: application/json
Authorization: Bearer 49511b4161d49fbc67efaecfbcad991dff694e53d0fadf07a46fa3526b7ebd7a

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "255.221.2613 x477"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 4314
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/108193" -d '{"user":{"phones_attributes":[{"number":"255.221.2613 x477"}],"memberships_attributes":[{"group_id":4314}]}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 49511b4161d49fbc67efaecfbcad991dff694e53d0fadf07a46fa3526b7ebd7a"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"ae5d51e6eb7fe38435d989b9f88b3d18"

Body

{
  "users": {
    "id": "108193",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Enim et ex.",
    "lang": "en",
    "role_id": "274096",
    "created_at": 1592594068,
    "updated_at": 1592594068,
    "cached_at": "1592594068.307123000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1584213268,
      "favorites": 1587669268,
      "fences": 1587237268,
      "groups": 1592594068,
      "networks": 1587842068,
      "roles": 1592594068,
      "settings": 1592594068
    }
  }
}

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, fr, fr-ca
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

Content-Type: application/json
Authorization: Bearer abf9dd30bea2a8f960fce4588300175b4bd8c10a2b3feed63447b1e0ccb91c4e

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "1-321-208-2836"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 4310
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d '{"user":{"phones_attributes":[{"number":"1-321-208-2836"}],"memberships_attributes":[{"group_id":4310}]}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer abf9dd30bea2a8f960fce4588300175b4bd8c10a2b3feed63447b1e0ccb91c4e"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"1ede139c71c5aacf386363d785e5750e"

Body

{
  "users": {
    "id": "108166",
    "name": "Mrs. Flor Legros",
    "email": "mallory@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/a52e9ca0dba44563ab69e63a40cbb771.png?s=270\u0026d=blank",
    "details": "Molestiae qui a.",
    "lang": "en",
    "role_id": "274034",
    "created_at": 1592594065,
    "updated_at": 1592594065,
    "cached_at": "1592594065.708114000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1591384465,
      "favorites": 1589483665,
      "fences": 1587582865,
      "groups": 1592594065,
      "networks": 1592248465,
      "roles": 1592594065,
      "settings": 1592594065
    }
  }
}