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

Headers

Content-Type: application/json

Query Parameters

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

cURL

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

Response

Simulated Response

Status

302

Body

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

Authorization Code grant

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

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

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Headers

Content-Type: application/json

Body

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"6f2d8652a6c0e735143d925eedb3133b"

Body

{
  "access_token": "0f9d3b717807a140a5375d004804029d35ca4f16cb387dec5354abf40d04c64a",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "08ba14504401d061499c1d11e02f309894b1b1dc5ec6b0259109fb814aceb982",
  "scope": "write",
  "created_at": 1582297862,
  "user": {
    "id": "7624",
    "company_id": "4328",
    "roles": {
      "id": "19266",
      "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": 1582297862,
      "updated_at": 1582297862
    }
  }
}

Refresh Token grant

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Headers

Content-Type: application/json

Body

{
  "grant_type": "refresh_token",
  "refresh_token": "qev8maa5rkfckjz4ur2kqklny3oaij97"
}

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"77ffa5eaf41b6e8043808c53e30b7cfb"

Body

{
  "access_token": "7f256be6ddd1759726abf4f529612e60f74f929d02337f66414e0ab6ded620cd",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "476b8733a77c1f38e5919ad2fddd9614fda95aa05b3f2ce10cfed5d401bc60bf",
  "scope": "write",
  "created_at": 1582297862,
  "user": {
    "id": "7623",
    "company_id": "4327",
    "roles": {
      "id": "19262",
      "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": 1582297862,
      "updated_at": 1582297862
    }
  }
}

Revoke a token

Revokes a token, rendering it invalid.

Endpoint

POST /oauth/revoke

Parameters

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

Request

Route

POST /oauth/revoke

Headers

Content-Type: application/json

Body

{
  "client_id": "PLACE_YOUR_API_CLIENT_ID_HERE",
  "client_secret": "PLACE_YOUR_API_CLIENT_SECRET_HERE",
  "token": "7df5494226c64ab23997f0f725752733e80596277d58a08697f380dd99a8ca9b"
}

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

Response

Simulated Response

Status

200

Headers

ETag: W/"44136fa355b3678a1146ad16f7e8649e"

Body

{}

Token information

Provides details about the OAuth token.

Endpoint

GET /oauth/token/info

Request

Route

GET /oauth/token/info

Headers

Content-Type: application/json
Authorization: Bearer 596033c77b105a4c66af57e459c1af0774da7e3e11c252c2e0fbc938ded8dcaa

cURL

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

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/"93b56ad44a52e06e0461dbaf9a6c39bc"

Body

{
  "resource_owner_id": 7622,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "9227403125845"
  },
  "created_at": 1582297861
}

Beacons

Create a beacon

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

Endpoint

POST /api/v4/beacons

Parameters

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

Request

Route

POST /api/v4/beacons

Headers

Content-Type: application/json
Authorization: Bearer becef5029699171bf0732e11cb18bda0bc9250b310b0c3db254c534183c87498

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"8de64cedefc5ec5d510b66e85225c60c"

Body

{
  "beacons": {
    "id": "253",
    "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": 1582297863,
    "updated_at": 1582297863
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1582297863,
      "favorites": 1576249863,
      "fences": 1582211463,
      "groups": 1579101063,
      "networks": 1576163463,
      "roles": 1582297863,
      "settings": 1582297863
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer d811635a1b86f7390a7531443d8d92031fa906706ac256e50cfc370705346b09

cURL

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

Response

Simulated Response

Status

204

List all beacons

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

Endpoint

GET /api/v4/beacons

Parameters

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

Request

Route

GET /api/v4/beacons

Headers

Content-Type: application/json
Authorization: Bearer 849ae178c77a057537b280f04739401c9b945f92c4fcb70734c513cc1abca051

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"82ed330f3585716aff8f3bfeeeb3f760"
Last-Modified: Fri, 21 Feb 2020 15:11:04 GMT

Body

{
  "beacons": [
    {
      "id": "255",
      "name": "Beahan-Nitzsche",
      "uuid": "F6A8D85D-8D14-4F2F-86E2-56F496056E91",
      "comment_on_entry": "In at Beahan-Nitzsche",
      "comment_on_exit": "Left Beahan-Nitzsche",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297864,
      "updated_at": 1582297864
    },
    {
      "id": "254",
      "name": "Ferry, Conn and Veum",
      "uuid": "8DC92EF5-903D-420B-94F0-A9E9F3AFDD63",
      "comment_on_entry": "In at Ferry, Conn and Veum",
      "comment_on_exit": "Left Ferry, Conn and Veum",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297864,
      "updated_at": 1582297864
    }
  ],
  "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": 1582297864,
      "favorites": 1577027464,
      "fences": 1578496264,
      "groups": 1580310664,
      "networks": 1578669064,
      "roles": 1582297864,
      "settings": 1582297864
    }
  }
}

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

Headers

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

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"0ff8c68799d95ebd11c12ec02fabc772"

Body

{
  "beacons": {
    "id": "256",
    "name": "My Renamed Office",
    "uuid": "A88CE5E9-7E15-4384-9066-D8C781688716",
    "comment_on_entry": "In at Dietrich and Sons",
    "comment_on_exit": "Left Dietrich and Sons",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1582297864,
    "updated_at": 1582297864
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1582297864,
      "favorites": 1580483464,
      "fences": 1580137864,
      "groups": 1575213064,
      "networks": 1581520264,
      "roles": 1582297864,
      "settings": 1582297864
    }
  }
}

Companies

Retrieve the current company

Return the company the authorized user belongs to.

Endpoint

GET /api/v4/companies/my

Parameters

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

Request

Route

GET /api/v4/companies/my

Headers

Content-Type: application/json
Authorization: Bearer 92d1281d8853e5edfeb2265b1ebf0516522668bcb3b0f156d7f2414cd6f91e60

cURL

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

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/"fcff8829c84f6d4dcab731589e3ebee5"
Last-Modified: Fri, 21 Feb 2020 15:11:12 GMT

Body

{
  "companies": {
    "id": "4383",
    "name": "Yost LLC",
    "scheduled_statuses": true,
    "default_role_id": "19492",
    "logo_url": null,
    "created_at": 1582297872
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1580397072,
      "favorites": 1579792272,
      "fences": 1582211472,
      "groups": 1575126672,
      "networks": 1579705872,
      "roles": 1582297872,
      "settings": 1582297872
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 415da16eb0e64966c2a9c078ff7708803474f198a543a0358aacb8bec0d3dafa

cURL

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

Response

Simulated Response

Status

204

List future statuses

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

Endpoint

GET /api/v4/futures

Parameters

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

Request

Route

GET /api/v4/futures

Headers

Content-Type: application/json
Authorization: Bearer 1a106a27e6bcdbf8f66fbbf3c843b26a501e9c4b958c941934c77255f6221283

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"e81cd3640132a0286cbaab98c0da09f1"
Last-Modified: Fri, 21 Feb 2020 15:10:59 GMT

Body

{
  "futures": [
    {
      "id": "197",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1584799200,
      "user_id": "7602",
      "changed_by_user_id": null
    },
    {
      "id": "198",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1598018400,
      "user_id": "7602",
      "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": 1578841859,
      "favorites": 1574435459,
      "fences": 1574521859,
      "groups": 1574003459,
      "networks": 1580829059,
      "roles": 1582297859,
      "settings": 1582297859
    }
  }
}

Geofences

Create a fence

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

Endpoint

POST /api/v4/fences

Parameters

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

Request

Route

POST /api/v4/fences

Headers

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

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"77fa5901848d3e0913491d88d27498e1"

Body

{
  "fences": {
    "id": "119",
    "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": 1582297863,
    "updated_at": 1582297863
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1582125063,
      "favorites": 1581174663,
      "fences": 1582297863,
      "groups": 1576163463,
      "networks": 1575731463,
      "roles": 1582297863,
      "settings": 1582297863
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 24621db53a039ada621e5da5f1fb5605daa5e9a0f41ce774fccba77e1891c906

cURL

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

Response

Simulated Response

Status

204

List all fences

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

Endpoint

GET /api/v4/fences

Parameters

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

Request

Route

GET /api/v4/fences

Headers

Content-Type: application/json
Authorization: Bearer e97c0bc5220ded35bb2d3f4747884ba78d9ac1452b35233033d6a06e86535956

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"fdbeccf6920b469a6bd6de43d01b5393"
Last-Modified: Fri, 21 Feb 2020 15:11:03 GMT

Body

{
  "fences": [
    {
      "id": "118",
      "name": "lbb3eta8gvdnyje5idsx",
      "latitude": "76.2479802358",
      "longitude": "133.8824637567",
      "radius": 5952,
      "comment_on_entry": "In at lbb3eta8gvdnyje5idsx",
      "comment_on_exit": "Left lbb3eta8gvdnyje5idsx",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297863,
      "updated_at": 1582297863
    },
    {
      "id": "117",
      "name": "omwmnu18dgsjir88t1xp",
      "latitude": "-61.6731669105",
      "longitude": "131.7277721189",
      "radius": 3976,
      "comment_on_entry": "In at omwmnu18dgsjir88t1xp",
      "comment_on_exit": "Left omwmnu18dgsjir88t1xp",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297863,
      "updated_at": 1582297863
    }
  ],
  "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": 1575731463,
      "favorites": 1578841863,
      "fences": 1582297863,
      "groups": 1580656263,
      "networks": 1581779463,
      "roles": 1582297863,
      "settings": 1582297863
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 31d534bb9ce246eb1d4226be881b4df8d057a809b3b25dee885438c0785a5e39

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"721fec1f0928d5b0db936711ce2a4a96"

Body

{
  "fences": {
    "id": "116",
    "name": "My Renamed Geofence",
    "latitude": "69.4564150271",
    "longitude": "-16.3251275484",
    "radius": 5482,
    "comment_on_entry": "In at duhbyboswnf8t6u4oz1b",
    "comment_on_exit": "Left duhbyboswnf8t6u4oz1b",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1582297863,
    "updated_at": 1582297863
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579187463,
      "favorites": 1578928263,
      "fences": 1582297863,
      "groups": 1580656263,
      "networks": 1581088263,
      "roles": 1582297863,
      "settings": 1582297863
    }
  }
}

Groups

Create a group

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

Endpoint

POST /api/v4/groups

Parameters

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

Request

Route

POST /api/v4/groups

Headers

Content-Type: application/json
Authorization: Bearer 79234fb62044c7b309a3c351a60212e23b0d7f458c64a6688413d58965d1283c

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"8b9e255f31a82e5bea9af6b42bd1914d"

Body

{
  "groups": {
    "id": "301",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575472260,
      "favorites": 1575645060,
      "fences": 1581001860,
      "groups": 1582297860,
      "networks": 1577373060,
      "roles": 1582297860,
      "settings": 1582297860
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer f39836c3f48fb6cc9319ed8f5de9315f35630628b192df294cfbee65043bb2d7

cURL

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

Response

Simulated Response

Status

204

List all groups

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

Endpoint

GET /api/v4/groups

Parameters

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

Request

Route

GET /api/v4/groups

Headers

Content-Type: application/json
Authorization: Bearer 62231c876fa14e8d3dc1a95ce25c4c830de6818eb09d9af291931afee8e22051

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"a625b1e5213fcaa8f7deb937d7e3d4ac"
Last-Modified: Fri, 21 Feb 2020 15:11:01 GMT

Body

{
  "groups": [
    {
      "id": "305",
      "name": "Monahan, Lemke and Huel"
    },
    {
      "id": "304",
      "name": "Nolan LLC"
    }
  ],
  "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": 1576163461,
      "favorites": 1577891461,
      "fences": 1578064261,
      "groups": 1582297861,
      "networks": 1575731461,
      "roles": 1582297861,
      "settings": 1582297861
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 05bfcd9b069cf8a51c2d92dc37634e4e837121d95d24c5698391a24e1aceb984

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"11484d8d74c6e518ed731d8c7b1d6dd3"

Body

{
  "groups": {
    "id": "303",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573830661,
      "favorites": 1577113861,
      "fences": 1580915461,
      "groups": 1582297861,
      "networks": 1580397061,
      "roles": 1582297861,
      "settings": 1582297861
    }
  }
}

Networks

Create a network

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

Endpoint

POST /api/v4/networks

Parameters

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

Request

Route

POST /api/v4/networks

Headers

Content-Type: application/json
Authorization: Bearer 22488612b80bc603a6cbf11b15bd8e93e23ccc0beead0b815c312f1dae5955d6

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/networks" -d '{"network":{"name":"My Office","ssid":"Office WiFi Hotspot"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 22488612b80bc603a6cbf11b15bd8e93e23ccc0beead0b815c312f1dae5955d6"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"6ab08475cc8ee821793df78dfd02ff86"

Body

{
  "networks": {
    "id": "106",
    "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": 1582297873,
    "updated_at": 1582297873
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579273873,
      "favorites": 1576681873,
      "fences": 1581001873,
      "groups": 1578064273,
      "networks": 1582297873,
      "roles": 1582297873,
      "settings": 1582297873
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 8bb5389839981b60fc2b8de738ba5d6e9d98d758012dd21be21790c46bb41d05

cURL

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

Response

Simulated Response

Status

204

List all networks

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

Endpoint

GET /api/v4/networks

Parameters

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

Request

Route

GET /api/v4/networks

Headers

Content-Type: application/json
Authorization: Bearer 660eb872123bcca45096eaf73cb485590e1039e411b6c2c866299fcdffbb136e

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"2f01b256cee78df0d7f037476237c548"
Last-Modified: Fri, 21 Feb 2020 15:11:13 GMT

Body

{
  "networks": [
    {
      "id": "109",
      "name": "Wintheiser, Miller and Hills",
      "ssid": "69ekordqko71cipbbj9xe1xwqz5yccvi",
      "comment_on_entry": "In at Wintheiser, Miller and Hills",
      "comment_on_exit": "Left Wintheiser, Miller and Hills",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297873,
      "updated_at": 1582297873
    },
    {
      "id": "110",
      "name": "Schowalter, Hahn and Hackett",
      "ssid": "pw6sfna2w7nlvrbhhhtrvj60zgj9pgqf",
      "comment_on_entry": "In at Schowalter, Hahn and Hackett",
      "comment_on_exit": "Left Schowalter, Hahn and Hackett",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1582297873,
      "updated_at": 1582297873
    }
  ],
  "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": 1581088273,
      "favorites": 1573917073,
      "fences": 1577545873,
      "groups": 1581606673,
      "networks": 1582297873,
      "roles": 1582297873,
      "settings": 1582297873
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 5ab4463a4a51b33758a2e4465746513e1303b0bc062979b8e890af33bbada84b

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"e272c652631a61f265d244140821c9a9"

Body

{
  "networks": {
    "id": "108",
    "name": "My Renamed Office",
    "ssid": "wbw6dke4oymmbpdylcyyj9uj22q7rzfo",
    "comment_on_entry": "In at Parker, Boyer and Feest",
    "comment_on_exit": "Left Parker, Boyer and Feest",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1582297873,
    "updated_at": 1582297873
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1581865873,
      "favorites": 1575731473,
      "fences": 1582211473,
      "groups": 1575645073,
      "networks": 1582297873,
      "roles": 1582297873,
      "settings": 1582297873
    }
  }
}

Ok

Make sure things are Ok

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

Endpoint

GET /api/v4/ok

Request

Route

GET /api/v4/ok

Headers

Content-Type: application/json
Authorization: Bearer 9740c1bd6a810a3a50733682c6a10fea491974a03d878d04212472e61009c99f

cURL

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

Response

Simulated Response

Status

204

Roles

Create a role

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

Endpoint

POST /api/v4/roles

Parameters

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

Request

Route

POST /api/v4/roles

Headers

Content-Type: application/json
Authorization: Bearer 445c2915e3e967525422b973170c4115268e62bb897cdf125c2fe25c16fb9d4d

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"690148c61c7b5bf94665cb272eea3d96"

Body

{
  "roles": {
    "id": "19418",
    "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": 1582297869,
    "updated_at": 1582297869
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1578841869,
      "favorites": 1574867469,
      "fences": 1578841869,
      "groups": 1575040269,
      "networks": 1578409869,
      "roles": 1582297869,
      "settings": 1582297869
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 5b4d3694e19ab2b9c458690e2380d809dfa65b89989a582faa3510e9925f64a0

cURL

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

Response

Simulated Response

Status

204

List all roles

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

Endpoint

GET /api/v4/roles

Parameters

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

Request

Route

GET /api/v4/roles

Headers

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"cdf7420e040cbe1e29ec3d4588c34a66"
Last-Modified: Fri, 21 Feb 2020 15:11:09 GMT

Body

{
  "roles": [
    {
      "id": "19410",
      "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": 1582297869,
      "updated_at": 1582297869
    },
    {
      "id": "19411",
      "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": 1582297869,
      "updated_at": 1582297869
    },
    {
      "id": "19412",
      "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": 1582297869,
      "updated_at": 1582297869
    },
    {
      "id": "19413",
      "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": 1582297869,
      "updated_at": 1582297869
    }
  ],
  "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": 1580915469,
      "favorites": 1579014669,
      "fences": 1581865869,
      "groups": 1580656269,
      "networks": 1581347469,
      "roles": 1582297869,
      "settings": 1582297869
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/19423

Headers

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"c09e777d696a8887e733ab32f15d0425"
Last-Modified: Fri, 21 Feb 2020 15:11:09 GMT

Body

{
  "roles": {
    "id": "19423",
    "name": "Nitzsche, Hirthe and Gleason",
    "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": 1582297869,
    "updated_at": 1582297869
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1574608269,
      "favorites": 1579705869,
      "fences": 1580483469,
      "groups": 1576336269,
      "networks": 1578064269,
      "roles": 1582297869,
      "settings": 1582297869
    },
    "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/19428

Headers

Content-Type: application/json
Authorization: Bearer 77ee058aa00eed37a6d326cd278beaa380219d785e1a666ac0b94811000de8dc

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"895581d7edc9d16f6c1bcf4e7964d8be"

Body

{
  "roles": {
    "id": "19428",
    "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": 1582297869,
    "updated_at": 1582297869
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579792269,
      "favorites": 1573744269,
      "fences": 1581261069,
      "groups": 1580137869,
      "networks": 1573744269,
      "roles": 1582297869,
      "settings": 1582297869
    }
  }
}

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=1581660000..1581919199

Headers

Content-Type: application/json
Authorization: Bearer 93f937a87ed4c2bca3ff7fc1492d8eef255c49bd4faac7ed67ee6045fe97da0c

Query Parameters

created_at=1581660000..1581919199

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1581660000..1581919199" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 93f937a87ed4c2bca3ff7fc1492d8eef255c49bd4faac7ed67ee6045fe97da0c"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"1c4e00cd91de05268d6b768c754edad9"
Last-Modified: Sat, 15 Feb 2020 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581667200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581681600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581685200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581703200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": true,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581753600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "7611",
      "changed_by_user_id": null,
      "created_at": 1581775200
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "automatic": false,
      "user_id": "7611",
      "changed_by_user_id": "7612",
      "created_at": 1581778800
    }
  ],
  "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=1581660000..1581919199",
      "last_href": "http://example.org/api/v4/statuses?created_at=1581660000..1581919199",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1581779460,
      "favorites": 1579360260,
      "fences": 1581865860,
      "groups": 1579101060,
      "networks": 1582125060,
      "roles": 1582297860,
      "settings": 1582297860
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer b690a7d50b58e860c23a01906645669c6f4d9ddc6e8f930ee1959fb5eb10654e

cURL

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

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

Headers

Content-Type: application/json
Authorization: Bearer eefc140fbc3f19c30cd9f656b198d13872ab106f1af850e29f577094797894bb

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"042371a9010b5d94347e5e7428b58da3"

Body

{
  "futures": {
    "id": "204",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1587477600,
    "user_id": "7679",
    "changed_by_user_id": "7678"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579705868,
      "favorites": 1574953868,
      "fences": 1574349068,
      "groups": 1581001868,
      "networks": 1578323468,
      "roles": 1582297868,
      "settings": 1582297868
    }
  }
}

Create a future status update for the current user

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

Endpoint

POST /api/v4/users/my/futures

Parameters

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

Request

Route

POST /api/v4/users/my/futures

Headers

Content-Type: application/json
Authorization: Bearer c50a01c756cd5777a335727885da759062c99e655d4e35a14b397c40d8264179

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"8d0dd49da464f31a2d30b06b7e43170b"

Body

{
  "futures": {
    "id": "199",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1587477600,
    "user_id": "7641",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575299464,
      "favorites": 1581347464,
      "fences": 1577373064,
      "groups": 1575731464,
      "networks": 1578064264,
      "roles": 1582297864,
      "settings": 1582297864
    }
  }
}

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/7647/statuses

Headers

Content-Type: application/json
Authorization: Bearer 77cbaf1cb6323987bdde10b67027187960353fde998a4511ea294c17872d4a00

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"f9a3735367b04ffa305192a1e76b202c"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "7647",
    "changed_by_user_id": "7646",
    "created_at": 1582297865
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1578237065,
      "favorites": 1579792265,
      "fences": 1573744265,
      "groups": 1580656265,
      "networks": 1580742665,
      "roles": 1582297865,
      "settings": 1582297865
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 46f3d07e7b72acf9185a1da549b20d47779308c1518c912f4e7185f90ee3b388

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"0cb1d26f1f9f74861847673033116883"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "7640",
    "changed_by_user_id": null,
    "created_at": 1582297864
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1577027464,
      "favorites": 1579101064,
      "fences": 1578669064,
      "groups": 1575990664,
      "networks": 1579360264,
      "roles": 1582297864,
      "settings": 1582297864
    }
  }
}

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

Content-Type: application/json
Authorization: Bearer 1a912ce852dfed4681720691ee92b839add7b996be6ede021f6c3c6fca3945cb

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "name": "Bojack Horseman",
    "details": "Lead Actor",
    "lang": "en",
    "phones_attributes": [
      {
        "number": "783.909.1050 x131"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 308
      }
    ],
    "role_id": "19370"
  }
}

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":"783.909.1050 x131"}],"memberships_attributes":[{"group_id":308}],"role_id":"19370"}}' -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 1a912ce852dfed4681720691ee92b839add7b996be6ede021f6c3c6fca3945cb"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"466eab4fb8f72228957c9a3c8c45f23e"

Body

{
  "users": {
    "id": "7669",
    "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": "19370",
    "created_at": 1582297867,
    "updated_at": 1582297867,
    "cached_at": "1582297867.631888000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576595467,
      "favorites": 1581347467,
      "fences": 1579792267,
      "groups": 1582297867,
      "networks": 1581261067,
      "roles": 1582297867,
      "settings": 1582297867
    }
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer ef4be4b7535b103fe0aedd839ec4d52dc949958f718ffcaf111d190d67604ca7

cURL

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

Response

Simulated Response

Status

204

Favorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Content-Type: application/json
Authorization: Bearer 445b9b82615675119af6b43f1f273b64505834a0b2a3825325c908d861a53500

Body

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

cURL

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

Response

Simulated Response

Status

204

Hide a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Content-Type: application/json
Authorization: Bearer 1fd880269c484472e04dfb8a05b39780658f9f603dd7d0c2d0e8c0ccbd117bcd

Body

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

cURL

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

Response

Simulated Response

Status

204

List all archived users

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

Endpoint

GET /api/v4/users?archived=true

Request

Route

GET /api/v4/users?archived=true

Headers

Content-Type: application/json
Authorization: Bearer f4a6a97184e865e0cb0b32e846b8b345ec0b5fc465c67bf93354ad4112e76be6

Query Parameters

archived=true

cURL

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

Response

Simulated Response

Status

200

Headers

ETag: W/"6ade5fb8f70fd872f7445ad2780feb8a"
Last-Modified: Fri, 21 Feb 2020 15:11:13 GMT

Body

{
  "users": [
    {
      "id": "7730",
      "name": "Jeni Crona",
      "email": null,
      "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
      "details": "Esse non veniam.",
      "lang": "en",
      "role_id": null,
      "created_at": 1582297873,
      "updated_at": 1582297873,
      "cached_at": "1582297873.099975800"
    }
  ],
  "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": 1574867472,
      "favorites": 1574521872,
      "fences": 1582211472,
      "groups": 1575904272,
      "networks": 1575472273,
      "roles": 1582297873,
      "settings": 1582297873
    },
    "trusted_cached_at": "1582297858.129861800"
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer 0c3162c78f2b00650b3ae6d9adcbe77a2940c328168ae54793d4f99aaf0cdc12

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"cb241e7acef7556def4a25b0c73a6613"
Last-Modified: Fri, 21 Feb 2020 15:11:07 GMT

Body

{
  "futures": [
    {
      "id": "202",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1582876800,
      "user_id": "7672",
      "changed_by_user_id": null
    },
    {
      "id": "203",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1588330800,
      "user_id": "7672",
      "changed_by_user_id": "7673"
    }
  ],
  "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/7672/futures?user_id=7672",
      "last_href": "http://example.org/api/v4/users/7672/futures?user_id=7672",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1575299467,
      "favorites": 1576336267,
      "fences": 1575385867,
      "groups": 1582125067,
      "networks": 1574349067,
      "roles": 1582297867,
      "settings": 1582297867
    }
  }
}

List all future statuses for the current user

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

Endpoint

GET /api/v4/users/my/futures

Parameters

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

Request

Route

GET /api/v4/users/my/futures

Headers

Content-Type: application/json
Authorization: Bearer e46b2dc6c55e3276c3dbb8cdb56297fbf9865b88ad49be67fa89938f91bd0b37

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"f3df6e8fe463b5325c34f161be5682bd"
Last-Modified: Fri, 21 Feb 2020 15:11:07 GMT

Body

{
  "futures": [
    {
      "id": "200",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1582876800,
      "user_id": "7666",
      "changed_by_user_id": null
    },
    {
      "id": "201",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1588330800,
      "user_id": "7666",
      "changed_by_user_id": "7667"
    }
  ],
  "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=7666",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=7666",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1581261067,
      "favorites": 1580742667,
      "fences": 1577459467,
      "groups": 1580656267,
      "networks": 1575817867,
      "roles": 1582297867,
      "settings": 1582297867
    }
  }
}

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/7680/statuses?created_at=1581660000..1581919199

Headers

Content-Type: application/json
Authorization: Bearer d51e85ef1fee3efb11d5de09704110f1875433c8c6ba407d2f4f79322d81b9b0

Query Parameters

created_at=1581660000..1581919199

cURL

curl -g "https://www.simpleinout.com/api/v4/users/7680/statuses?created_at=1581660000..1581919199" -X GET \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer d51e85ef1fee3efb11d5de09704110f1875433c8c6ba407d2f4f79322d81b9b0"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"8938095c3ab7d30c7070348614faf267"
Last-Modified: Sat, 15 Feb 2020 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581667200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581681600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581685200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581703200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581753600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": null,
      "created_at": 1581775200
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "7680",
      "changed_by_user_id": "7681",
      "created_at": 1581778800
    }
  ],
  "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/7680/statuses?created_at=1581660000..1581919199\u0026user_id=7680",
      "last_href": "http://example.org/api/v4/users/7680/statuses?created_at=1581660000..1581919199\u0026user_id=7680",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1573830668,
      "favorites": 1579705868,
      "fences": 1580829068,
      "groups": 1576422668,
      "networks": 1576681868,
      "roles": 1582297868,
      "settings": 1582297868
    }
  }
}

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=1581660000..1581919199

Headers

Content-Type: application/json
Authorization: Bearer 08235164ebf27e68216620f25b84d5d9a3c9f32f6a0dd9ca1ddad398c84fbed0

Query Parameters

created_at=1581660000..1581919199

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"338081c7cd9c8320aaf5d5398073f991"
Last-Modified: Sat, 15 Feb 2020 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581667200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581681600
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581685200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581703200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581753600
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": null,
      "created_at": 1581775200
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "7651",
      "changed_by_user_id": "7652",
      "created_at": 1581778800
    }
  ],
  "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=1581660000..1581919199\u0026user_id=7651",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1581660000..1581919199\u0026user_id=7651",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1581001865,
      "favorites": 1578582665,
      "fences": 1576249865,
      "groups": 1575558665,
      "networks": 1579446665,
      "roles": 1582297865,
      "settings": 1582297865
    }
  }
}

List all users

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

Endpoint

GET /api/v4/users

Parameters

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

Request

Route

GET /api/v4/users

Headers

Content-Type: application/json
Authorization: Bearer b66b9a40148ae2e0f5d021b4d7508f63e7d996f08aae3a7853ba2e61eeab7beb

cURL

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

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/"1a8fd76b1e5ae75316a131df30fc3ebc"
Last-Modified: Fri, 21 Feb 2020 15:11:06 GMT

Body

{
  "users": [
    {
      "id": "7656",
      "name": "Ray Gillette",
      "email": "ray@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/568d24da7c180b33aaff58442062126d.png?s=270\u0026d=blank",
      "details": "Maxime minima autem.",
      "lang": "en",
      "role_id": "19348",
      "created_at": 1582297866,
      "updated_at": 1582297866,
      "cached_at": "1582297866.407648000"
    },
    {
      "id": "7655",
      "name": "Lana Kane",
      "email": "lana@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/59b99926dd1b78d777b8ee0fd2c65575.png?s=270\u0026d=blank",
      "details": "Id neque nihil.",
      "lang": "en",
      "role_id": "19348",
      "created_at": 1582297866,
      "updated_at": 1582297866,
      "cached_at": "1582297866.383343200"
    },
    {
      "id": "7654",
      "name": "Sterling Archer",
      "email": "sterling@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
      "details": "Maxime placeat mollitia.",
      "lang": "en",
      "role_id": "19348",
      "created_at": 1582297866,
      "updated_at": 1582297866,
      "cached_at": "1582297866.351513100"
    },
    {
      "id": "7653",
      "name": "Malory Archer",
      "email": "malory@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/551eccbc6a509e7d8121efb87dffaf6f.png?s=270\u0026d=blank",
      "details": "Minima nihil corporis.",
      "lang": "en",
      "role_id": "19346",
      "created_at": 1582297866,
      "updated_at": 1582297866,
      "cached_at": "1582297866.311008000"
    }
  ],
  "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": 1575904266,
      "favorites": 1575990666,
      "fences": 1580915466,
      "groups": 1576941066,
      "networks": 1582038666,
      "roles": 1582297866,
      "settings": 1582297866
    },
    "trusted_cached_at": "1582297851.439195000"
  }
}

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

Headers

Content-Type: application/json
Authorization: Bearer b42ff13c084a990479eaabfd9b8869af51d7bdaca3a1e8e3c62a55211a8fbd6d

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"2df7fd707dccf3f21054d8203699a58e"
Last-Modified: Fri, 21 Feb 2020 15:11:05 GMT

Body

{
  "users": {
    "id": "7643",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Facere quia rem.",
    "lang": "en",
    "role_id": "19324",
    "created_at": 1582297865,
    "updated_at": 1582297865,
    "cached_at": "1582297865.023805900"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1577977864,
      "favorites": 1579187464,
      "fences": 1581347464,
      "groups": 1579101064,
      "networks": 1577632264,
      "roles": 1582297864,
      "settings": 1582297864
    }
  }
}

Retrieve the current user

Retrieve the current user who is authorized.

Endpoint

GET /api/v4/users/my

Parameters

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

Request

Route

GET /api/v4/users/my

Headers

Content-Type: application/json
Authorization: Bearer b92baaf80cfa68621546c6ca6fabde901f02abc752885f77d07021068873585a

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"6f701c80858b87ec3a303fd09d89140f"
Last-Modified: Fri, 21 Feb 2020 15:11:07 GMT

Body

{
  "users": {
    "id": "7671",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Provident facilis sit.",
    "lang": "en",
    "role_id": "19376",
    "created_at": 1582297867,
    "updated_at": 1582297867,
    "cached_at": "1582297867.738705000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579965067,
      "favorites": 1578237067,
      "fences": 1578323467,
      "groups": 1575558667,
      "networks": 1577200267,
      "roles": 1582297867,
      "settings": 1582297867
    }
  }
}

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/7686/unarchive

Headers

Content-Type: application/json
Authorization: Bearer b98509e8de4a81bb98b4cdbf46657dce953a290d9c8b5a22b957f13a46a7b217

Body

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

cURL

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

Response

Simulated Response

Status

200

Headers

ETag: W/"8703301c99279d30e22d8056e9d55b72"

Body

{
  "users": {
    "id": "7686",
    "name": "Ms. Detra Mosciski",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
    "details": "Consequatur et quod.",
    "lang": "en",
    "role_id": "19406",
    "created_at": 1582297869,
    "updated_at": 1582297869,
    "cached_at": "1582297869.161862900"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1579878669,
      "favorites": 1579360269,
      "fences": 1575126669,
      "groups": 1579187469,
      "networks": 1581865869,
      "roles": 1582297869,
      "settings": 1582297869
    }
  }
}

Unfavorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Content-Type: application/json
Authorization: Bearer b3ad89d38cedab215eeed13b3b735fc465629e297ec5cd6c569c584f3887d364

Body

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

cURL

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

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

Headers

Content-Type: application/json
Authorization: Bearer bc0654502400e11142a37bc0a779979032b1c067234dc6a95ebef1fd311561e4

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "1-368-568-5771 x156"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 309
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/7677" -d '{"user":{"phones_attributes":[{"number":"1-368-568-5771 x156"}],"memberships_attributes":[{"group_id":309}]}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer bc0654502400e11142a37bc0a779979032b1c067234dc6a95ebef1fd311561e4"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"11c09baf7317f60b6dcb04a81146cefb"

Body

{
  "users": {
    "id": "7677",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Reprehenderit omnis quas.",
    "lang": "en",
    "role_id": "19388",
    "created_at": 1582297868,
    "updated_at": 1582297868,
    "cached_at": "1582297868.278432000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1575472268,
      "favorites": 1574694668,
      "fences": 1576077068,
      "groups": 1582297868,
      "networks": 1579446668,
      "roles": 1582297868,
      "settings": 1582297868
    }
  }
}

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

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

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "1-350-324-0742 x20920"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 311
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d '{"user":{"phones_attributes":[{"number":"1-350-324-0742 x20920"}],"memberships_attributes":[{"group_id":311}]}}' -X PATCH \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 89a92c31fba6d6e66402319b1ccde125cc4a899e6520af28925d2e8e037552d0"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"1eab2d7f4c61eb59d427e00e1106cb7d"

Body

{
  "users": {
    "id": "7684",
    "name": "Stepanie O'Reilly",
    "email": "mallory@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/a52e9ca0dba44563ab69e63a40cbb771.png?s=270\u0026d=blank",
    "details": "Praesentium est vel.",
    "lang": "en",
    "role_id": "19402",
    "created_at": 1582297868,
    "updated_at": 1582297869,
    "cached_at": "1582297869.020407000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1576249868,
      "favorites": 1581520268,
      "fences": 1576854668,
      "groups": 1582297868,
      "networks": 1574608268,
      "roles": 1582297868,
      "settings": 1582297868
    }
  }
}