Skip to content

Commit

Permalink
GITBOOK-426: Improve access_code.changed
Browse files Browse the repository at this point in the history
  • Loading branch information
DebbieAtSeam authored and gitbook-bot committed Aug 24, 2024
1 parent 1087c98 commit 9502da9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions docs/api-clients/access-codes/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
description: Key Codes to be programmed on a door lock.
description: Key codes to be programmed on a door lock
---

# Access Codes

## Access Codes
### `access_code` Properties

### The Access Code object
The `access_code` object has the following properties:

<table data-header-hidden><thead><tr><th width="225"></th><th width="164.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>access_code_id</code></td><td>String (UUID)</td><td>Unique identifier for the access code.</td></tr><tr><td><code>device_id</code></td><td>String (UUID)</td><td>Unique identifier for the device associated with the access code.</td></tr><tr><td><code>code</code></td><td>String</td><td>Code used for access. Typically, a numeric or alphanumeric string.</td></tr><tr><td><code>name</code></td><td>String</td><td>Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes.</td></tr><tr><td><code>common_code_key</code></td><td>string</td><td>Unique identifier for a group of access codes that share the same code.</td></tr><tr><td><code>appearance</code></td><td>Object</td><td>Name as it appears on the lock provider app or on the device. This is an object with a <code>name</code> property, and <code>first_name</code> and <code>last_name</code> properties if the provider breaks down names into components.</td></tr><tr><td><code>status</code></td><td>String</td><td><p>Current status of the access code within the operational lifecycle. Values are: <code>unset</code>: Indicates a deactivated or unused state, either before activation or after deliberate deactivation.</p><p><br><code>setting</code>: A transitional phase that indicates that the code is being configured or activated.</p><p><br><code>set</code>: Indicates that the code is active and operational.</p><p><br><code>removing</code>: Indicates a transitional period in which the code is being deleted or made inactive.<br><br><code>unknown</code>: Indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting.</p></td></tr><tr><td><code>is_scheduled_on_device</code></td><td>Boolean</td><td>Indicates whether the code is set on the device according to a preconfigured schedule.</td></tr><tr><td><code>is_managed</code></td><td>Boolean</td><td>Indicates whether Seam manages the access code.</td></tr><tr><td><code>type</code></td><td>Enum</td><td><p>Nature of the access code. Values are:</p><p><code>ongoing</code>: Access codes that are active continuously until deactivated manually.</p><p></p><p><code>time_bound</code>: Access codes that have a specific duration.</p></td></tr><tr><td><code>is_backup_access_code_available</code></td><td>Boolean</td><td>Indicates whether a <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a> is available for use if the primary access code is lost or compromised.</td></tr><tr><td><code>is_backup</code></td><td>Boolean</td><td>Indicates whether the access code is a <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a>.</td></tr><tr><td><code>pulled_backup_access_code_id</code></td><td>String (UUID)</td><td>Identifier of the pulled <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a>. Used to associate the pulled backup access code with the original access code.</td></tr><tr><td><code>is_waiting_for_code_assignment</code></td><td>Boolean</td><td>Indicates whether the access code is waiting for a code assignment.</td></tr><tr><td><code>is_external_modification_allowed</code></td><td>Boolean</td><td>Indicates whether changes to the access code from external sources are permitted.</td></tr><tr><td><code>is_one_time_use</code></td><td>Boolean</td><td>Indicates whether the access code can only be used once. If <code>true</code>, the code becomes invalid after the first use.</td></tr><tr><td><code>is_offline_access_code</code></td><td>Boolean</td><td>Indicates whether the access code is intended for use in <a href="../../products/smart-locks/access-codes/offline-access-codes.md">offline</a> scenarios. If <code>true</code>, this code can be created on a device without a network connection.</td></tr><tr><td><code>starts_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time at which the time-bound access code becomes active (only relevant for <code>time_bound</code> codes).</td></tr><tr><td><code>ends_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time after which the time-bound access code becomes inactive (only relevant for <code>time_bound</code> codes).</td></tr><tr><td><code>created_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time at which the access code was created.</td></tr><tr><td><code>errors</code></td><td>See <a href="./#access-code-error-types">Access Code Error Types</a>.</td><td><p>Collection of errors associated with the access code, structured in a dictionary format.</p><p> A unique <code>error_code</code> keys each error. Each error entry is an object containing two fields: <code>message</code> and <code>created_at</code>.</p><p></p><p><code>message</code> is a string that describes the error.</p><p></p><p><code>created_at</code> is a date that indicates when the error was generated.</p><p></p><p>This structure enables detailed tracking and timely response to critical issues.</p></td></tr><tr><td><code>warnings</code></td><td>See <a href="./#access-code-warning-types">Access Code Warning Types</a>.</td><td><p>Collection of warnings associated with the access code, structured in a dictionary format.</p><p>A unique <code>warning_code</code> keys each warning. Each warning entry is an object containing two fields: <code>message</code> and <code>created_at</code>.</p><p></p><p><code>message</code> is a string that describes the warning.</p><p></p><p><code>created_at</code> is a date that indicates when the warning was generated.</p><p></p><p>This structure enables detailed tracking and timely response to potential issues that are not critical but that may require attention.</p></td></tr></tbody></table>
<table><thead><tr><th width="225">Property</th><th width="164.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>access_code_id</code></td><td>String (UUID)</td><td>Unique identifier for the access code.</td></tr><tr><td><code>device_id</code></td><td>String (UUID)</td><td>Unique identifier for the device associated with the access code.</td></tr><tr><td><code>code</code></td><td>String</td><td>Code used for access. Typically, a numeric or alphanumeric string.</td></tr><tr><td><code>name</code></td><td>String</td><td>Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes.</td></tr><tr><td><code>common_code_key</code></td><td>String</td><td>Unique identifier for a group of access codes that share the same code.</td></tr><tr><td><code>appearance</code></td><td>Object</td><td>Name as it appears on the lock provider app or on the device. This is an object with a <code>name</code> property, and <code>first_name</code> and <code>last_name</code> properties if the provider breaks down names into components.</td></tr><tr><td><code>status</code></td><td>String</td><td><p>Current status of the access code within the operational lifecycle. Values are: <code>unset</code>: Indicates a deactivated or unused state, either before activation or after deliberate deactivation.</p><p><br><code>setting</code>: A transitional phase that indicates that the code is being configured or activated.</p><p><br><code>set</code>: Indicates that the code is active and operational.</p><p><br><code>removing</code>: Indicates a transitional period in which the code is being deleted or made inactive.<br><br><code>unknown</code>: Indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting.</p></td></tr><tr><td><code>is_scheduled_on_device</code></td><td>Boolean</td><td>Indicates whether the code is set on the device according to a preconfigured schedule.</td></tr><tr><td><code>is_managed</code></td><td>Boolean</td><td>Indicates whether Seam manages the access code.</td></tr><tr><td><code>type</code></td><td>Enum</td><td><p>Nature of the access code. Values are:</p><p><code>ongoing</code>: Access codes that are active continuously until deactivated manually.</p><p></p><p><code>time_bound</code>: Access codes that have a specific duration.</p></td></tr><tr><td><code>is_backup_access_code_available</code></td><td>Boolean</td><td>Indicates whether a <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a> is available for use if the primary access code is lost or compromised.</td></tr><tr><td><code>is_backup</code></td><td>Boolean</td><td>Indicates whether the access code is a <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a>.</td></tr><tr><td><code>pulled_backup_access_code_id</code></td><td>String (UUID)</td><td>Identifier of the pulled <a href="https://docs.seam.co/latest/core-concepts/access-codes#backup-access-codes">backup access code</a>. Used to associate the pulled backup access code with the original access code.</td></tr><tr><td><code>is_waiting_for_code_assignment</code></td><td>Boolean</td><td>Indicates whether the access code is waiting for a code assignment.</td></tr><tr><td><code>is_external_modification_allowed</code></td><td>Boolean</td><td>Indicates whether changes to the access code from external sources are permitted.</td></tr><tr><td><code>is_one_time_use</code></td><td>Boolean</td><td>Indicates whether the access code can only be used once. If <code>true</code>, the code becomes invalid after the first use.</td></tr><tr><td><code>is_offline_access_code</code></td><td>Boolean</td><td>Indicates whether the access code is intended for use in <a href="../../products/smart-locks/access-codes/offline-access-codes.md">offline</a> scenarios. If <code>true</code>, this code can be created on a device without a network connection.</td></tr><tr><td><code>starts_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time at which the time-bound access code becomes active (only relevant for <code>time_bound</code> codes).</td></tr><tr><td><code>ends_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time after which the time-bound access code becomes inactive (only relevant for <code>time_bound</code> codes).</td></tr><tr><td><code>created_at</code></td><td>Datetime (ISO 8601)</td><td>Date and time at which the access code was created.</td></tr><tr><td><code>errors</code></td><td>See <a href="./#access-code-error-types">Access Code Error Types</a>.</td><td><p>Collection of errors associated with the access code, structured in a dictionary format.</p><p> A unique <code>error_code</code> keys each error. Each error entry is an object containing two fields: <code>message</code> and <code>created_at</code>.</p><p></p><p><code>message</code> is a string that describes the error.</p><p></p><p><code>created_at</code> is a date that indicates when the error was generated.</p><p></p><p>This structure enables detailed tracking and timely response to critical issues.</p></td></tr><tr><td><code>warnings</code></td><td>See <a href="./#access-code-warning-types">Access Code Warning Types</a>.</td><td><p>Collection of warnings associated with the access code, structured in a dictionary format.</p><p>A unique <code>warning_code</code> keys each warning. Each warning entry is an object containing two fields: <code>message</code> and <code>created_at</code>.</p><p></p><p><code>message</code> is a string that describes the warning.</p><p></p><p><code>created_at</code> is a date that indicates when the warning was generated.</p><p></p><p>This structure enables detailed tracking and timely response to potential issues that are not critical but that may require attention.</p></td></tr></tbody></table>



Expand Down Expand Up @@ -110,6 +110,15 @@ Warnings are returned in a list:
| `delay_in_setting_on_device` | There was an unusually long delay in programming the code onto the device. For time bound codes, this is sent when the code enters its active time. Note that this is a temporary warning and might be removed if the code is successfully set. |
| `code_modified_external_to_seam` | When we detect that a code was modified or removed externally after Seam successfully set it on the device, and the `allow_external_modification` flag is set for the code, we will set this warning instead of an error. |

#### List of Methods

<table data-header-hidden><thead><tr><th width="312"></th><th></th></tr></thead><tbody><tr><td><a href="create-an-access-code.md">Create an Access Code</a></td><td>Create an Access Code</td></tr><tr><td><a href="create-many-access-codes.md">Create many Access Codes</a></td><td>Create many Access Codes</td></tr><tr><td><a href="update-an-access-code.md">Update an Access Code</a></td><td>Update an Access Code</td></tr><tr><td><a href="delete-an-access-code.md">Delete an Access Code</a></td><td>Delete an Access Code</td></tr><tr><td><a href="get-an-access-code.md">Retrieve an Access Code</a></td><td>Retrieve an Access Code</td></tr><tr><td><a href="list-access-codes.md">Retrieve a list of Access Codes</a></td><td>Retrieve a list of Access Codes</td></tr></tbody></table>
## `access_code` Methods

* [Create an access code](create-an-access-code.md)
* [Create many access codes](create-many-access-codes.md)
* [List access codes](list-access-codes.md)
* [Get an access code](get-an-access-code.md)
* [Update an access code](update-an-access-code.md)
* [Delete an access code](delete-an-access-code.md)
* [List unmanaged access codes](list-unmanaged-access-codes.md)
* [Convert an unmanaged access code](convert-an-unmanaged-access-code.md)
* [Delete an unmanaged access code](delete-an-unmanaged-access-code.md)
* [Pull a backup access code](pull-backup-access-code.md)
2 changes: 1 addition & 1 deletion docs/api-clients/events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Noise sensors emit an event whenever a predefined noise threshold has been excee
| Event Name | Description |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `access_code.created` | An `access_code` has been created. |
| `access_code.changed` | An `access_code` status or property has changed. |
| `access_code.changed` | An `access_code` [status](../access-codes/#access\_code-properties) has changed. |
| `access_code.scheduled_on_device` | For native scheduled codes (see [Native Scheduling](../../products/smart-locks/access-codes/#native-scheduling)), this event is sent when an `access_code` has been pre-programmed onto a device. An `access_code.set_on_device` is sent when the code is actually active. |
| `access_code.set_on_device` | An `access_code` has been programmed onto a device. |
| `access_code.backup_access_code_pulled` | A backup `access_code` has been pulled. |
Expand Down

0 comments on commit 9502da9

Please sign in to comment.