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 specfically what was invalid with the input. Please note that while the key will typically be a parameter on the object, it can occassionally be base for errors that fail validation but don’t apply to a particular field.

An example of an error payload:

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

Error Codes

1002: Company is Disabled

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


2002: Status Failure

The status update could not be completed.


5001: Bad Range

The integer or date value/range is invalid.


5002: Unknown Sort

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


5003: Unknown Expansion

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


5005: Validation Failure

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


5007: Parameters Missing

A required parameter for this API was missing.


5008: Array Required

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


5009: Unknown Only

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


5010: Invalid Float

The floating point number is invalid.


5012: Invalid JSON

The posted JSON body is invalid.


5013: Invalid Page Size of Zero

The page_size parameter cannot be zero.

Error Details

taken

The attribute is not unique

inclusion

The attribute is not in the list of acceptable values

invalid

The attribute is not valid

empty

The attribute cannot be empty

blank

The attribute cannot be blank

too_long

The attribute is too long

not_a_hex

The attribute is not a valid hex color code

not_a_number

The attribute is not a number

not_an_integer

The attribute is not an integer

greater_than

The attribute is greater than a predefined limit

greater_than_or_equal_to

The attribute is greater than or equal to a predefined limit

less_than

The attribute is less than a predefined floor

less_than_or_equal_to

The attribute is greater than or equal to a predefined floor

too_long

The attribute is longer than allowed

too_short

The attribute is shorter than allowed

Forbidden Requests (403)

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

Example payload:

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

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

Web Hooks

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

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

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

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



Authentication

Authorization

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

Endpoint

GET /oauth/authorize

Parameters

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

Request

Route

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

Query Parameters

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

cURL

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

Response

Simulated Response

Status

302

Body

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

Authorization Code grant

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

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

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Body

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"e0904d9f7923a579d106b10df9fec49a"

Body

{
  "access_token": "240e415e68fe0fefc18b3e84f13909682af37d58b316d40efba879f6b917fd1f",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "137bed19aa57025d41c43213078767d6731a9f59fbe5fc7aad6cc78b9a887de9",
  "scope": "write",
  "created_at": 1573575288,
  "user": {
    "id": "8761",
    "company_id": "5139",
    "roles": {
      "id": "22406",
      "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": 1573575288,
      "updated_at": 1573575288
    }
  }
}

Refresh Token grant

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

Endpoint

POST /oauth/token

Parameters

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

Request

Route

POST /oauth/token

Body

{
  "grant_type": "refresh_token",
  "refresh_token": "cs8ipx1mxy1tjofe2v97n1e2ypl50ibf"
}

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"9a155761aaf8315da3a233c15f4f7ba0"

Body

{
  "access_token": "749bf461d5d5e395da1fb52e407a0e9cef69a4f1a1323a52cf984fa4aa49ca90",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "8d592506535fb41c6a62c652c89459763fca627f71745696bd91aed26dfaac33",
  "scope": "write",
  "created_at": 1573575288,
  "user": {
    "id": "8758",
    "company_id": "5137",
    "roles": {
      "id": "22398",
      "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": 1573575288,
      "updated_at": 1573575288
    }
  }
}

Revoke a token

Revokes a token, rendering it invalid.

Endpoint

POST /oauth/revoke

Parameters

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

Request

Route

POST /oauth/revoke

Body

{
  "client_id": "PLACE_YOUR_API_CLIENT_ID_HERE",
  "client_secret": "PLACE_YOUR_API_CLIENT_SECRET_HERE",
  "token": "488e1fc874a062ddf3da3618d648fd288ca198af8d48d84f84b3e97f6a1f4799"
}

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":"488e1fc874a062ddf3da3618d648fd288ca198af8d48d84f84b3e97f6a1f4799"}' -X POST 

Response

Simulated Response

Status

200

Headers

ETag: W/"44136fa355b3678a1146ad16f7e8649e"

Body

{}

Token information

Provides details about the OAuth token.

Endpoint

GET /oauth/token/info

Request

Route

GET /oauth/token/info

Headers

Authorization: Bearer b0786c373b11cb88a1054fdabcef3901cd21d35baa75401fead9f74ed4decf7a

cURL

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

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/"9ea8585887822d2109a6c1e10897f897"

Body

{
  "resource_owner_id": 8763,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "8033874696637"
  },
  "created_at": 1573575288
}

Beacons

Create a beacon

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

Endpoint

POST /api/v4/beacons

Parameters

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

Request

Route

POST /api/v4/beacons

Headers

Authorization: Bearer 4442e8754687bc16532099bdb1f0d04e9d835a61e9760b5c37fc6e6e82e5b68f

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"f493517b67213a9d6a7a0a17681d0dba"

Body

{
  "beacons": {
    "id": "431",
    "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": 1573575288,
    "updated_at": 1573575288
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573575288,
      "favorites": 1569683688,
      "fences": 1569683688,
      "groups": 1565277288,
      "networks": 1569251688,
      "roles": 1573575288,
      "settings": 1573575288
    }
  }
}

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

Headers

Authorization: Bearer 7cbeaf4ceea13e03bbdc538f7ecca291c0e0e5947c9a6182713511d5083151cf

cURL

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

Response

Simulated Response

Status

204

List all beacons

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

Endpoint

GET /api/v4/beacons

Parameters

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

Request

Route

GET /api/v4/beacons

Headers

Authorization: Bearer b82a4f881c1b7d7f6c4f5d2863825b1c2371c8a3be07080e3a9bf4081cf88c17

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"d61f881481e33804530894118477876b"
Last-Modified: Tue, 12 Nov 2019 16:14:48 GMT

Body

{
  "beacons": [
    {
      "id": "430",
      "name": "Schaden-Zboncak",
      "uuid": "20458926-08B3-4C91-86D0-09DF39359B87",
      "comment_on_entry": "In at Schaden-Zboncak",
      "comment_on_exit": "Left Schaden-Zboncak",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575288,
      "updated_at": 1573575288
    },
    {
      "id": "429",
      "name": "Runolfsdottir and Sons",
      "uuid": "51ECC6D2-B1F1-4E4D-A71E-E4D03070E473",
      "comment_on_entry": "In at Runolfsdottir and Sons",
      "comment_on_exit": "Left Runolfsdottir and Sons",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575288,
      "updated_at": 1573575288
    }
  ],
  "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": 1573575288,
      "favorites": 1571930088,
      "fences": 1568992488,
      "groups": 1567350888,
      "networks": 1569942888,
      "roles": 1573575288,
      "settings": 1573575288
    }
  }
}

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

Headers

Authorization: Bearer 58b7925d2a0c501af671dce7fc84144b182ef1c6341b5005f866a28ba36fdfb9

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"8405fc735f0d8a7c0e323f89bf21602b"

Body

{
  "beacons": {
    "id": "427",
    "name": "My Renamed Office",
    "uuid": "10C5BB92-EAFC-435C-A56E-62811956D5F2",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1573575288,
    "updated_at": 1573575288
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573575288,
      "favorites": 1571152488,
      "fences": 1566659688,
      "groups": 1569683688,
      "networks": 1566054888,
      "roles": 1573575288,
      "settings": 1573575288
    }
  }
}

Companies

Retrieve the current company

Return the company the authorized user belongs to.

Endpoint

GET /api/v4/companies/my

Parameters

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

Request

Route

GET /api/v4/companies/my

Headers

Authorization: Bearer 3543f3ab1d07b8c43e5dd30235beaf20e4f6d630268ddb971c9533a2d3312846

cURL

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

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/"239dbe4828ebadd27dd30c71cfaac671"
Last-Modified: Tue, 12 Nov 2019 16:14:47 GMT

Body

{
  "companies": {
    "id": "5125",
    "name": "Kilback Inc",
    "scheduled_statuses": true,
    "default_role_id": "22352",
    "logo_url": null,
    "created_at": 1573575287
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565968487,
      "favorites": 1570115687,
      "fences": 1567610087,
      "groups": 1567523687,
      "networks": 1569856487,
      "roles": 1573575287,
      "settings": 1573575287
    }
  }
}

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

Headers

Authorization: Bearer e45d4600b67c113d2638006086d99e41b8dd42af351630f20a23216ed0105ba0

cURL

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

Response

Simulated Response

Status

204

List future statuses

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

Endpoint

GET /api/v4/futures

Parameters

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

Request

Route

GET /api/v4/futures

Headers

Authorization: Bearer 36a9369ff83025e7a71a7617f585ea7883e62c1db0db8fcb0af657bf292e7aeb

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"ef86871a31498ec33cb0a358bd77a9ea"
Last-Modified: Tue, 12 Nov 2019 16:14:47 GMT

Body

{
  "futures": [
    {
      "id": "296",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1576166400,
      "user_id": "8751",
      "changed_by_user_id": null
    },
    {
      "id": "297",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1589295600,
      "user_id": "8751",
      "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": 1573143287,
      "favorites": 1570634087,
      "fences": 1567955687,
      "groups": 1569942887,
      "networks": 1572707687,
      "roles": 1573575287,
      "settings": 1573575287
    }
  }
}

Geofences

Create a fence

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

Endpoint

POST /api/v4/fences

Parameters

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

Request

Route

POST /api/v4/fences

Headers

Authorization: Bearer 2ea5d7849a7ef2a4af6a26bc9e57233c72106fb03ccefcec3aa40d7892c1d1c3

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"80e20ff86bdbe090f292e8347331a491"

Body

{
  "fences": {
    "id": "178",
    "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": 1573575284,
    "updated_at": 1573575284
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573316084,
      "favorites": 1571152484,
      "fences": 1573575284,
      "groups": 1569770084,
      "networks": 1570547684,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

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

Headers

Authorization: Bearer 0028e586a11a8b1a653ae980db4b68ff58b69bc2889f48f51e64ac7012ba5be8

cURL

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

Response

Simulated Response

Status

204

List all fences

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

Endpoint

GET /api/v4/fences

Parameters

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

Request

Route

GET /api/v4/fences

Headers

Authorization: Bearer b8c29d2282b4bd1c6aab10d53dd7266cb7a51675d0f0fcb873b020b6b2099a34

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"95f50e2c04736d040bd11a2f4c1d78e6"
Last-Modified: Tue, 12 Nov 2019 16:14:44 GMT

Body

{
  "fences": [
    {
      "id": "180",
      "name": "gff8ehvagtg95l6yr9w1",
      "latitude": "10.3118914556",
      "longitude": "-67.1829961762",
      "radius": 3775,
      "comment_on_entry": "In at gff8ehvagtg95l6yr9w1",
      "comment_on_exit": "Left gff8ehvagtg95l6yr9w1",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575284,
      "updated_at": 1573575284
    },
    {
      "id": "179",
      "name": "9gofth9j33e2ny3utc08",
      "latitude": "-53.7077059844",
      "longitude": "-4.1210727197",
      "radius": 1930,
      "comment_on_entry": "In at 9gofth9j33e2ny3utc08",
      "comment_on_exit": "Left 9gofth9j33e2ny3utc08",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575284,
      "updated_at": 1573575284
    }
  ],
  "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": 1571843684,
      "favorites": 1571930084,
      "fences": 1573575284,
      "groups": 1573229684,
      "networks": 1565018084,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

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

Headers

Authorization: Bearer 24a6f0b43fc42ec0207e048df9555622bbb0d1b7e7969b8f8055d19abe46fc1b

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"efcc6d4c7aeb377ec255c83740cd2336"

Body

{
  "fences": {
    "id": "177",
    "name": "My Renamed Geofence",
    "latitude": "51.0790581562",
    "longitude": "108.0020678181",
    "radius": 592,
    "comment_on_entry": "In at My Renamed Geofence",
    "comment_on_exit": "Left My Renamed Geofence",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1573575284,
    "updated_at": 1573575284
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1567178083,
      "favorites": 1567782883,
      "fences": 1573575284,
      "groups": 1567091683,
      "networks": 1566141283,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

Groups

Create a group

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

Endpoint

POST /api/v4/groups

Parameters

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

Request

Route

POST /api/v4/groups

Headers

Authorization: Bearer f60024dc28dc00e505a6431ed0de5f84197f5d0981da76a80184e7741712af42

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"c323e52eac893747311f4793da6d8a3e"

Body

{
  "groups": {
    "id": "400",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566746084,
      "favorites": 1572102884,
      "fences": 1571930084,
      "groups": 1573575284,
      "networks": 1572884084,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

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

Headers

Authorization: Bearer dc287b706206842de1cbb09837336a0e41a38d77d656ab39d8c4923db3d34aca

cURL

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

Response

Simulated Response

Status

204

List all groups

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

Endpoint

GET /api/v4/groups

Parameters

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

Request

Route

GET /api/v4/groups

Headers

Authorization: Bearer e917447daad322089d670758e4492586f754d80133bde461380849b3f42c7066

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"5e56b1ede1b908313f5ec3e6b5b1de12"
Last-Modified: Tue, 12 Nov 2019 16:14:44 GMT

Body

{
  "groups": [
    {
      "id": "403",
      "name": "Towne-Kshlerin"
    },
    {
      "id": "402",
      "name": "Ledner, Torp and Jaskolski"
    }
  ],
  "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": 1568387684,
      "favorites": 1572448484,
      "fences": 1569338084,
      "groups": 1573575284,
      "networks": 1565536484,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

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

Headers

Authorization: Bearer 3a584612fbacc4dc6a3d484566f317ae3e7f161b4570549687de63c20ec4dbdb

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"ed1270d20dbec6de127b4c78a7ebd6fe"

Body

{
  "groups": {
    "id": "401",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566141284,
      "favorites": 1570806884,
      "fences": 1571584484,
      "groups": 1573575284,
      "networks": 1571584484,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

Networks

Create a network

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

Endpoint

POST /api/v4/networks

Parameters

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

Request

Route

POST /api/v4/networks

Headers

Authorization: Bearer ee7202860586b3f9e51e30bd0a597afd694deafdcdca4ec5a81e3bc3a112d4fd

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"81c5701cdb26ff30be9cba2e0f10249e"

Body

{
  "networks": {
    "id": "502",
    "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": 1573575289,
    "updated_at": 1573575289
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565104489,
      "favorites": 1568301289,
      "fences": 1565795689,
      "groups": 1572102889,
      "networks": 1573575289,
      "roles": 1573575289,
      "settings": 1573575289
    }
  }
}

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

Headers

Authorization: Bearer 5dff4257b4fe8c1c11b431ed774bfb4fcf06ab29522933c2c0f2361eb33fc40f

cURL

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

Response

Simulated Response

Status

204

List all networks

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

Endpoint

GET /api/v4/networks

Parameters

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

Request

Route

GET /api/v4/networks

Headers

Authorization: Bearer 7ed0e505d31aad30d1b494cc9a5560535e09742eb48752ad5a10de7502da38ce

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"0f109f17d2e7921ee1594e8d29ba664a"
Last-Modified: Tue, 12 Nov 2019 16:14:49 GMT

Body

{
  "networks": [
    {
      "id": "498",
      "name": "Deckow, Kutch and Roberts",
      "ssid": "gyu2rnk21g9pxd71thwnstcbyelagbdq",
      "comment_on_entry": "In at Deckow, Kutch and Roberts",
      "comment_on_exit": "Left Deckow, Kutch and Roberts",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575289,
      "updated_at": 1573575289
    },
    {
      "id": "499",
      "name": "Conroy, Considine and Turcotte",
      "ssid": "id6o1v1n1ya7ebryddljt0y61q96heb7",
      "comment_on_entry": "In at Conroy, Considine and Turcotte",
      "comment_on_exit": "Left Conroy, Considine and Turcotte",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1573575289,
      "updated_at": 1573575289
    }
  ],
  "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": 1565968488,
      "favorites": 1572275688,
      "fences": 1566659688,
      "groups": 1566141288,
      "networks": 1573575289,
      "roles": 1573575288,
      "settings": 1573575288
    }
  }
}

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

Headers

Authorization: Bearer 37d266aca303d397876951047cd9651f90a7b2aba15be411b465f1c271c6dde5

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"adcac81e09b9a3cfc824c071a454caad"

Body

{
  "networks": {
    "id": "500",
    "name": "My Renamed Office",
    "ssid": "5yqjmpo3s7urkktekoswootna7l4a1q9",
    "comment_on_entry": "In at My Renamed Office",
    "comment_on_exit": "Left My Renamed Office",
    "entry": true,
    "exit": true,
    "status_on_entry": "in",
    "status_on_exit": "out",
    "created_at": 1573575289,
    "updated_at": 1573575289
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1572797689,
      "favorites": 1566573289,
      "fences": 1568387689,
      "groups": 1572189289,
      "networks": 1573575289,
      "roles": 1573575289,
      "settings": 1573575289
    }
  }
}

Ok

Make sure things are Ok

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

Endpoint

GET /api/v4/ok

Request

Route

GET /api/v4/ok

Headers

Authorization: Bearer d8a19df463c4f8c4062d484f3a3259f3afc3c7359e232d2c211cd242922f6b40

cURL

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

Response

Simulated Response

Status

204

Roles

Create a role

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

Endpoint

POST /api/v4/roles

Parameters

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

Request

Route

POST /api/v4/roles

Headers

Authorization: Bearer 30c42e5f14d9b3a6cc6ac65d03263fc298ff844123970153b3a9ceab49ed0b82

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"4a96eb803f59d4ddad5c0b8b473944a3"

Body

{
  "roles": {
    "id": "22517",
    "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": 1573575290,
    "updated_at": 1573575290
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1570893290,
      "favorites": 1565190890,
      "fences": 1571411690,
      "groups": 1566314090,
      "networks": 1571757290,
      "roles": 1573575290,
      "settings": 1573575290
    }
  }
}

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

Headers

Authorization: Bearer dc8bf8bc9f1b66d7acd6365b9d74f2643923ccf6de27d948db8a2ff59a02396c

cURL

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

Response

Simulated Response

Status

204

List all roles

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

Endpoint

GET /api/v4/roles

Parameters

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

Request

Route

GET /api/v4/roles

Headers

Authorization: Bearer e5b6ab2c2b84c766ec41efa010c400749e7ae669029539c5933fe70f988d6743

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"4348842b5486729e210e280e646307b6"
Last-Modified: Tue, 12 Nov 2019 16:14:50 GMT

Body

{
  "roles": [
    {
      "id": "22509",
      "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": 1573575290,
      "updated_at": 1573575290
    },
    {
      "id": "22511",
      "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": 1573575290,
      "updated_at": 1573575290
    },
    {
      "id": "22510",
      "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": 1573575290,
      "updated_at": 1573575290
    },
    {
      "id": "22512",
      "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": 1573575290,
      "updated_at": 1573575290
    }
  ],
  "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": 1568992490,
      "favorites": 1572707690,
      "fences": 1572275690,
      "groups": 1570115690,
      "networks": 1568128490,
      "roles": 1573575290,
      "settings": 1573575290
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/22498

Headers

Authorization: Bearer 329e5f80a265405c21007cdcd0cff187343ced06757d6f34db1bef41a1c89806

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"c69f9181ae8d5df106a787ba738497a9"
Last-Modified: Tue, 12 Nov 2019 16:14:50 GMT

Body

{
  "roles": {
    "id": "22498",
    "name": "Jakubowski, Greenfelder and Kuphal",
    "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": 1573575290,
    "updated_at": 1573575290
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573488890,
      "favorites": 1570806890,
      "fences": 1573056890,
      "groups": 1570115690,
      "networks": 1566746090,
      "roles": 1573575290,
      "settings": 1573575290
    },
    "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/22503

Headers

Authorization: Bearer 2b34dedfab83d03a513f4d16917bf7e3bd453967efccfce44abc88744b66a8e7

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"406b64a8325d0a458a5223227626ee1f"

Body

{
  "roles": {
    "id": "22503",
    "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": 1573575290,
    "updated_at": 1573575290
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573488890,
      "favorites": 1567264490,
      "fences": 1569510890,
      "groups": 1567955690,
      "networks": 1572707690,
      "roles": 1573575290,
      "settings": 1573575290
    }
  }
}

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=1572933600..1573192799

Headers

Authorization: Bearer 7b55d7c26d831f8c1ed3cc803fbe918a9316fdf8a36dea88f1eb44cf510a145b

Query Parameters

created_at=1572933600..1573192799

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1572933600..1573192799" -X GET \
	-H "Authorization: Bearer 7b55d7c26d831f8c1ed3cc803fbe918a9316fdf8a36dea88f1eb44cf510a145b"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"f2774d4607a0add1f5a7abb564417893"
Last-Modified: Wed, 06 Nov 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1572940800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1572955200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1572958800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1572976800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": true,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1573027200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": true,
      "user_id": "8809",
      "changed_by_user_id": null,
      "created_at": 1573048800
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "automatic": false,
      "user_id": "8809",
      "changed_by_user_id": "8810",
      "created_at": 1573052400
    }
  ],
  "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=1572933600..1573192799",
      "last_href": "http://example.org/api/v4/statuses?created_at=1572933600..1573192799",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1572970490,
      "favorites": 1572016490,
      "fences": 1572970490,
      "groups": 1569251690,
      "networks": 1567523690,
      "roles": 1573575290,
      "settings": 1573575290
    }
  }
}

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

Headers

Authorization: Bearer bde0aab872afd70bcbe92ab80a5e74a8747335671134e510c02b09429cd175a3

cURL

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

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

Headers

Authorization: Bearer b46e02c9727e82a1a459b0cde329efec2f2c3561c61d0de0afe8e94062220d08

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"962e233129480a7c4b401beadb37cadc"

Body

{
  "futures": {
    "id": "291",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1578844800,
    "user_id": "8694",
    "changed_by_user_id": "8693"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565277284,
      "favorites": 1570893284,
      "fences": 1573143284,
      "groups": 1573229684,
      "networks": 1572884084,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

Create a future status update for the current user

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

Endpoint

POST /api/v4/users/my/futures

Parameters

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

Request

Route

POST /api/v4/users/my/futures

Headers

Authorization: Bearer 9228efd852c24d169ab1f648769e368bf022298344efecb043a4c9ff85521399

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"8897634dae0b58736b43138ffd2c731c"

Body

{
  "futures": {
    "id": "294",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1578844800,
    "user_id": "8728",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566918886,
      "favorites": 1573056886,
      "fences": 1568646886,
      "groups": 1572102886,
      "networks": 1566918886,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

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

Headers

Authorization: Bearer 79b1716d8e723a92edea125ca4448207d5e7ec378546e5b787fc2d12cf58f529

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"687e6c020237ca79a2f7b51daad1910d"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "8692",
    "changed_by_user_id": "8691",
    "created_at": 1573575284
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1569856484,
      "favorites": 1567955684,
      "fences": 1573229684,
      "groups": 1568474084,
      "networks": 1570547684,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

Create a status update for the current user

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

Endpoint

POST /api/v4/users/my/statuses

Parameters

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

Request

Route

POST /api/v4/users/my/statuses

Headers

Authorization: Bearer 4251e6fd2953cd181dbb3c33daf10e042de077b962a554ef58152ecaf18b8e6e

Body

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

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"482cae4cf300530d6ad4d6a19f3f82eb"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "automatic": false,
    "user_id": "8720",
    "changed_by_user_id": null,
    "created_at": 1573575286
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566486886,
      "favorites": 1566573286,
      "fences": 1571498086,
      "groups": 1565104486,
      "networks": 1566141286,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

Create a user

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

Endpoint

POST /api/v4/users

Parameters

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

Request

Route

POST /api/v4/users

Headers

Authorization: Bearer d6a1a5b5a2c6a53db975535245b9b7e784851feba4f6d2bc3f3fc7ab5dda5c79

Body

{
  "user": {
    "email": "bojack@simplymadeapps.com",
    "name": "Bojack Horseman",
    "details": "Lead Actor",
    "lang": "en",
    "phones_attributes": [
      {
        "number": "905.129.2397"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 407
      }
    ],
    "role_id": "22262"
  }
}

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":"905.129.2397"}],"memberships_attributes":[{"group_id":407}],"role_id":"22262"}}' -X POST \
	-H "Authorization: Bearer d6a1a5b5a2c6a53db975535245b9b7e784851feba4f6d2bc3f3fc7ab5dda5c79"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"30f83b39516dee6791f4a488b89adff0"

Body

{
  "users": {
    "id": "8703",
    "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": "22262",
    "created_at": 1573575285,
    "updated_at": 1573575285,
    "cached_at": "1573575285.414463000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1567350885,
      "favorites": 1573402485,
      "fences": 1571411685,
      "groups": 1573575285,
      "networks": 1571238885,
      "roles": 1573575285,
      "settings": 1573575285
    }
  }
}

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

Headers

Authorization: Bearer 18c91199bba26c830577ecc5a1c7e0557424480df0025869e318db10b41ca1ed

cURL

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

Response

Simulated Response

Status

204

Favorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer f684395685ee262e116324fad074cf93fb7d8aea62e776bb22d27443e0a7530f

Body

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

cURL

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

Response

Simulated Response

Status

204

Hide a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer c29edd28135c13dd21b7c064f88a502b766d19f438cf6307168f0a2321e81e76

Body

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

cURL

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

Response

Simulated Response

Status

204

List all archived users

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

Endpoint

GET /api/v4/users?archived=true

Request

Route

GET /api/v4/users?archived=true

Headers

Authorization: Bearer e49c66eefdde414b4bceda73f82c3fb7a05e26a0ebd8f68f89ffb42cedb939d4

Query Parameters

archived=true

cURL

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

Response

Simulated Response

Status

200

Headers

ETag: W/"f280fe803ba62feff894c326b79c83a2"
Last-Modified: Tue, 12 Nov 2019 16:14:48 GMT

Body

{
  "users": [
    {
      "id": "8766",
      "name": "Barb Stokes III",
      "email": null,
      "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
      "details": "Non dolorum quo.",
      "lang": "en",
      "role_id": null,
      "created_at": 1573575288,
      "updated_at": 1573575288,
      "cached_at": "1573575288.794055000"
    }
  ],
  "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": 1567178088,
      "favorites": 1568560488,
      "fences": 1565795688,
      "groups": 1568646888,
      "networks": 1568128488,
      "roles": 1573575288,
      "settings": 1573575288
    },
    "trusted_cached_at": "1573575273.808627000"
  }
}

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

Headers

Authorization: Bearer bd1810b45ba863851e0af0ab25be32feb2516b37fd65fdb05219e71021509eba

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"c48f0acb0e02fa277fc38329ed82129d"
Last-Modified: Tue, 12 Nov 2019 16:14:44 GMT

Body

{
  "futures": [
    {
      "id": "289",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1574150400,
      "user_id": "8689",
      "changed_by_user_id": null
    },
    {
      "id": "290",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1579608000,
      "user_id": "8689",
      "changed_by_user_id": "8690"
    }
  ],
  "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/8689/futures?user_id=8689",
      "last_href": "http://example.org/api/v4/users/8689/futures?user_id=8689",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1572016484,
      "favorites": 1570029284,
      "fences": 1569942884,
      "groups": 1568992484,
      "networks": 1566659684,
      "roles": 1573575284,
      "settings": 1573575284
    }
  }
}

List all future statuses for the current user

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

Endpoint

GET /api/v4/users/my/futures

Parameters

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

Request

Route

GET /api/v4/users/my/futures

Headers

Authorization: Bearer a590500994928107d1ac2eff28d22b99c4d3fd1463f684ad91676609235c39a4

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"4a437d8676850eae759f01d7a4c8d140"
Last-Modified: Tue, 12 Nov 2019 16:14:46 GMT

Body

{
  "futures": [
    {
      "id": "292",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1574150400,
      "user_id": "8724",
      "changed_by_user_id": null
    },
    {
      "id": "293",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1579608000,
      "user_id": "8724",
      "changed_by_user_id": "8725"
    }
  ],
  "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=8724",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=8724",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1569338086,
      "favorites": 1567178086,
      "fences": 1573316086,
      "groups": 1569078886,
      "networks": 1565277286,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

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/8729/statuses?created_at=1572933600..1573192799

Headers

Authorization: Bearer 99f0e8f206f48dacae5ec85091e4de931c3091e6bbb1f0ff41c255c850688172

Query Parameters

created_at=1572933600..1573192799

cURL

curl -g "https://www.simpleinout.com/api/v4/users/8729/statuses?created_at=1572933600..1573192799" -X GET \
	-H "Authorization: Bearer 99f0e8f206f48dacae5ec85091e4de931c3091e6bbb1f0ff41c255c850688172"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"34afca3c624d6271c011ec6571efa26e"
Last-Modified: Wed, 06 Nov 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1572940800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1572955200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1572958800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1572976800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1573027200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": null,
      "created_at": 1573048800
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "8729",
      "changed_by_user_id": "8730",
      "created_at": 1573052400
    }
  ],
  "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/8729/statuses?created_at=1572933600..1573192799\u0026user_id=8729",
      "last_href": "http://example.org/api/v4/users/8729/statuses?created_at=1572933600..1573192799\u0026user_id=8729",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1568992486,
      "favorites": 1571843686,
      "fences": 1568474086,
      "groups": 1565882086,
      "networks": 1565450086,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

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=1572933600..1573192799

Headers

Authorization: Bearer 34a1af1b7a53ba888001601f80490e49212dc37890fa49750463c86369e345bb

Query Parameters

created_at=1572933600..1573192799

cURL

curl -g "https://www.simpleinout.com/api/v4/users/my/statuses?created_at=1572933600..1573192799" -X GET \
	-H "Authorization: Bearer 34a1af1b7a53ba888001601f80490e49212dc37890fa49750463c86369e345bb"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"7650af891de5788336b835fd57ef2f9e"
Last-Modified: Wed, 06 Nov 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1572940800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1572955200
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1572958800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1572976800
    },
    {
      "status": "in",
      "comment": "At Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1573027200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": null,
      "created_at": 1573048800
    },
    {
      "status": "out",
      "comment": "Vacation",
      "automatic": false,
      "user_id": "8711",
      "changed_by_user_id": "8712",
      "created_at": 1573052400
    }
  ],
  "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=1572933600..1573192799\u0026user_id=8711",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1572933600..1573192799\u0026user_id=8711",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1567005285,
      "favorites": 1572189285,
      "fences": 1573575285,
      "groups": 1566486885,
      "networks": 1571757285,
      "roles": 1573575285,
      "settings": 1573575285
    }
  }
}

List all users

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

Endpoint

GET /api/v4/users

Parameters

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

Request

Route

GET /api/v4/users

Headers

Authorization: Bearer 5df6376bd6c16ecf32ff81a08492b7ce0cecbe2f9c2c1831907bbcdf51d7f9f8

cURL

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

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/"2d5391d727c33657c96fa96f6c2ebf5c"
Last-Modified: Tue, 12 Nov 2019 16:14:46 GMT

Body

{
  "users": [
    {
      "id": "8717",
      "name": "Ray Gillette",
      "email": "ray@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/568d24da7c180b33aaff58442062126d.png?s=270\u0026d=blank",
      "details": "Veniam omnis aperiam.",
      "lang": "en",
      "role_id": "22288",
      "created_at": 1573575286,
      "updated_at": 1573575286,
      "cached_at": "1573575286.067905000"
    },
    {
      "id": "8716",
      "name": "Lana Kane",
      "email": "lana@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/59b99926dd1b78d777b8ee0fd2c65575.png?s=270\u0026d=blank",
      "details": "Fugit unde omnis.",
      "lang": "en",
      "role_id": "22288",
      "created_at": 1573575286,
      "updated_at": 1573575286,
      "cached_at": "1573575286.056913900"
    },
    {
      "id": "8715",
      "name": "Sterling Archer",
      "email": "sterling@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
      "details": "Sapiente quia distinctio.",
      "lang": "en",
      "role_id": "22288",
      "created_at": 1573575286,
      "updated_at": 1573575286,
      "cached_at": "1573575286.042309000"
    },
    {
      "id": "8714",
      "name": "Malory Archer",
      "email": "malory@simplymadeapps.com",
      "image_url": "https://gravatar.com/avatar/551eccbc6a509e7d8121efb87dffaf6f.png?s=270\u0026d=blank",
      "details": "Asperiores voluptatem maxime.",
      "lang": "en",
      "role_id": "22286",
      "created_at": 1573575286,
      "updated_at": 1573575286,
      "cached_at": "1573575286.030719000"
    }
  ],
  "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": 1571930085,
      "favorites": 1570288485,
      "fences": 1567696485,
      "groups": 1572884085,
      "networks": 1570374885,
      "roles": 1573575286,
      "settings": 1573575286
    },
    "trusted_cached_at": "1573575271.082387000"
  }
}

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

Headers

Authorization: Bearer 162aae874115a9cfd28f2ad3f912a73c3844f80a3dae75ce1b2d4a6e8f6ca9a1

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"7cb75c00fca30ec8f700d703004e1c64"
Last-Modified: Tue, 12 Nov 2019 16:14:45 GMT

Body

{
  "users": {
    "id": "8699",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Aspernatur soluta omnis.",
    "lang": "en",
    "role_id": "22256",
    "created_at": 1573575285,
    "updated_at": 1573575285,
    "cached_at": "1573575285.238640000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1568560485,
      "favorites": 1569510885,
      "fences": 1565882085,
      "groups": 1569856485,
      "networks": 1569424485,
      "roles": 1573575285,
      "settings": 1573575285
    }
  }
}

Retrieve the current user

Retrieve the current user who is authorized.

Endpoint

GET /api/v4/users/my

Parameters

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

Request

Route

GET /api/v4/users/my

Headers

Authorization: Bearer bececfb3b562bfad340d3f910ffeffb8ba7763d4205683ba8bc3d18c08bb7562

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"e0c1ee02cfb018a085191632a741f3bf"
Last-Modified: Tue, 12 Nov 2019 16:14:46 GMT

Body

{
  "users": {
    "id": "8722",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Ipsum fugit voluptatem.",
    "lang": "en",
    "role_id": "22300",
    "created_at": 1573575286,
    "updated_at": 1573575286,
    "cached_at": "1573575286.309623000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1565882086,
      "favorites": 1567523686,
      "fences": 1566227686,
      "groups": 1573143286,
      "networks": 1570979686,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

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

Headers

Authorization: Bearer 1bbbd322de051023bed3aedc5f58641b0f9f54b0052959d299c2654ba92f9d21

Body

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

cURL

curl "https://www.simpleinout.com/api/v4/users/8801/unarchive" -d '{"user":{"email":"bojack@simplymadeapps.com","role_id":"22490"}}' -X POST \
	-H "Authorization: Bearer 1bbbd322de051023bed3aedc5f58641b0f9f54b0052959d299c2654ba92f9d21"

Response

Simulated Response

Status

200

Headers

ETag: W/"d1ec742800c6c25fbfa33d699a784a7e"

Body

{
  "users": {
    "id": "8801",
    "name": "Dr. Nathanial Quitzon",
    "email": "bojack@simplymadeapps.com",
    "image_url": "https://www.gravatar.com/avatar/6b5ed240042e8a65c55ddb826c3408e6.png?d=blank\u0026s=270",
    "details": "Et voluptatum ducimus.",
    "lang": "en",
    "role_id": "22490",
    "created_at": 1573575290,
    "updated_at": 1573575290,
    "cached_at": "1573575290.496014000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1567955690,
      "favorites": 1569338090,
      "fences": 1569770090,
      "groups": 1570893290,
      "networks": 1572707690,
      "roles": 1573575290,
      "settings": 1573575290
    }
  }
}

Unfavorite a status for the current user

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

Endpoint

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

Parameters

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

Request

Route

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

Headers

Authorization: Bearer ee782da77ab6b5de5f06c94fe9bb6ce90e9545cc46a2c802b2095fd8e02f25c9

Body

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

cURL

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

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

Headers

Authorization: Bearer 10044446a8973340c90ac9fb12998ada70072708e3d66197693b3e97784542f4

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "279-788-0231 x8037"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 409
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/8727" -d '{"user":{"phones_attributes":[{"number":"279-788-0231 x8037"}],"memberships_attributes":[{"group_id":409}]}}' -X PATCH \
	-H "Authorization: Bearer 10044446a8973340c90ac9fb12998ada70072708e3d66197693b3e97784542f4"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"544448cb911cc0d56bd9d54212d99994"

Body

{
  "users": {
    "id": "8727",
    "name": "Sterling Archer",
    "email": "sterling@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/3a9f052a01c2f514382f679f5d8b60e3.png?s=270\u0026d=blank",
    "details": "Eum et quae.",
    "lang": "en",
    "role_id": "22308",
    "created_at": 1573575286,
    "updated_at": 1573575286,
    "cached_at": "1573575286.504222900"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1573488886,
      "favorites": 1573056886,
      "fences": 1571930086,
      "groups": 1573575286,
      "networks": 1569251686,
      "roles": 1573575286,
      "settings": 1573575286
    }
  }
}

Update the current user

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

Endpoint

PATCH /api/v4/users/my

Parameters

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

Request

Route

PATCH /api/v4/users/my

Headers

Authorization: Bearer 157b50ef9c0d8d161e73f5df19da68607dc4b55afe4a66d65bffcb816ec0b428

Body

{
  "user": {
    "phones_attributes": [
      {
        "number": "1-341-120-5231 x182"
      }
    ],
    "memberships_attributes": [
      {
        "group_id": 405
      }
    ]
  }
}

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d '{"user":{"phones_attributes":[{"number":"1-341-120-5231 x182"}],"memberships_attributes":[{"group_id":405}]}}' -X PATCH \
	-H "Authorization: Bearer 157b50ef9c0d8d161e73f5df19da68607dc4b55afe4a66d65bffcb816ec0b428"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"7c058ded9dc600e86f2b6d8acba55589"

Body

{
  "users": {
    "id": "8695",
    "name": "Dillon Prosacco",
    "email": "mallory@simplymadeapps.com",
    "image_url": "https://gravatar.com/avatar/a52e9ca0dba44563ab69e63a40cbb771.png?s=270\u0026d=blank",
    "details": "Pariatur vero labore.",
    "lang": "en",
    "role_id": "22246",
    "created_at": 1573575285,
    "updated_at": 1573575285,
    "cached_at": "1573575285.090937100"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1566659685,
      "favorites": 1571584485,
      "fences": 1565018085,
      "groups": 1573575285,
      "networks": 1567091685,
      "roles": 1573575285,
      "settings": 1573575285
    }
  }
}