Simple In/Out API v4 Documentation

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

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

Rate Limiting

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

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

Expansions

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

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

The Meta object

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

Here’s an example of a meta object

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

Pagination

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

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

Last Update At

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

If Modified Since and If None Match

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

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

Range Searching

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

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

Sorting

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

Errors

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

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

An example of an error payload:

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

Error Codes

1002: Company is Disabled

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


2002: Status Failure

The status update could not be completed.


5001: Bad Range

The integer or date value/range is invalid.


5002: Unknown Sort

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


5003: Unknown Expansion

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


5005: Validation Failure

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


5007: Parameters Missing

A required parameter for this API was missing.


5008: Array Required

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


5009: Unknown Only

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


5010: Invalid Float

The floating point number is invalid.

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 two event types: status.new 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@horsinaround.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%2Fromaguera.info&scope=write&locale=en

Query Parameters

response_type=code
client_id=PLACE_YOUR_API_CLIENT_ID_HERE
redirect_uri=https://romaguera.info
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%2Fromaguera.info&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=277e10ace385c7869335fb11c8996024538020bc5dcdd037a07ea5c92d3eb050&redirect_uri=https%3A%2F%2Fwyman.org

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=277e10ace385c7869335fb11c8996024538020bc5dcdd037a07ea5c92d3eb050&redirect_uri=https%3A%2F%2Fwyman.org' -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/"413bad795b9c3c3c6f2de9741047c929"

Body

{
  "access_token": "635ab4b3fe8ca89a185e9265e2cf103b0cb491846b97bf544dadfeb452e473c0",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "84eb19a108ba0f33df9194eba752f041136fa04768422732e060c5906bbb4c18",
  "scope": "write",
  "created_at": 1548957333,
  "user": {
    "id": "101017",
    "roles": {
      "id": "244819",
      "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": 1548957333,
      "updated_at": 1548957333
    }
  }
}

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=exp8qq324vzykqflh3wfba0qrnzqbrpx

cURL

curl "https://www.simpleinout.com/oauth/token" -d 'grant_type=refresh_token&refresh_token=exp8qq324vzykqflh3wfba0qrnzqbrpx' -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/"fbeba6d2e6bb0159132242a11c0f500e"

Body

{
  "access_token": "7f683b6f341b3b967fa262aab46286e02284dad79086ff18fe18f75f38a207f6",
  "token_type": "bearer",
  "expires_in": 604800,
  "refresh_token": "02cde08d26cc96162e610803c312bfffb49ea1db2105876a4ea8a69a953b5978",
  "scope": "write",
  "created_at": 1548957333,
  "user": {
    "id": "101016",
    "roles": {
      "id": "244815",
      "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": 1548957333,
      "updated_at": 1548957333
    }
  }
}

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=9381e72b5a105504c7eea57ed272a32720683f8589d135a423d751aae71c6c01

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=9381e72b5a105504c7eea57ed272a32720683f8589d135a423d751aae71c6c01' -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 01d8128d7ca0f73e10dbc4fe65dd78a1c7c3e70d41abd92021c902a363ddc588

cURL

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

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/"849764c48693f66fa5ffda0cd891c256"

Body

{
  "resource_owner_id": 101019,
  "scopes": [
    "read"
  ],
  "expires_in_seconds": 604800,
  "application": {
    "uid": "7282152819331"
  },
  "created_at": 1548957334
}

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 9a41dd051db927fa38542f5185cb2daa11fcfed38f3fb740286493f32a421c1b

Body

beacon[name]=My+Office&beacon[uuid]=6EA4801F-4D41-4114-AFA7-7EC977C81B41

cURL

curl "https://www.simpleinout.com/api/v4/beacons" -d 'beacon[name]=My+Office&beacon[uuid]=6EA4801F-4D41-4114-AFA7-7EC977C81B41' -X POST \
	-H "Authorization: Bearer 9a41dd051db927fa38542f5185cb2daa11fcfed38f3fb740286493f32a421c1b"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly created beacon attributes

Status

201

Headers

ETag: W/"8bd6f4e764cd24315237ddbaef2da2b9"

Body

{
  "beacons": {
    "id": "3953",
    "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": 1548957337,
    "updated_at": 1548957337
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1548957337,
      "favorites": 1542477337,
      "fences": 1545933337,
      "groups": 1544118937,
      "networks": 0,
      "roles": 1548957337,
      "settings": 1548957337
    }
  }
}

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

Headers

Authorization: Bearer 4aa458fe4ee4850612ba45957880fbab7772c80603de79a1f016ae6854059c33

cURL

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

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 5f007aca25aa18b8d1f1b8f809a3457df8fa313c6dc498d99ebc79b9631b1371

cURL

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

Response

Simulated Response

Response Fields

Name Description
beacons (array) an array of beacons

Status

200

Headers

ETag: W/"2611cfe46d30e36f438e27162baf23bc"
Last-Modified: Thu, 31 Jan 2019 17:55:36 GMT

Body

{
  "beacons": [
    {
      "id": "3951",
      "name": "Wyman LLC",
      "uuid": "848D1DA7-7111-43FD-8442-C7268511455F",
      "comment_on_entry": "In at Wyman LLC",
      "comment_on_exit": "Left Wyman LLC",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957336,
      "updated_at": 1548957336
    },
    {
      "id": "3950",
      "name": "Walter LLC",
      "uuid": "8298DA83-9BC4-4A0C-952F-7B4970A93CCF",
      "comment_on_entry": "In at Walter LLC",
      "comment_on_exit": "Left Walter LLC",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957336,
      "updated_at": 1548957336
    }
  ],
  "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": 1548957336,
      "favorites": 1544464536,
      "fences": 1540832136,
      "groups": 1543168536,
      "networks": 0,
      "roles": 1548957336,
      "settings": 1548957336
    }
  }
}

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

Headers

Authorization: Bearer e44e612357ed12d32725926379025e54e2294dab900c48577baa7d6864bf1e36

Body

beacon[name]=My+Renamed+Office

cURL

curl "https://www.simpleinout.com/api/v4/beacons/3952" -d 'beacon[name]=My+Renamed+Office' -X PATCH \
	-H "Authorization: Bearer e44e612357ed12d32725926379025e54e2294dab900c48577baa7d6864bf1e36"

Response

Simulated Response

Response Fields

Name Description
beacons (object) the newly updated beacon attributes

Status

200

Headers

ETag: W/"3641f53356e7d8a4a1ac072d11ae23fc"

Body

{
  "beacons": {
    "id": "3952",
    "name": "My Renamed Office",
    "uuid": "D5AEFAA7-6400-4E03-B10C-0B990E90A20D",
    "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": 1548957336,
    "updated_at": 1548957336
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1548957336,
      "favorites": 1544550936,
      "fences": 1542045336,
      "groups": 1546451736,
      "networks": 0,
      "roles": 1548957336,
      "settings": 1548957336
    }
  }
}

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 fda6baf1f4a2af05825ceaf21d946541bbfc86ff7b014684504f71a7542f9a0e

cURL

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

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/"64fcb883f60a2600d80007f9f998ccac"
Last-Modified: Thu, 31 Jan 2019 17:55:34 GMT

Body

{
  "companies": {
    "id": "54494",
    "name": "Olson LLC",
    "scheduled_statuses": true,
    "default_role_id": "244853",
    "logo_url": null,
    "created_at": 1548957334
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1541354134,
      "favorites": 1542218134,
      "fences": 1547056534,
      "groups": 1545069334,
      "networks": 0,
      "roles": 1548957334,
      "settings": 1548957334
    }
  }
}

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

Headers

Authorization: Bearer 33d6eccf318797bf2d125e25dc4b60efe4e33d60d39f546b7e4ee605d6c5ebaf

cURL

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

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 b920294f7f51a1eb48bbb8a5be86fd96f8470c2251d4a75ce4bf6f49cee2ae2b

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"52d0b0fbfd8325f593996d425d8d52cd"
Last-Modified: Thu, 31 Jan 2019 17:55:35 GMT

Body

{
  "futures": [
    {
      "id": "3000",
      "status": "out",
      "comment": "On Vacation, back Monday",
      "apply_at": 1551373200,
      "user_id": "101036",
      "changed_by_user_id": null
    },
    {
      "id": "3001",
      "status": "out",
      "comment": "At the conference this week",
      "apply_at": 1564588800,
      "user_id": "101036",
      "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": 1541786135,
      "favorites": 1542218135,
      "fences": 1543341335,
      "groups": 1543600535,
      "networks": 0,
      "roles": 1548957335,
      "settings": 1548957335
    }
  }
}

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 5db3864a3c168d3141255e26bbdecd766487721c701f1650d4a08b46d54acd1c

Body

fence[name]=My+Office&fence[latitude]=46.877931&fence[longitude]=-96.787459&fence[radius]=150

cURL

curl "https://www.simpleinout.com/api/v4/fences" -d 'fence[name]=My+Office&fence[latitude]=46.877931&fence[longitude]=-96.787459&fence[radius]=150' -X POST \
	-H "Authorization: Bearer 5db3864a3c168d3141255e26bbdecd766487721c701f1650d4a08b46d54acd1c"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly created fence attributes

Status

201

Headers

ETag: W/"c80bc6853963eb0ac08d650e2106113d"

Body

{
  "fences": {
    "id": "2898",
    "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": 1548957336,
    "updated_at": 1548957336
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1541091336,
      "favorites": 1544810136,
      "fences": 1548957336,
      "groups": 1542995736,
      "networks": 0,
      "roles": 1548957336,
      "settings": 1548957336
    }
  }
}

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

Headers

Authorization: Bearer 14cfa51bb910653339067ce15651a2c53b9633aab5d58157a8d4a1c44d94275e

cURL

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

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 b7385ce4362560b4b8f5ccda82b6669ed9d0dd1bf9d8fe20e7b4b520318042ac

cURL

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

Response

Simulated Response

Response Fields

Name Description
fences (array) an array of fences

Status

200

Headers

ETag: W/"6ed714b8f7028679781d97a445c71fc1"
Last-Modified: Thu, 31 Jan 2019 17:55:36 GMT

Body

{
  "fences": [
    {
      "id": "2897",
      "name": "rr5oquzcga91ayjm8di4",
      "latitude": "-52.3799633778",
      "longitude": "-134.5823700372",
      "radius": 3422,
      "comment_on_entry": "In at rr5oquzcga91ayjm8di4",
      "comment_on_exit": "Left rr5oquzcga91ayjm8di4",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957336,
      "updated_at": 1548957336
    },
    {
      "id": "2896",
      "name": "sawbawt9wapnphc51qt2",
      "latitude": "69.9513289841",
      "longitude": "120.1427233219",
      "radius": 9727,
      "comment_on_entry": "In at sawbawt9wapnphc51qt2",
      "comment_on_exit": "Left sawbawt9wapnphc51qt2",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957336,
      "updated_at": 1548957336
    }
  ],
  "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": 1544723736,
      "favorites": 1547661336,
      "fences": 1548957336,
      "groups": 1547056536,
      "networks": 0,
      "roles": 1548957336,
      "settings": 1548957336
    }
  }
}

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

Headers

Authorization: Bearer 014e0a3875e9292043c731b33d0611c49a3f3a393a652fc3131fc116739c7583

Body

fence[name]=My+Renamed+Geofence

cURL

curl "https://www.simpleinout.com/api/v4/fences/2899" -d 'fence[name]=My+Renamed+Geofence' -X PATCH \
	-H "Authorization: Bearer 014e0a3875e9292043c731b33d0611c49a3f3a393a652fc3131fc116739c7583"

Response

Simulated Response

Response Fields

Name Description
fences (object) the newly updated fence attributes

Status

200

Headers

ETag: W/"2ac39b0b1f19112a0e168c353d5e3af1"

Body

{
  "fences": {
    "id": "2899",
    "name": "My Renamed Geofence",
    "latitude": "-78.1032202871",
    "longitude": "-143.8550029642",
    "radius": 5499,
    "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": 1548957336,
    "updated_at": 1548957336
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1542909336,
      "favorites": 1544378136,
      "fences": 1548957336,
      "groups": 1540572936,
      "networks": 0,
      "roles": 1548957336,
      "settings": 1548957336
    }
  }
}

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 0acd55e3896e9165f36b6119ce2f15e30e2b38c09d205229494fdde40727bdbf

Body

group[name]=New+Department

cURL

curl "https://www.simpleinout.com/api/v4/groups" -d 'group[name]=New+Department' -X POST \
	-H "Authorization: Bearer 0acd55e3896e9165f36b6119ce2f15e30e2b38c09d205229494fdde40727bdbf"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly created group attributes

Status

201

Headers

ETag: W/"6aa1c84ada7b176a680caeb3be1fb2bc"

Body

{
  "groups": {
    "id": "3808",
    "name": "New Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1542822932,
      "favorites": 1547056532,
      "fences": 1542995732,
      "groups": 1548957332,
      "networks": 0,
      "roles": 1548957332,
      "settings": 1548957332
    }
  }
}

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

Headers

Authorization: Bearer 73fab5ed422aa4cb0a3eae255bf099f36d310db9746eab1a3eb075925130fb58

cURL

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

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 724c67a821bc2a234cbbb88522a8b9441d7108316b3c8a083f9e7ec8cf5638e7

cURL

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

Response

Simulated Response

Response Fields

Name Description
groups (array) an array of groups

Status

200

Headers

ETag: W/"14c0e66fc6d25603583b1a8b8a85d521"
Last-Modified: Thu, 31 Jan 2019 17:55:32 GMT

Body

{
  "groups": [
    {
      "id": "3807",
      "name": "Halvorson-Hartmann"
    },
    {
      "id": "3806",
      "name": "Legros-Paucek"
    }
  ],
  "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": 1540745732,
      "favorites": 1540572932,
      "fences": 1544032532,
      "groups": 1548957332,
      "networks": 0,
      "roles": 1548957332,
      "settings": 1548957332
    }
  }
}

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

Headers

Authorization: Bearer fad7b86495dd36c0a585a29b975e9066597e3d01fdc0a5f164edbd25579219ce

Body

group[name]=Renamed+Department

cURL

curl "https://www.simpleinout.com/api/v4/groups/3805" -d 'group[name]=Renamed+Department' -X PATCH \
	-H "Authorization: Bearer fad7b86495dd36c0a585a29b975e9066597e3d01fdc0a5f164edbd25579219ce"

Response

Simulated Response

Response Fields

Name Description
groups (object) the newly updated group attributes

Status

200

Headers

ETag: W/"135112f290f11df2f0cda2ad6888b203"

Body

{
  "groups": {
    "id": "3805",
    "name": "Renamed Department"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1546019732,
      "favorites": 1547229332,
      "fences": 1544550932,
      "groups": 1548957332,
      "networks": 0,
      "roles": 1548957332,
      "settings": 1548957332
    }
  }
}

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 c8ce2214ea9334f73acdb7e362fb77cd5fbe13f420dcf386dcb244a7071d4bfa

Body

network[name]=My+Office&network[ssid]=Office+WiFi+Hotspot

cURL

curl "https://www.simpleinout.com/api/v4/networks" -d 'network[name]=My+Office&network[ssid]=Office+WiFi+Hotspot' -X POST \
	-H "Authorization: Bearer c8ce2214ea9334f73acdb7e362fb77cd5fbe13f420dcf386dcb244a7071d4bfa"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly created network attributes

Status

201

Headers

ETag: W/"11955ced8d0a659b90a3899ad9ad9d06"

Body

{
  "networks": {
    "id": "1413",
    "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": 1548957335,
    "updated_at": 1548957335
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1545328535,
      "favorites": 1542218135,
      "fences": 1544810135,
      "groups": 1541091335,
      "networks": 1548957335,
      "roles": 1548957335,
      "settings": 1548957335
    }
  }
}

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

Headers

Authorization: Bearer 26bde44f0ff03c08dc98b6746613be76a3b88df79f30f891d3e68edb0fd63aa3

cURL

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

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 4caffb474592311458596300b0931d86edd927c3a18871d50ec0339e5d863b2e

cURL

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

Response

Simulated Response

Response Fields

Name Description
networks (array) an array of networks

Status

200

Headers

ETag: W/"bbb8ca806d7d8dffeaf45796ad9fd74f"
Last-Modified: Thu, 31 Jan 2019 17:55:34 GMT

Body

{
  "networks": [
    {
      "id": "1409",
      "name": "Kshlerin, Prosacco and Lowe",
      "ssid": "a4fpry4ioqtt24nckiyefzo727ig5yd7",
      "comment_on_entry": "In at Kshlerin, Prosacco and Lowe",
      "comment_on_exit": "Left Kshlerin, Prosacco and Lowe",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957334,
      "updated_at": 1548957334
    },
    {
      "id": "1410",
      "name": "Marks Group",
      "ssid": "yjzj5giriypwdryhdpbz5b5wg5563tlm",
      "comment_on_entry": "In at Marks Group",
      "comment_on_exit": "Left Marks Group",
      "entry": true,
      "exit": true,
      "status_on_entry": "in",
      "status_on_exit": "out",
      "created_at": 1548957334,
      "updated_at": 1548957334
    }
  ],
  "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": 1547920534,
      "favorites": 1543773334,
      "fences": 1544723734,
      "groups": 1542909334,
      "networks": 1548957334,
      "roles": 1548957334,
      "settings": 1548957334
    }
  }
}

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

Headers

Authorization: Bearer 54b9317feeac41fbd59446a1aea2c1e0190de179ac790b7eaef8cb61669d1fa0

Body

network[name]=My+Renamed+Office

cURL

curl "https://www.simpleinout.com/api/v4/networks/1411" -d 'network[name]=My+Renamed+Office' -X PATCH \
	-H "Authorization: Bearer 54b9317feeac41fbd59446a1aea2c1e0190de179ac790b7eaef8cb61669d1fa0"

Response

Simulated Response

Response Fields

Name Description
networks (object) the newly updated network attributes

Status

200

Headers

ETag: W/"01df8562cf6ec1f9b4d86d159fcf50de"

Body

{
  "networks": {
    "id": "1411",
    "name": "My Renamed Office",
    "ssid": "lnp6yana23wdf8lmyf3e92g521kkfweh",
    "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": 1548957335,
    "updated_at": 1548957335
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1547488535,
      "favorites": 1548611735,
      "fences": 1544810135,
      "groups": 1544810135,
      "networks": 1548957335,
      "roles": 1548957335,
      "settings": 1548957335
    }
  }
}

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 842d09870d93e0858deeac5a7b1b87f80cc38e3bb5d8a8b1fd5971a5887b1d56

cURL

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

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 bda8c3abdf20b8e8e4da13db32305339f9a15dd01cbd09e7655e7d59300bfad0

Body

role[name]=Billing+Role&role[billing]=true&role[followed_users]=false&role[reminders]=false&role[safeties]=false&role[user_board]=false&role[manage_groups_and_memberships]=false&role[manage_others_archives]=false&role[manage_others_futures]=false&role[manage_others_status]=false&role[manage_own_archives]=false&role[manage_own_futures]=false&role[manage_own_status]=false&role[view_others_archives]=false&role[view_others_futures]=false&role[view_others_reports]=false&role[view_user_board_updated_at]=false

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly created role attributes

Status

201

Headers

ETag: W/"22897a66b6d8f5d20780e5ddc0a02ffa"

Body

{
  "roles": {
    "id": "244801",
    "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": 1548957333,
    "updated_at": 1548957333
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1548093333,
      "favorites": 1540572933,
      "fences": 1543946133,
      "groups": 1541526933,
      "networks": 0,
      "roles": 1548957333,
      "settings": 1548957333
    }
  }
}

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

Headers

Authorization: Bearer d8f7c3a4aceccae65a39170e4c8f7c0d2344e9e45bb4bac9fa6512ad298f37f2

cURL

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

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 388c8aa3ffbf57e8d38433a844892830612f13a88f027acad2a3c5c10176f097

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (array) an array of roles

Status

200

Headers

ETag: W/"7d82bb0852bb85c5f7b551e5033b4138"
Last-Modified: Thu, 31 Jan 2019 17:55:33 GMT

Body

{
  "roles": [
    {
      "id": "244802",
      "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": 1548957333,
      "updated_at": 1548957333
    },
    {
      "id": "244803",
      "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": 1548957333,
      "updated_at": 1548957333
    },
    {
      "id": "244804",
      "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": 1548957333,
      "updated_at": 1548957333
    },
    {
      "id": "244805",
      "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": 1548957333,
      "updated_at": 1548957333
    }
  ],
  "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": 1541613333,
      "favorites": 1547056533,
      "fences": 1544118933,
      "groups": 1541526933,
      "networks": 0,
      "roles": 1548957333,
      "settings": 1548957333
    }
  }
}

Retrieve a role

Retrieve an existing role.

Endpoint

GET /api/v4/roles/:id

Request

Route

GET /api/v4/roles/244810

Headers

Authorization: Bearer 1e2102b50e9879c688edce9447edd594527e3c92dc74e76b8f944b6ae1118200

cURL

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

Response

Simulated Response

Response Fields

Name Description
roles (object) the role attributes

Status

200

Headers

ETag: W/"f4578fb793deaf2c9de04dcc9b024788"
Last-Modified: Thu, 31 Jan 2019 17:55:33 GMT

Body

{
  "roles": {
    "id": "244810",
    "name": "Jacobs, McDermott and Hessel",
    "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": 1548957333,
    "updated_at": 1548957333
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1543082133,
      "favorites": 1544982933,
      "fences": 1547229333,
      "groups": 1541354133,
      "networks": 0,
      "roles": 1548957333,
      "settings": 1548957333
    },
    "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/244796

Headers

Authorization: Bearer 4464e23db600d09a55a69179d6c8682c6a2e078a092594a171c7eb111e665cb1

Body

role[name]=My+Renamed+Role&role[billing]=false&role[view_others_archives]=true&role[view_others_futures]=true

cURL

curl "https://www.simpleinout.com/api/v4/roles/244796" -d 'role[name]=My+Renamed+Role&role[billing]=false&role[view_others_archives]=true&role[view_others_futures]=true' -X PATCH \
	-H "Authorization: Bearer 4464e23db600d09a55a69179d6c8682c6a2e078a092594a171c7eb111e665cb1"

Response

Simulated Response

Response Fields

Name Description
roles (object) the newly updated role attributes

Status

200

Headers

ETag: W/"4074a1872be680aab52fa27f313b7e67"

Body

{
  "roles": {
    "id": "244796",
    "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": 1548957333,
    "updated_at": 1548957333
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1546192533,
      "favorites": 1548179733,
      "fences": 1544291733,
      "groups": 1541526933,
      "networks": 0,
      "roles": 1548957333,
      "settings": 1548957333
    }
  }
}

Statuses

List statuses

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

Endpoint

GET /api/v4/statuses

Parameters

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

Request

Route

GET /api/v4/statuses?created_at=1548309600..1548568799

Headers

Authorization: Bearer 876e4c241d8fd3f1f4402ae655597d8cd7f3b3cd371895dfbaa45892a6d0f0f3

Query Parameters

created_at=1548309600..1548568799

cURL

curl -g "https://www.simpleinout.com/api/v4/statuses?created_at=1548309600..1548568799" -X GET \
	-H "Authorization: Bearer 876e4c241d8fd3f1f4402ae655597d8cd7f3b3cd371895dfbaa45892a6d0f0f3"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"cc110bb89d92659b49e218ad8dc9cb3b"
Last-Modified: Fri, 25 Jan 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548316800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548331200
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548334800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548352800
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548403200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101042",
      "changed_by_user_id": null,
      "created_at": 1548424800
    },
    {
      "status": "out",
      "comment": "On Vacation",
      "user_id": "101042",
      "changed_by_user_id": "101043",
      "created_at": 1548428400
    }
  ],
  "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=1548309600..1548568799",
      "last_href": "http://example.org/api/v4/statuses?created_at=1548309600..1548568799",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1545242135,
      "favorites": 1543946135,
      "fences": 1544378135,
      "groups": 1543859735,
      "networks": 0,
      "roles": 1548957335,
      "settings": 1548957335
    }
  }
}

Users

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

Headers

Authorization: Bearer 0eeda3af3a76de3d6c0ce2b5730ee811b08009b1f88fa8f6f6cd446307cd2794

Body

future[status]=out&future[apply_at]=1554048000&future[comment]=On+Vacation

cURL

curl "https://www.simpleinout.com/api/v4/users/101094/futures" -d 'future[status]=out&future[apply_at]=1554048000&future[comment]=On+Vacation' -X POST \
	-H "Authorization: Bearer 0eeda3af3a76de3d6c0ce2b5730ee811b08009b1f88fa8f6f6cd446307cd2794"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"b05edc958db580e4ddc26cc58929a68d"

Body

{
  "futures": {
    "id": "3008",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1554048000,
    "user_id": "101094",
    "changed_by_user_id": "101093"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1542563739,
      "favorites": 1543600539,
      "fences": 1545501339,
      "groups": 1544464539,
      "networks": 0,
      "roles": 1548957339,
      "settings": 1548957339
    }
  }
}

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 33f9783c9e50537fb207eb850dfba81fcccd05e2b8abd82d9083d336cac78a69

Body

future[status]=out&future[apply_at]=1554048000&future[comment]=On+Vacation

cURL

curl "https://www.simpleinout.com/api/v4/users/my/futures" -d 'future[status]=out&future[apply_at]=1554048000&future[comment]=On+Vacation' -X POST \
	-H "Authorization: Bearer 33f9783c9e50537fb207eb850dfba81fcccd05e2b8abd82d9083d336cac78a69"

Response

Simulated Response

Response Fields

Name Description
futures (object) the newly created future object

Status

201

Headers

ETag: W/"a8672836231c79d06d0156ba5db50750"

Body

{
  "futures": {
    "id": "3003",
    "status": "out",
    "comment": "On Vacation",
    "apply_at": 1554048000,
    "user_id": "101056",
    "changed_by_user_id": null
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1544118937,
      "favorites": 1546883737,
      "fences": 1548006937,
      "groups": 1547920537,
      "networks": 0,
      "roles": 1548957337,
      "settings": 1548957337
    }
  }
}

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

Headers

Authorization: Bearer 85be26c5fb1a1ffedbd4dfb04dfbf177d653ddf4fce64c7eb1ff232fba424808

Body

status[status]=in&status[comment]=In+at+HQ

cURL

curl "https://www.simpleinout.com/api/v4/users/101079/statuses" -d 'status[status]=in&status[comment]=In+at+HQ' -X POST \
	-H "Authorization: Bearer 85be26c5fb1a1ffedbd4dfb04dfbf177d653ddf4fce64c7eb1ff232fba424808"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"90ba0bb24e366189b8513ac46c51bdf2"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "user_id": "101079",
    "changed_by_user_id": "101078",
    "created_at": 1548957339
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1546538138,
      "favorites": 1544637338,
      "fences": 1542650138,
      "groups": 1545846938,
      "networks": 0,
      "roles": 1548957339,
      "settings": 1548957339
    }
  }
}

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 ce76476b656834f3b4a89c563bc47dc705ab1a04687918b26c5fb5c9ec974570

Body

status[status]=in&status[comment]=In+at+HQ

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses" -d 'status[status]=in&status[comment]=In+at+HQ' -X POST \
	-H "Authorization: Bearer ce76476b656834f3b4a89c563bc47dc705ab1a04687918b26c5fb5c9ec974570"

Response

Simulated Response

Response Fields

Name Description
statuses (object) the newly created status object

Status

201

Headers

ETag: W/"667959ed088525cf3db6e41aae853046"

Body

{
  "statuses": {
    "status": "in",
    "comment": "In at HQ",
    "user_id": "101095",
    "changed_by_user_id": null,
    "created_at": 1548957340
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1548870940,
      "favorites": 1542218140,
      "fences": 1541177740,
      "groups": 1540486540,
      "networks": 0,
      "roles": 1548957340,
      "settings": 1548957340
    }
  }
}

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 de, en-au, en-ca, en-gb, en, es, fr-ca, fr, ja, lv, nb, nl, ru, sq, sv
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 f1d34079e079706977c7a056f8e56f6d8b1a96b4c1e13e4d13bce8467d3e5df8

Body

user[email]=bojack%40horsinaround.com&user[name]=Bojack+Horseman&user[details]=Lead+Actor&user[lang]=en&user[phones_attributes][][number]=%28780%29+031-7611+x1360&user[memberships_attributes][][group_id]=3810&user[role_id]=244935

cURL

curl "https://www.simpleinout.com/api/v4/users" -d 'user[email]=bojack%40horsinaround.com&user[name]=Bojack+Horseman&user[details]=Lead+Actor&user[lang]=en&user[phones_attributes][][number]=%28780%29+031-7611+x1360&user[memberships_attributes][][group_id]=3810&user[role_id]=244935' -X POST \
	-H "Authorization: Bearer f1d34079e079706977c7a056f8e56f6d8b1a96b4c1e13e4d13bce8467d3e5df8"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly created user object

Status

201

Headers

ETag: W/"9361cd75716ce80c2ed9964eb8de73e9"

Body

{
  "users": {
    "id": "101060",
    "name": "Bojack Horseman",
    "email": "bojack@horsinaround.com",
    "image_url": "https://gravatar.com/avatar/a05868c1d1022f804699801238e5eb07.png?s=270\u0026d=blank",
    "details": "Lead Actor",
    "lang": "en",
    "role_id": "244935",
    "created_at": 1548957337,
    "updated_at": 1548957337,
    "cached_at": "1548957337.820640000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1542390937,
      "favorites": 1542563737,
      "fences": 1541526937,
      "groups": 1548957337,
      "networks": 0,
      "roles": 1548957337,
      "settings": 1548957337
    }
  }
}

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

Headers

Authorization: Bearer 25e8bdd6e5af11e3c0c3bcd4fc2224c38b2fe673715bd1dad8af2a663950a01c

cURL

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

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 1dfe9ba5ba67b3458eb1123ec51d07dfc636c171bd2da5d8cd64a2c0f78c462a

Body

status[status]=in&status[comment]=At+Lunch

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/favorite" -d 'status[status]=in&status[comment]=At+Lunch' -X PATCH \
	-H "Authorization: Bearer 1dfe9ba5ba67b3458eb1123ec51d07dfc636c171bd2da5d8cd64a2c0f78c462a"

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 d92c5137cc3a33034ff46ed818f6bf08ff6a6f4abb0c0ec6d351babe4710b6a3

Body

status[status]=in&status[comment]=At+Lunch

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/hide" -d 'status[status]=in&status[comment]=At+Lunch' -X PATCH \
	-H "Authorization: Bearer d92c5137cc3a33034ff46ed818f6bf08ff6a6f4abb0c0ec6d351babe4710b6a3"

Response

Simulated Response

Status

204

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

Headers

Authorization: Bearer 0d34529c8ea26a147ede71be511f6e686eecf241910cb80d60095accbc9523cf

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"08875ede4bef5a95a3319e29e5c3dcc5"
Last-Modified: Thu, 31 Jan 2019 17:55:39 GMT

Body

{
  "futures": [
    {
      "id": "3006",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1549526400,
      "user_id": "101088",
      "changed_by_user_id": null
    },
    {
      "id": "3007",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1554980400,
      "user_id": "101088",
      "changed_by_user_id": "101089"
    }
  ],
  "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/101088/futures?user_id=101088",
      "last_href": "http://example.org/api/v4/users/101088/futures?user_id=101088",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1540572939,
      "favorites": 1540400139,
      "fences": 1546710939,
      "groups": 1542563739,
      "networks": 0,
      "roles": 1548957339,
      "settings": 1548957339
    }
  }
}

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 964e91901afd3c82292e2f24cc881f829d85fb89e12b7ffaa0d5b2fa7f5502f0

cURL

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

Response

Simulated Response

Response Fields

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

Status

200

Headers

ETag: W/"f46ad5d4a58d0dac913ba8998502b183"
Last-Modified: Thu, 31 Jan 2019 17:55:38 GMT

Body

{
  "futures": [
    {
      "id": "3004",
      "status": "out",
      "comment": "Offsite Meeting",
      "apply_at": 1549526400,
      "user_id": "101067",
      "changed_by_user_id": null
    },
    {
      "id": "3005",
      "status": "out",
      "comment": "Gone Fishing",
      "apply_at": 1554980400,
      "user_id": "101067",
      "changed_by_user_id": "101068"
    }
  ],
  "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=101067",
      "last_href": "http://example.org/api/v4/users/my/futures?user_id=101067",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1543514138,
      "favorites": 1542304538,
      "fences": 1547056538,
      "groups": 1545760538,
      "networks": 0,
      "roles": 1548957338,
      "settings": 1548957338
    }
  }
}

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/101069/statuses?created_at=1548309600..1548568799

Headers

Authorization: Bearer 235c258e3ed98ee09cb39f072b650618034a80c0e386698db453c3be64212364

Query Parameters

created_at=1548309600..1548568799

cURL

curl -g "https://www.simpleinout.com/api/v4/users/101069/statuses?created_at=1548309600..1548568799" -X GET \
	-H "Authorization: Bearer 235c258e3ed98ee09cb39f072b650618034a80c0e386698db453c3be64212364"

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"edf5d989737b388f689e9c285c4b3742"
Last-Modified: Fri, 25 Jan 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548316800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548331200
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548334800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548352800
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548403200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101069",
      "changed_by_user_id": null,
      "created_at": 1548424800
    },
    {
      "status": "out",
      "comment": "Vacation",
      "user_id": "101069",
      "changed_by_user_id": "101070",
      "created_at": 1548428400
    }
  ],
  "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/101069/statuses?created_at=1548309600..1548568799\u0026user_id=101069",
      "last_href": "http://example.org/api/v4/users/101069/statuses?created_at=1548309600..1548568799\u0026user_id=101069",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1545328538,
      "favorites": 1540400138,
      "fences": 1545846938,
      "groups": 1543859738,
      "networks": 0,
      "roles": 1548957338,
      "settings": 1548957338
    }
  }
}

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=1548309600..1548568799

Headers

Authorization: Bearer df8e6b05a9fbc1717d9b38db2fe90ac6cb20f2f8b723a7418a65ee00624ce1aa

Query Parameters

created_at=1548309600..1548568799

cURL

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

Response

Simulated Response

Response Fields

Name Description
statuses (array) an array of matching statuses

Status

200

Headers

ETag: W/"5b7119c8bbb88e59e308fefc0bee717c"
Last-Modified: Fri, 25 Jan 2019 15:00:00 GMT

Body

{
  "statuses": [
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548316800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548331200
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548334800
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548352800
    },
    {
      "status": "in",
      "comment": "At Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548403200
    },
    {
      "status": "out",
      "comment": "Left Work",
      "user_id": "101062",
      "changed_by_user_id": null,
      "created_at": 1548424800
    },
    {
      "status": "out",
      "comment": "Vacation",
      "user_id": "101062",
      "changed_by_user_id": "101063",
      "created_at": 1548428400
    }
  ],
  "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=1548309600..1548568799\u0026user_id=101062",
      "last_href": "http://example.org/api/v4/users/my/statuses?created_at=1548309600..1548568799\u0026user_id=101062",
      "previous_href": null,
      "next_href": null
    },
    "last_updated_at": {
      "beacons": 1540486537,
      "favorites": 1548784537,
      "fences": 1547834137,
      "groups": 1544550937,
      "networks": 0,
      "roles": 1548957337,
      "settings": 1548957337
    }
  }
}

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 3b501a993a5a2272c8ae3accfdd13fe7742e6c397c99bdd7b92b0faf23a1816b

cURL

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

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/"f5a58aa7eaa35224ce06bbacddc094b1"
Last-Modified: Thu, 31 Jan 2019 17:55:39 GMT

Body

{
  "users": [
    {
      "id": "101087",
      "name": "Maritza Hermann",
      "email": "macey@lindgren.net",
      "image_url": "https://gravatar.com/avatar/8f0adc7af02f24b2f19ed2f35da491c3.png?s=270\u0026d=blank",
      "details": "Eveniet cum illum nobis assumenda magnam.",
      "lang": "en",
      "role_id": "244985",
      "created_at": 1548957339,
      "updated_at": 1548957339,
      "cached_at": "1548957339.458427000"
    },
    {
      "id": "101086",
      "name": "Gordon Watsica Jr.",
      "email": "mozell_hilll@pollich.name",
      "image_url": "https://gravatar.com/avatar/44b2541d728ef49a9d9d235f0524fe2a.png?s=270\u0026d=blank",
      "details": "Deleniti similique ut minima ad.",
      "lang": "en",
      "role_id": "244985",
      "created_at": 1548957339,
      "updated_at": 1548957339,
      "cached_at": "1548957339.441317800"
    },
    {
      "id": "101085",
      "name": "Rickie Douglas DDS",
      "email": "jacky_kaulke@greenfelder.name",
      "image_url": "https://gravatar.com/avatar/ad51e5dac11cc0abc1d2bd73fde0fc5b.png?s=270\u0026d=blank",
      "details": "Ipsa vitae saepe libero sed occaecati sint.",
      "lang": "en",
      "role_id": "244985",
      "created_at": 1548957339,
      "updated_at": 1548957339,
      "cached_at": "1548957339.420108000"
    },
    {
      "id": "101084",
      "name": "Madalyn Ruecker",
      "email": "devyn_hartmann@toy.biz",
      "image_url": "https://gravatar.com/avatar/0a2451e54c3d9a8e94ed3c306caae3fa.png?s=270\u0026d=blank",
      "details": "Voluptatum est numquam soluta.",
      "lang": "en",
      "role_id": "244983",
      "created_at": 1548957339,
      "updated_at": 1548957339,
      "cached_at": "1548957339.404651000"
    }
  ],
  "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": 1542304539,
      "favorites": 1544723739,
      "fences": 1540659339,
      "groups": 1542822939,
      "networks": 0,
      "roles": 1548957339,
      "settings": 1548957339
    },
    "trusted_cached_at": "1548957324.480972000"
  }
}

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

Headers

Authorization: Bearer a31ed383e4c940bcef02219900c1e43451e323a2e343adda80f740d734750c8c

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"370eeae65195686e8b98e692b337fbe0"
Last-Modified: Thu, 31 Jan 2019 17:55:37 GMT

Body

{
  "users": {
    "id": "101055",
    "name": "Bruce Graham",
    "email": "noemy_schimmel@keleroconnell.biz",
    "image_url": "https://gravatar.com/avatar/75d3917417e3fa06ef6c64cfda09ab87.png?s=270\u0026d=blank",
    "details": "Molestiae doloremque ex.",
    "lang": "en",
    "role_id": "244925",
    "created_at": 1548957337,
    "updated_at": 1548957337,
    "cached_at": "1548957337.198734000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1546278937,
      "favorites": 1541440537,
      "fences": 1547056537,
      "groups": 1544810137,
      "networks": 0,
      "roles": 1548957337,
      "settings": 1548957337
    }
  }
}

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 beb77839a972e6d562f0117013a229b4f1a6cf008b9a503a0083e7d0173f5b46

cURL

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

Response

Simulated Response

Response Fields

Name Description
users (object) a user object

Status

200

Headers

ETag: W/"71525a8328d9ab7cd42be5845a35d432"
Last-Modified: Thu, 31 Jan 2019 17:55:38 GMT

Body

{
  "users": {
    "id": "101065",
    "name": "Elmore Cremin",
    "email": "malika@langworthwaelchi.com",
    "image_url": "https://gravatar.com/avatar/fb98a4c64810b7905af8af5e9664e0bb.png?s=270\u0026d=blank",
    "details": "Voluptas labore incidunt culpa minima voluptatem.",
    "lang": "en",
    "role_id": "244945",
    "created_at": 1548957338,
    "updated_at": 1548957338,
    "cached_at": "1548957338.140543000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1548266138,
      "favorites": 1548006938,
      "fences": 1546365338,
      "groups": 1542909338,
      "networks": 0,
      "roles": 1548957338,
      "settings": 1548957338
    }
  }
}

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 6f7371952d03e552bf36a86f2964d479dfc09f79196b41d34e704c0f453cf25e

Body

status[status]=in&status[comment]=At+Lunch

cURL

curl "https://www.simpleinout.com/api/v4/users/my/statuses/unfavorite" -d 'status[status]=in&status[comment]=At+Lunch' -X PATCH \
	-H "Authorization: Bearer 6f7371952d03e552bf36a86f2964d479dfc09f79196b41d34e704c0f453cf25e"

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 de, en-au, en-ca, en-gb, en, es, fr-ca, fr, ja, lv, nb, nl, ru, sq, sv
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/101097

Headers

Authorization: Bearer 9265293c2a03e1ad855027f1a3c41ec5991d9a1ae1871f9d95a015c580dc7ebc

Body

user[phones_attributes][][number]=%28209%29+064-8412+x709&user[memberships_attributes][][group_id]=3815

cURL

curl "https://www.simpleinout.com/api/v4/users/101097" -d 'user[phones_attributes][][number]=%28209%29+064-8412+x709&user[memberships_attributes][][group_id]=3815' -X PATCH \
	-H "Authorization: Bearer 9265293c2a03e1ad855027f1a3c41ec5991d9a1ae1871f9d95a015c580dc7ebc"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"6610a67515b5f6bb9342ef56088db59f"

Body

{
  "users": {
    "id": "101097",
    "name": "Ms. Caterina Labadie",
    "email": "eldora_gusikowski@faydare.name",
    "image_url": "https://gravatar.com/avatar/306561869fc8cf5c4ef654d6b161750d.png?s=270\u0026d=blank",
    "details": "Aspernatur magni rerum aperiam.",
    "lang": "en",
    "role_id": "245009",
    "created_at": 1548957340,
    "updated_at": 1548957340,
    "cached_at": "1548957340.260014000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1547229340,
      "favorites": 1542736540,
      "fences": 1547488540,
      "groups": 1548957340,
      "networks": 0,
      "roles": 1548957340,
      "settings": 1548957340
    }
  }
}

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 de, en-au, en-ca, en-gb, en, es, fr-ca, fr, ja, lv, nb, nl, ru, sq, sv
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 51d11543663628f8843b4b660c4913f53c6c0546cc9bb308093851ed422c1373

Body

user[phones_attributes][][number]=%28909%29+685-6373+x48661&user[memberships_attributes][][group_id]=3811

cURL

curl "https://www.simpleinout.com/api/v4/users/my" -d 'user[phones_attributes][][number]=%28909%29+685-6373+x48661&user[memberships_attributes][][group_id]=3811' -X PATCH \
	-H "Authorization: Bearer 51d11543663628f8843b4b660c4913f53c6c0546cc9bb308093851ed422c1373"

Response

Simulated Response

Response Fields

Name Description
users (object) the newly updated user attributes

Status

200

Headers

ETag: W/"ad40d1a865ffe26b4bfaddea930a167d"

Body

{
  "users": {
    "id": "101071",
    "name": "Mariane Smith",
    "email": "francesco.miller@watsicakshlerin.co",
    "image_url": "https://gravatar.com/avatar/659dd7a5eb3bd8bf16bb41a66d106d1f.png?s=270\u0026d=blank",
    "details": "Rem sit voluptas ad quibusdam similique.",
    "lang": "en",
    "role_id": "244955",
    "created_at": 1548957338,
    "updated_at": 1548957338,
    "cached_at": "1548957338.626015000"
  },
  "meta": {
    "last_updated_at": {
      "beacons": 1545760538,
      "favorites": 1541699738,
      "fences": 1543773338,
      "groups": 1548957338,
      "networks": 0,
      "roles": 1548957338,
      "settings": 1548957338
    }
  }
}