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. Defaults to 'en'

Request

Route

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

Query Parameters

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

cURL

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

Response

Simulated Response

Status

302

Body

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

Authorization Code grant

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

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

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Body

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_API_CLIENT_ID",
  "client_secret": "YOUR_API_CLIENT_SECRET",
  "code": "5e0677516df9ba8b000635c72648091b15ed2652996cd43ea65cbf2d5af7d0c3",
  "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":"5e0677516df9ba8b000635c72648091b15ed2652996cd43ea65cbf2d5af7d0c3","redirect_uri":"https://www.simplymadeapps.com/redirect/url"}' -X POST 

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"27f9df231e2ae181671becca9654bdc5"

Body

{
  "access_token": "5329e38873286ab7f14d04f9abc608797c201b92217db6c1b141d5149524322c",
  "token_type": "bearer",
  "expires_in": 60,
  "refresh_token": "3de1c4af1d4f8062e642c75dfa6d2edf4e4d03f83bea37371925a32d6b4712f5",
  "scope": "write",
  "created_at": 1576529851,
  "user": {
    "id": "7274",
    "company_id": "4139",
    "roles": {
      "id": "18391",
      "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": 1576529851,
      "updated_at": 1576529851
    }
  }
}

Refresh Token grant

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Body

{
  "grant_type": "refresh_token",
  "refresh_token": "4ifiaf47e4zedv6440pspos9b048h89c"
}

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"f09a3b9d28a7060d11b3b74469d2ca18"

Body

{
  "access_token": "7ad1ec008538259966feead685e291c87fe2b90ca777485512c253dbf78fafd3",
  "token_type": "bearer",
  "expires_in": 60,
  "refresh_token": "5df61816d098c48e3f4459c9c0eddf706288c227a71b1fefae6f28e9a6eb7698",
  "scope": "write",
  "created_at": 1576529851,
  "user": {
    "id": "7276",
    "company_id": "4141",
    "roles": {
      "id": "18399",
      "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": 1576529851,
      "updated_at": 1576529851
    }
  }
}

Revoke a token

Revokes a token, rendering it invalid.

Endpoint

POST /oauth/revoke

Parameters

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

Request

Route

POST /oauth/revoke

Body

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

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":"5c01487145124f04fef2dfd15cfefebb3c89ae28b61a1a5a2874a65b727cd8a0"}' -X POST 

Response

Simulated Response

Status

200

Headers

ETag: W/"44136fa355b3678a1146ad16f7e8649e"

Body

{}

Token information

Provides details about the OAuth token.

Endpoint

GET /oauth/token/info

Request

Route

GET /oauth/token/info

Headers

Authorization: Bearer 133192b281c64a96dccc9069c321ad4de3e05d932c71c5c2be13c823e8f150b0

cURL

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

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

Body

{
  "resource_owner_id": 7280,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "7654208054179"
  },
  "created_at": 1576529852
}

Beacons

Create a beacon

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

Endpoint

POST /api/v4/beacons

Parameters

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

Request

Route

POST /api/v4/beacons

Headers

Authorization: Bearer 9ddf3aec01a95082f714483f2b7bab80bfc518cb3e80d8b98ce4cafd76193e11

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"5f51c8bb69d7023c829dbd999799b699"

Body

{
  "beacons": {
    "id": "362",
    "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": 1576529850,
    "updated_at": 1576529850
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576529850,
      "favorites": 1570651050,
      "fences": 1572638250,
      "groups": 1570478250,
      "networks": 1573765050,
      "roles": 1576529850,
      "settings": 1576529850
    }
  }
}

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

Headers

Authorization: Bearer 93997ec2809311a63c7e7faef230b3ff55440bb7fd1e8378af812c7756df8044

cURL

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

Response

Simulated Response

Status

204

List all beacons

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

Endpoint

GET /api/v4/beacons

Parameters

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

Request

Route

GET /api/v4/beacons

Headers

Authorization: Bearer b4c3080710f61e921f7915b0b09f0a6bec376708bd6a6483ccfd53e5e08b7e76

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"2e5843a235b7aa59a879d221c6aeaf1e"
Last-Modified: Mon, 16 Dec 2019 20:57:29 GMT

Body

{
  "beacons": [
    {
      "id": "361",
      "name": "Kohler, Kulas and Gusikowski",
      "uuid": "90E8A1C2-6539-4826-9820-F57CFF9C2CCA",
      "comment_on_entry": "In at Kohler, Kulas and Gusikowski",
      "comment_on_exit": "Left Kohler, Kulas and Gusikowski",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529849,
      "updated_at": 1576529849
    },
    {
      "id": "360",
      "name": "Goldner and Sons",
      "uuid": "471FB588-BA70-4F49-9244-9D696691F774",
      "comment_on_entry": "In at Goldner and Sons",
      "comment_on_exit": "Left Goldner and Sons",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529849,
      "updated_at": 1576529849
    }
  ],
  "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": 1576529849,
      "favorites": 1573592249,
      "fences": 1575665849,
      "groups": 1568059049,
      "networks": 1576357049,
      "roles": 1576529849,
      "settings": 1576529849
    }
  }
}

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

Headers

Authorization: Bearer e08bfaf5024205f6ec87cf3060a7f47d6165c716e8bf01d3b4b8f794cc3a095d

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"d8ddf79b031f5a320e84e05dbf6230ec"

Body

{
  "beacons": {
    "id": "363",
    "name": "My Renamed Office",
    "uuid": "74DA0F19-48E4-4EFA-9091-96D68FE4E6C9",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1576529850,
    "updated_at": 1576529850
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576529850,
      "favorites": 1569182250,
      "fences": 1572206250,
      "groups": 1569527850,
      "networks": 1570478250,
      "roles": 1576529850,
      "settings": 1576529850
    }
  }
}

Companies

Retrieve the current company

Return the company the authorized user belongs to.

Endpoint

GET /api/v4/companies/my

Parameters

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

Request

Route

GET /api/v4/companies/my

Headers

Authorization: Bearer 7f4e43658cbc31ac71b4e03daebe2f941e30f6ec4cbfc6d903058d3efc924aa9

cURL

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

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/"3cfcf72197767d6e81f9888d19382e94"
Last-Modified: Mon, 16 Dec 2019 20:57:36 GMT

Body

{
  "companies": {
    "id": "4168",
    "name": "Pfannerstill-Davis",
    "scheduled_statuses": true,
    "default_role_id": "18509",
    "logo_url": null,
    "created_at": 1576529856
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575752256,
      "favorites": 1572119856,
      "fences": 1575838656,
      "groups": 1576357056,
      "networks": 1574542656,
      "roles": 1576529856,
      "settings": 1576529856
    }
  }
}

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

Headers

Authorization: Bearer d760ade642de4ea795bd1bb530d993fa49984c11953893cf600c4ef685bf1f63

cURL

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

Response

Simulated Response

Status

204

List future statuses

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

Endpoint

GET /api/v4/futures

Parameters

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

Request

Route

GET /api/v4/futures

Headers

Authorization: Bearer 6403a0a489760f30e13943096da675a0224ad1d0edd6c693c22ec1ecf84eeba2

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"f5c90ccf404c29906ce7b2943d899afb"
Last-Modified: Mon, 16 Dec 2019 20:57:35 GMT

Body

{
  "futures": [
    {
      "id": "199",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1579204800,
      "user_id": "7317",
      "changed_by_user_id": null
    },
    {
      "id": "200",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1592334000,
      "user_id": "7317",
      "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": 1574629055,
      "favorites": 1574110655,
      "fences": 1570996655,
      "groups": 1574715455,
      "networks": 1569095855,
      "roles": 1576529855,
      "settings": 1576529855
    }
  }
}

Geofences

Create a fence

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

Endpoint

POST /api/v4/fences

Parameters

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

Request

Route

POST /api/v4/fences

Headers

Authorization: Bearer 74421613a2a8e2152b6e3735410f735769a889b5b02f3b330240ecc2fd758743

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"39e41fabd8fe3b33225fc284c88b227d"

Body

{
  "fences": {
    "id": "121",
    "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": 1576529846,
    "updated_at": 1576529846
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576011446,
      "favorites": 1568404646,
      "fences": 1576529846,
      "groups": 1570478246,
      "networks": 1574456246,
      "roles": 1576529846,
      "settings": 1576529846
    }
  }
}

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

Headers

Authorization: Bearer d5b432da342c216a2ec27b6c9cb34e21e954ed01db1f2c4ff83be51f59b25e6a

cURL

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

Response

Simulated Response

Status

204

List all fences

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

Endpoint

GET /api/v4/fences

Parameters

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

Request

Route

GET /api/v4/fences

Headers

Authorization: Bearer ba5e70fe1f424ac5f33da836c66321eeb9f20a10b53b7981832cdb374a5aa230

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"9ba82fc16f1ce178ffe6d8890a24a660"
Last-Modified: Mon, 16 Dec 2019 20:57:26 GMT

Body

{
  "fences": [
    {
      "id": "124",
      "name": "og7j7ttaif0it2hyrrbh",
      "latitude": "70.2719676385",
      "longitude": "43.7124482987",
      "radius": 6335,
      "comment_on_entry": "In at og7j7ttaif0it2hyrrbh",
      "comment_on_exit": "Left og7j7ttaif0it2hyrrbh",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529846,
      "updated_at": 1576529846
    },
    {
      "id": "123",
      "name": "v4ni49zqgmrhscej1sx7",
      "latitude": "67.7026798985",
      "longitude": "11.2858840681",
      "radius": 15379,
      "comment_on_entry": "In at v4ni49zqgmrhscej1sx7",
      "comment_on_exit": "Left v4ni49zqgmrhscej1sx7",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529846,
      "updated_at": 1576529846
    }
  ],
  "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": 1568577446,
      "favorites": 1570478246,
      "fences": 1576529846,
      "groups": 1569614246,
      "networks": 1569873446,
      "roles": 1576529846,
      "settings": 1576529846
    }
  }
}

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

Headers

Authorization: Bearer decb16b4e253409fdfa33941bd16cee21aeb67a7a0b009942029377842ce243f

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"f164e3e745e83300cf265f47808e105d"

Body

{
  "fences": {
    "id": "122",
    "name": "My Renamed Geofence",
    "latitude": "-75.2831616607",
    "longitude": "-48.4413251134",
    "radius": 15854,
    "comment_on_entry": "In at My Renamed Geofence",
    "comment_on_exit": "Left My Renamed Geofence",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1576529846,
    "updated_at": 1576529846
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1571255846,
      "favorites": 1575061046,
      "fences": 1576529846,
      "groups": 1571515046,
      "networks": 1571255846,
      "roles": 1576529846,
      "settings": 1576529846
    }
  }
}

Groups

Create a group

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

Endpoint

POST /api/v4/groups

Parameters

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

Request

Route

POST /api/v4/groups

Headers

Authorization: Bearer bfe994e20e410af07b4c366a3987570320428b68f594e4a822fb28e605811ca8

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"9b079bedde106e23a993b7fd1e126977"

Body

{
  "groups": {
    "id": "295",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1570391852,
      "favorites": 1571083052,
      "fences": 1574369852,
      "groups": 1576529852,
      "networks": 1570737452,
      "roles": 1576529852,
      "settings": 1576529852
    }
  }
}

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

Headers

Authorization: Bearer bf28c8f8630115148940b7d1cd2bfc2280eaeb7eef27628afd37e454a87aca1e

cURL

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

Response

Simulated Response

Status

204

List all groups

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

Endpoint

GET /api/v4/groups

Parameters

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

Request

Route

GET /api/v4/groups

Headers

Authorization: Bearer dd87565e53a1ecf61eca9e1e80889badd3cbda4806b6c4b174b7e2a47dcec0a9

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"e2d42f7698f075279923e03632afca51"
Last-Modified: Mon, 16 Dec 2019 20:57:32 GMT

Body

{
  "groups": [
    {
      "id": "297",
      "name": "Lesch, Gleichner and Lynch"
    },
    {
      "id": "296",
      "name": "Marquardt, Hahn and Beahan"
    }
  ],
  "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": 1576443452,
      "favorites": 1573765052,
      "fences": 1573073852,
      "groups": 1576529852,
      "networks": 1575838652,
      "roles": 1576529852,
      "settings": 1576529852
    }
  }
}

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

Headers

Authorization: Bearer 779e65353d3312a3466e8155e8e3cccf416af61b37c368bbde2ccfaadb72f29c

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"eb9acac288d4c1a1653ae5bc0115aef4"

Body

{
  "groups": {
    "id": "294",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573333052,
      "favorites": 1568836652,
      "fences": 1572206252,
      "groups": 1576529852,
      "networks": 1571428652,
      "roles": 1576529852,
      "settings": 1576529852
    }
  }
}

Networks

Create a network

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

Endpoint

POST /api/v4/networks

Parameters

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

Request

Route

POST /api/v4/networks

Headers

Authorization: Bearer 85382c83e4c7638fca5979436445ed4e4ba82472dc186e967ff7809d74f7227d

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"45f6e8e546b5293adbd739234510fab8"

Body

{
  "networks": {
    "id": "107",
    "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": 1576529847,
    "updated_at": 1576529847
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573333047,
      "favorites": 1570046247,
      "fences": 1571687847,
      "groups": 1570391847,
      "networks": 1576529847,
      "roles": 1576529847,
      "settings": 1576529847
    }
  }
}

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

Headers

Authorization: Bearer 97373d6f254889db75ec34c8476891c9aa581891e49bb236ff77315d84f87cd9

cURL

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

Response

Simulated Response

Status

204

List all networks

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

Endpoint

GET /api/v4/networks

Parameters

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

Request

Route

GET /api/v4/networks

Headers

Authorization: Bearer 529157c8851d1c0563044ad26b32245997aae1ae7056c1c9338a33d8f9a9b7e7

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"8642d9d54474a71ff3093b5a457ea1a9"
Last-Modified: Mon, 16 Dec 2019 20:57:27 GMT

Body

{
  "networks": [
    {
      "id": "108",
      "name": "Gulgowski and Sons",
      "ssid": "tpbujtkb50ejcaj6xslfws5fgc83oma7",
      "comment_on_entry": "In at Gulgowski and Sons",
      "comment_on_exit": "Left Gulgowski and Sons",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529847,
      "updated_at": 1576529847
    },
    {
      "id": "109",
      "name": "Abshire, Reichert and Zboncak",
      "ssid": "azpjhf2sh8b8aup7n3yqq6fr1g65y1nt",
      "comment_on_entry": "In at Abshire, Reichert and Zboncak",
      "comment_on_exit": "Left Abshire, Reichert and Zboncak",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1576529847,
      "updated_at": 1576529847
    }
  ],
  "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": 1572465447,
      "favorites": 1572206247,
      "fences": 1570132647,
      "groups": 1575320247,
      "networks": 1576529847,
      "roles": 1576529847,
      "settings": 1576529847
    }
  }
}

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

Headers

Authorization: Bearer 24862e9c5b06ae009ac2aace69f9e0c727bf2827b5feda68040498049ca3170e

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"f999f7d4c6f25efda7d3f58dd0960425"

Body

{
  "networks": {
    "id": "111",
    "name": "My Renamed Office",
    "ssid": "fh84szp2ev1tvblbyyus6sd87wf5n4y5",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1576529848,
    "updated_at": 1576529848
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1572814647,
      "favorites": 1573419447,
      "fences": 1574283447,
      "groups": 1576357047,
      "networks": 1576529848,
      "roles": 1576529848,
      "settings": 1576529848
    }
  }
}

Ok

Make sure things are Ok

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

Endpoint

GET /api/v4/ok

Request

Route

GET /api/v4/ok

Headers

Authorization: Bearer 932475a260b422d372ef1b2d3c245e73ea33c550114e90050abc3014a01204cc

cURL

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

Response

Simulated Response

Status

204

Roles

Create a role

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

Endpoint

POST /api/v4/roles

Parameters

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

Request

Route

POST /api/v4/roles

Headers

Authorization: Bearer 2b2407f35c737bef6ec7d8ba6ba8e32139c08085ddf07207d1fadfa1510339f8

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"827d11ec427a11fe0f1ee30c044600c9"

Body

{
  "roles": {
    "id": "18376",
    "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": 1576529850,
    "updated_at": 1576529850
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1572206250,
      "favorites": 1568663850,
      "fences": 1576529850,
      "groups": 1572465450,
      "networks": 1574888250,
      "roles": 1576529850,
      "settings": 1576529850
    }
  }
}

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

Headers

Authorization: Bearer 3ce9a908614619ccb48defe387bb0d3f1fd5ba965c6e7c76fd3a8d64a0f462ee

cURL

curl "https://www.simpleinout.com/api/v4/roles/18390" -d '' -X DELETE \
	-H "Authorization: Bearer 3ce9a908614619ccb48defe387bb0d3f1fd5ba965c6e7c76fd3a8d64a0f462ee"

Response

Simulated Response

Status

204

List all roles

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

Endpoint

GET /api/v4/roles

Parameters

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

Request

Route

GET /api/v4/roles

Headers

Authorization: Bearer 9e4058e5f77dd53418d42bf54940800c9fc1508da25f3f157432ff97f16405f3

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"05cc1b32a0fbb95b7ef4b92ee8829be4"
Last-Modified: Mon, 16 Dec 2019 20:57:31 GMT

Body

{
  "roles": [
    {
      "id": "18382",
      "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": 1576529851,
      "updated_at": 1576529851
    },
    {
      "id": "18383",
      "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": 1576529851,
      "updated_at": 1576529851
    },
    {
      "id": "18384",
      "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": 1576529851,
      "updated_at": 1576529851
    },
    {
      "id": "18385",
      "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": 1576529851,
      "updated_at": 1576529851
    }
  ],
  "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": 1568059051,
      "favorites": 1575320251,
      "fences": 1569182251,
      "groups": 1569268651,
      "networks": 1572987451,
      "roles": 1576529851,
      "settings": 1576529851
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/18371

Headers

Authorization: Bearer c308b1de24a37d97be8c853deb54cd832e9255fcf9dd3088fa8e5401e3e898fc

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"9741dc2aa7bc72915062be4630a22c22"
Last-Modified: Mon, 16 Dec 2019 20:57:30 GMT

Body

{
  "roles": {
    "id": "18371",
    "name": "Becker 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": 1576529850,
    "updated_at": 1576529850
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573333050,
      "favorites": 1569614250,
      "fences": 1571687850,
      "groups": 1576529850,
      "networks": 1573160250,
      "roles": 1576529850,
      "settings": 1576529850
    },
    "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/18381

Headers

Authorization: Bearer 186e372ca5fe34b2a18638fd099f471cdfea5941dda632bf061242fa33f82964

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/18381" -d '{"role":{"name":"My Renamed Role","billing":false,"view_others_archives":true,"view_others_futures":true}}' -X PATCH \
	-H "Authorization: Bearer 186e372ca5fe34b2a18638fd099f471cdfea5941dda632bf061242fa33f82964"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"41d13d1660dcfedc2b5073fcae34e4ca"

Body

{
  "roles": {
    "id": "18381",
    "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": 1576529850,
    "updated_at": 1576529850
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576443450,
      "favorites": 1570564650,
      "fences": 1569268650,
      "groups": 1572119850,
      "networks": 1569614250,
      "roles": 1576529850,
      "settings": 1576529850
    }
  }
}

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=1575871200..1576130399

Headers

Authorization: Bearer ddae2ef88e1415ff51eacd33cb171cdb0b9e0f773cf5449df88ce9ab960c4c02

Query Parameters

created_at=1575871200..1576130399

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1575871200..1576130399" -X GET \
	-H "Authorization: Bearer ddae2ef88e1415ff51eacd33cb171cdb0b9e0f773cf5449df88ce9ab960c4c02"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"b97eb7149a2630c00be1625f2cf34b5d"
Last-Modified: Tue, 10 Dec 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575878400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575892800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575896400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575914400
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": true,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575964800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "7327",
      "changed_by_user_id": null,
      "created_at": 1575986400
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "automatic": false,
      "user_id": "7327",
      "changed_by_user_id": "7328",
      "created_at": 1575990000
    }
  ],
  "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=1575871200..1576130399",
      "last_href": "http://example.org/api/v4/statuses?created_at=1575871200..1576130399",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1571860656,
      "favorites": 1573505856,
      "fences": 1571860656,
      "groups": 1571342256,
      "networks": 1569700656,
      "roles": 1576529856,
      "settings": 1576529856
    }
  }
}

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

Headers

Authorization: Bearer 4e77224d3a9f00780aad93102337efbc9cad72bbc9ba181caf3174f6ebb6c403

cURL

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

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

Headers

Authorization: Bearer 61f774a152f40d692a254c5c6d54188c23accf42c8057a59c3b018aa2dd9300d

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"cdb74db7a76484ec81a8ddeb1e30a138"

Body

{
  "futures": {
    "id": "196",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1581883200,
    "user_id": "7233",
    "changed_by_user_id": "7232"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575579446,
      "favorites": 1573851446,
      "fences": 1568318246,
      "groups": 1568318246,
      "networks": 1575493046,
      "roles": 1576529846,
      "settings": 1576529846
    }
  }
}

Create a future status update for the current user

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

Endpoint

POST /api/v4/users/my/futures

Parameters

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

Request

Route

POST /api/v4/users/my/futures

Headers

Authorization: Bearer 3920ee5f8951aa8129d30915af6604a2d3e2011164ca896262addd011275b3e9

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"bedf5b5cc93f55c8f10339cc3dfec8c0"

Body

{
  "futures": {
    "id": "197",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1581883200,
    "user_id": "7234",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1571860646,
      "favorites": 1574110646,
      "fences": 1574110646,
      "groups": 1569959846,
      "networks": 1576357046,
      "roles": 1576529846,
      "settings": 1576529846
    }
  }
}

Create a status update for a user

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

Endpoint

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

Parameters

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

Request

Route

POST /api/v4/users/7220/statuses

Headers

Authorization: Bearer 6cf6ac74a070eb3dd2d8a7990ced052e95c29a41a487c24a71b7e96efafc7f0e

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"889cc41eb4eeb83950839e9a6211171d"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "7220",
    "changed_by_user_id": "7219",
    "created_at": 1576529845
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1574197044,
      "favorites": 1569441444,
      "fences": 1575147444,
      "groups": 1575233844,
      "networks": 1576184244,
      "roles": 1576529845,
      "settings": 1576529845
    }
  }
}

Create a status update for the current user

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

Endpoint

POST /api/v4/users/my/statuses

Parameters

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

Request

Route

POST /api/v4/users/my/statuses

Headers

Authorization: Bearer 584241456971b69513c10c565a030547eb7fa432372eef6f439ab8b64b79cb8f

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"585e820ea8046b4ad6c73e0f35bcf62b"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "7194",
    "changed_by_user_id": null,
    "created_at": 1576529842
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1571169442,
      "favorites": 1570219042,
      "fences": 1572379042,
      "groups": 1572551842,
      "networks": 1575493042,
      "roles": 1576529842,
      "settings": 1576529842
    }
  }
}

Create a user

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

Endpoint

POST /api/v4/users

Parameters

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

Request

Route

POST /api/v4/users

Headers

Authorization: Bearer fb394f096479ed77cdfa3a8c27236dbb22c9b80d4338412e643c8abddfbdb0ce

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "name": "Bojack Horseman",
    "details": "Lead Actor",
    "lang": "en",
    "phones_attributes": [
      {
        "number": "1-457-019-6561 x98831"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 288
      }
    ],
    "role_id": "18207"
  }
}

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":"1-457-019-6561 x98831"}],"memberships_attributes":[{"group_id":288}],"role_id":"18207"}}' -X POST \
	-H "Authorization: Bearer fb394f096479ed77cdfa3a8c27236dbb22c9b80d4338412e643c8abddfbdb0ce"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"326e0b6fe1c889eb50a93c92b1193973"

Body

{
  "users": {
    "id": "7203",
    "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": "18207",
    "created_at": 1576529843,
    "updated_at": 1576529843,
    "cached_at": "1576529843.416723000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1571860643,
      "favorites": 1569441443,
      "fences": 1575579443,
      "groups": 1576529843,
      "networks": 1575493043,
      "roles": 1576529843,
      "settings": 1576529843
    }
  }
}

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

Headers

Authorization: Bearer e60b3a0b79a03743c0172b602b71f40d2f15d5e6cd91a133476f95faeca5a581

cURL

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

Response

Simulated Response

Status

204

Favorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer beb89a23d3b9eef3b469de61e6dbb6b659d21211a27d0f871321b4006b52937d

Body

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

cURL

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

Response

Simulated Response

Status

204

Hide a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer 565f488b5db4149a50904f3fdc243e1623d63c5658fcc7fe13c2a6f72f6005fe

Body

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

cURL

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

Response

Simulated Response

Status

204

List all archived users

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

Endpoint

GET /api/v4/users?archived=true

Request

Route

GET /api/v4/users?archived=true

Headers

Authorization: Bearer b2b5916ec3418457d51ff88a0897b78cbafef1ca3508ee996c5f2507478440ea

Query Parameters

archived=true

cURL

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

Response

Simulated Response

Status

200

Headers

ETag: W/"e8a985a8501abf3e912db04c342e279a"
Last-Modified: Mon, 16 Dec 2019 20:57:27 GMT

Body

{
  "users": [
    {
      "id": "7247",
      "name": "Valentine Bode DVM",
      "email": null,
      "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
      "details": "Eum ea eos.",
      "lang": "en",
      "role_id": null,
      "created_at": 1576529847,
      "updated_at": 1576529847,
      "cached_at": "1576529847.303432000"
    }
  ],
  "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": 1575665847,
      "favorites": 1571860647,
      "fences": 1570823847,
      "groups": 1568145447,
      "networks": 1572814647,
      "roles": 1576529847,
      "settings": 1576529847
    },
    "trusted_cached_at": "1576529832.328819000"
  }
}

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

Headers

Authorization: Bearer 947fdb961b44b527bed14499c3d30bf9c29b76e9da3e83e05bf10967bb64d4bb

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"60dc91ddf2dfbe066d74dce03689d6be"
Last-Modified: Mon, 16 Dec 2019 20:57:24 GMT

Body

{
  "futures": [
    {
      "id": "194",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1577088000,
      "user_id": "7217",
      "changed_by_user_id": null
    },
    {
      "id": "195",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1582545600,
      "user_id": "7217",
      "changed_by_user_id": "7218"
    }
  ],
  "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/7217/futures?user_id=7217",
      "last_href": "http://example.org/api/v4/users/7217/futures?user_id=7217",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1575838644,
      "favorites": 1571083044,
      "fences": 1569182244,
      "groups": 1574369844,
      "networks": 1568750244,
      "roles": 1576529844,
      "settings": 1576529844
    }
  }
}

List all future statuses for the current user

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

Endpoint

GET /api/v4/users/my/futures

Parameters

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

Request

Route

GET /api/v4/users/my/futures

Headers

Authorization: Bearer dd6838953db45a2e6fefd1c9d2f204e80e9517f571b6b08cf162a3db396afd14

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"73ad44b333b64f3a5f0a33c288bd0d6e"
Last-Modified: Mon, 16 Dec 2019 20:57:23 GMT

Body

{
  "futures": [
    {
      "id": "192",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1577088000,
      "user_id": "7198",
      "changed_by_user_id": null
    },
    {
      "id": "193",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1582545600,
      "user_id": "7198",
      "changed_by_user_id": "7199"
    }
  ],
  "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=7198",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=7198",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1572379042,
      "favorites": 1570910242,
      "fences": 1574974642,
      "groups": 1570910242,
      "networks": 1568145442,
      "roles": 1576529842,
      "settings": 1576529842
    }
  }
}

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/7226/statuses?created_at=1575871200..1576130399

Headers

Authorization: Bearer c69d93c2b60ef21441e84f6f747f858b11739498118ed17499da5bbb0bd92c75

Query Parameters

created_at=1575871200..1576130399

cURL

curl -g "https://www.simpleinout.com/api/v4/users/7226/statuses?created_at=1575871200..1576130399" -X GET \
	-H "Authorization: Bearer c69d93c2b60ef21441e84f6f747f858b11739498118ed17499da5bbb0bd92c75"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"eb38837096ed334077161e7a72afa995"
Last-Modified: Tue, 10 Dec 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575878400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575892800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575896400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575914400
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575964800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": null,
      "created_at": 1575986400
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "7226",
      "changed_by_user_id": "7227",
      "created_at": 1575990000
    }
  ],
  "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/7226/statuses?created_at=1575871200..1576130399\u0026user_id=7226",
      "last_href": "http://example.org/api/v4/users/7226/statuses?created_at=1575871200..1576130399\u0026user_id=7226",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1568491045,
      "favorites": 1570219045,
      "fences": 1568231845,
      "groups": 1569700645,
      "networks": 1572638245,
      "roles": 1576529845,
      "settings": 1576529845
    }
  }
}

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=1575871200..1576130399

Headers

Authorization: Bearer a4e9c549125440cafb3343d482617f5b8f39623a08754fd67877ace1b8144098

Query Parameters

created_at=1575871200..1576130399

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/statuses?created_at=1575871200..1576130399" -X GET \
	-H "Authorization: Bearer a4e9c549125440cafb3343d482617f5b8f39623a08754fd67877ace1b8144098"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"eff0bb5fa6565fafd37ccead55123ddb"
Last-Modified: Tue, 10 Dec 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575878400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575892800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575896400
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575914400
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575964800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": null,
      "created_at": 1575986400
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "7211",
      "changed_by_user_id": "7212",
      "created_at": 1575990000
    }
  ],
  "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=1575871200..1576130399\u0026user_id=7211",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1575871200..1576130399\u0026user_id=7211",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1570564644,
      "favorites": 1571860644,
      "fences": 1573073844,
      "groups": 1570478244,
      "networks": 1567972644,
      "roles": 1576529844,
      "settings": 1576529844
    }
  }
}

List all users

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

Endpoint

GET /api/v4/users

Parameters

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

Request

Route

GET /api/v4/users

Headers

Authorization: Bearer 8f1b5547aed5b4d30e5604cb79c8f6318ce9948446529439ac7804da392c69b3

cURL

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

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/"07857a7e243474ba62dd5aba9f36ae9a"
Last-Modified: Mon, 16 Dec 2019 20:57:26 GMT

Body

{
  "users": [
    {
      "id": "7238",
      "name": "Ray Gillette",
      "email": "ray@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/568d24da7c180b33aaff58442062126d.png?s=270\u0026d=blank",
      "details": "Ea reiciendis voluptatem.",
      "lang": "en",
      "role_id": "18281",
      "created_at": 1576529846,
      "updated_at": 1576529846,
      "cached_at": "1576529846.501165200"
    },
    {
      "id": "7237",
      "name": "Lana Kane",
      "email": "lana@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/59b99926dd1b78d777b8ee0fd2c65575.png?s=270\u0026d=blank",
      "details": "Ut autem sunt.",
      "lang": "en",
      "role_id": "18281",
      "created_at": 1576529846,
      "updated_at": 1576529846,
      "cached_at": "1576529846.482095000"
    },
    {
      "id": "7236",
      "name": "Sterling Archer",
      "email": "sterling@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
      "details": "Enim exercitationem molestiae.",
      "lang": "en",
      "role_id": "18281",
      "created_at": 1576529846,
      "updated_at": 1576529846,
      "cached_at": "1576529846.457786800"
    },
    {
      "id": "7235",
      "name": "Malory Archer",
      "email": "malory@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/551eccbc6a509e7d8121efb87dffaf6f.png?s=270\u0026d=blank",
      "details": "Dignissimos quo similique.",
      "lang": "en",
      "role_id": "18279",
      "created_at": 1576529846,
      "updated_at": 1576529846,
      "cached_at": "1576529846.437352000"
    }
  ],
  "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": 1568836646,
      "favorites": 1570910246,
      "fences": 1573073846,
      "groups": 1569268646,
      "networks": 1575233846,
      "roles": 1576529846,
      "settings": 1576529846
    },
    "trusted_cached_at": "1576529831.526874000"
  }
}

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

Headers

Authorization: Bearer 21c717e45724557146c1333657b4e257dcebb8f1fa893480989cba36988cd286

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"5815100413f768d103804fd7615d43a5"
Last-Modified: Mon, 16 Dec 2019 20:57:25 GMT

Body

{
  "users": {
    "id": "7229",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Et officia dicta.",
    "lang": "en",
    "role_id": "18265",
    "created_at": 1576529845,
    "updated_at": 1576529845,
    "cached_at": "1576529845.911087000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573851445,
      "favorites": 1576529845,
      "fences": 1574888245,
      "groups": 1573160245,
      "networks": 1568750245,
      "roles": 1576529845,
      "settings": 1576529845
    }
  }
}

Retrieve the current user

Retrieve the current user who is authorized.

Endpoint

GET /api/v4/users/my

Parameters

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

Request

Route

GET /api/v4/users/my

Headers

Authorization: Bearer 52930a15f83fd3734620e7bd2d6ea1cf50b96af79a3c5d73295e15c5415a738c

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"02296bff97ecbb370904c96e55ac63f0"
Last-Modified: Mon, 16 Dec 2019 20:57:25 GMT

Body

{
  "users": {
    "id": "7222",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Dolorum exercitationem voluptatem.",
    "lang": "en",
    "role_id": "18249",
    "created_at": 1576529845,
    "updated_at": 1576529845,
    "cached_at": "1576529845.173978000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1568577445,
      "favorites": 1573160245,
      "fences": 1576443445,
      "groups": 1573333045,
      "networks": 1572814645,
      "roles": 1576529845,
      "settings": 1576529845
    }
  }
}

Unarchive a user

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

Endpoint

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

Parameters

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

Request

Route

POST /api/v4/users/7282/unarchive

Headers

Authorization: Bearer 72e2adc51cfc525413fe5d265b0519ceac89ad4364805f98b81875353e316366

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/7282/unarchive" -d '{"user":{"email":"bojack@simplymadeapps.com","role_id":"18411"}}' -X POST \
	-H "Authorization: Bearer 72e2adc51cfc525413fe5d265b0519ceac89ad4364805f98b81875353e316366"

Response

Simulated Response

Status

200

Headers

ETag: W/"0760cedd242da96a41a5e06086eb85ec"

Body

{
  "users": {
    "id": "7282",
    "name": "Geoffrey Hudson",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
    "details": "Dolorem id mollitia.",
    "lang": "en",
    "role_id": "18411",
    "created_at": 1576529852,
    "updated_at": 1576529852,
    "cached_at": "1576529852.245769000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569268652,
      "favorites": 1573160252,
      "fences": 1568923052,
      "groups": 1570910252,
      "networks": 1569787052,
      "roles": 1576529852,
      "settings": 1576529852
    }
  }
}

Unfavorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer 6a9313aca9600437571b6759f6e93fa0a289414494a0231639da74b23230ae9c

Body

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

cURL

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

Response

Simulated Response

Status

204

Update a user

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

Endpoint

PATCH /api/v4/users/:id

Parameters

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

Request

Route

PATCH /api/v4/users/7196

Headers

Authorization: Bearer 33f47c2c7ec4eba2edd491f388647df995c67b15c3a70290eb6b5230bac35526

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "953-571-3790"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 287
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/7196" -d '{"user":{"phones_attributes":[{"number":"953-571-3790"}],"memberships_attributes":[{"group_id":287}]}}' -X PATCH \
	-H "Authorization: Bearer 33f47c2c7ec4eba2edd491f388647df995c67b15c3a70290eb6b5230bac35526"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"2bd7dc90044503d41259c31b388722af"

Body

{
  "users": {
    "id": "7196",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Enim aliquid iusto.",
    "lang": "en",
    "role_id": "18197",
    "created_at": 1576529842,
    "updated_at": 1576529842,
    "cached_at": "1576529842.911402000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575925042,
      "favorites": 1573505842,
      "fences": 1575061042,
      "groups": 1576529842,
      "networks": 1570651042,
      "roles": 1576529842,
      "settings": 1576529842
    }
  }
}

Update the current user

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

Endpoint

PATCH /api/v4/users/my

Parameters

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

Request

Route

PATCH /api/v4/users/my

Headers

Authorization: Bearer 0eae9f283d0fa9e2c34c3e97bc925cf43f04b5b8ae96dac892a06e94e1db6462

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "1-802-351-4382"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 290
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d '{"user":{"phones_attributes":[{"number":"1-802-351-4382"}],"memberships_attributes":[{"group_id":290}]}}' -X PATCH \
	-H "Authorization: Bearer 0eae9f283d0fa9e2c34c3e97bc925cf43f04b5b8ae96dac892a06e94e1db6462"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"bee1ef0916302405dc4210c01679b150"

Body

{
  "users": {
    "id": "7213",
    "name": "Mr. Marcus McGlynn",
    "email": "mallory@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/a52e9ca0dba44563ab69e63a40cbb771.png?s=270\u0026d=blank",
    "details": "Possimus est nemo.",
    "lang": "en",
    "role_id": "18227",
    "created_at": 1576529844,
    "updated_at": 1576529844,
    "cached_at": "1576529844.462960200"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1568145444,
      "favorites": 1575752244,
      "fences": 1574197044,
      "groups": 1576529844,
      "networks": 1568404644,
      "roles": 1576529844,
      "settings": 1576529844
    }
  }
}