diff --git a/docs/api-clients/access_codes/README.md b/docs/api-clients/access_codes/README.md deleted file mode 100644 index 182cfc52f..000000000 --- a/docs/api-clients/access_codes/README.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -description: Key codes to be programmed on a door lock ---- - -# Access Codes - -### `access_code` Properties - -The `access_code` object has the following properties: - -
| Property | Type | Description |
|---|---|---|
access_code_id | String (UUID) | Unique identifier for the access code. |
device_id | String (UUID) | Unique identifier for the device associated with the access code. |
code | String | Code used for access. Typically, a numeric or alphanumeric string. |
name | String | Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. |
common_code_key | String | Unique identifier for a group of access codes that share the same code. |
appearance | Object | Name as it appears on the lock provider app or on the device. This is an object with a name property, and first_name and last_name properties if the provider breaks down names into components. |
status | String | Current status of the access code within the operational lifecycle. Values are:
|
is_scheduled_on_device | Boolean | Indicates whether the code is set on the device according to a preconfigured schedule. |
is_managed | Boolean | Indicates whether Seam manages the access code. |
type | Enum | Nature of the access code. Values are:
|
is_backup_access_code_available | Boolean | Indicates whether a backup access code is available for use if the primary access code is lost or compromised. |
is_backup | Boolean | Indicates whether the access code is a backup access code. |
pulled_backup_access_code_id | String (UUID) | Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. |
is_waiting_for_code_assignment | Boolean | Indicates whether the access code is waiting for a code assignment. |
is_external_modification_allowed | Boolean | Indicates whether changes to the access code from external sources are permitted. |
is_one_time_use | Boolean | Indicates whether the access code can only be used once. If true, the code becomes invalid after the first use. |
is_offline_access_code | Boolean | Indicates whether the access code is intended for use in offline scenarios. If true, this code can be created on a device without a network connection. |
starts_at | Datetime (ISO 8601) | Date and time at which the time-bound access code becomes active (only relevant for time_bound codes). |
ends_at | Datetime (ISO 8601) | Date and time after which the time-bound access code becomes inactive (only relevant for time_bound codes). |
created_at | Datetime (ISO 8601) | Date and time at which the access code was created. |
errors | See Access Code Error Types. | Collection of errors associated with the access code, structured in a dictionary format. A unique
This structure enables detailed tracking and timely response to critical issues. |
warnings | See Access Code Warning Types. | Collection of warnings associated with the access code, structured in a dictionary format. A unique
This structure enables detailed tracking and timely response to potential issues that are not critical but that may require attention. |
ID of the device.
String
Optional
String
Optional
String
Optional
Timestamp to indicate the code expiry time.
Must be a timestamp in the future and after starts_at.
String
Optional
Boolean
Optional
Indicated whether to use a backup access code pool provided by Seam.
This enables you to use /access_codes/pull_backup_access_code
| -| `common_code_key` |String
Optional
Key to identify access codes that should have the same code.
Any two access codes with the same common_code_key are guaranteed to have the same code.
Boolean
Optional
Indicates whether native scheduling should be used for time-bound codes when supported by the provider.
Default: true.
Boolean
Optional
Indicates whether external modification of the codes is allowed.
Default: false.
Boolean
Optional
Boolean
Optional
Number
Optional
Preferred code length.
Only applicable if you do not specify a code.
If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length.
| - -*** - -### Response - -This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here. - -#### JSON format - -{% tabs %} -{% tab title="JSON" %} -```json -{ - "action_attempt": { - "status": "pending", - "action_type": "CREATE_ACCESS_CODE", - "action_attempt_id": "c10e3db5-a5a2-47f2-a76f-48379ed9cd22", - "result": null, - "error": null - }, - "access_code": { - "access_code_id": "12525e70-9474-4bb6-a7f6-12bbe4166f36", - "device_id": "1c459b4c-0008-4752-befc-bc18521247d4", - "name": "My code", - "code": "1988", - "common_code_key": null, - "type": "ongoing", - "status": "setting", - "created_at": "2023-05-11T11:16:10.359Z", - "errors": [], - "warnings": [], - "is_managed": true, - "is_external_modification_allowed": false, - "is_offline_access_code": false, - "is_one_time_use": false - }, - "ok": true -} -``` -{% endtab %} -{% endtabs %} diff --git a/docs/api-clients/access_codes/create_multiple.md b/docs/api-clients/access_codes/create_multiple.md deleted file mode 100644 index de715b3e2..000000000 --- a/docs/api-clients/access_codes/create_multiple.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -description: Create access codes across multiple devices that share a common code ---- - -# Create Multiple Linked Access Codes - -{% openapi src="../../.gitbook/assets/openapi (2).json" path="/access_codes/create_multiple" method="post" %} -[openapi (2).json](<../../.gitbook/assets/openapi (2).json>) -{% endopenapi %} - -### Code Example - -{% tabs %} -{% tab title="JavaScript" %} -```javascript -await seam.accessCodes.createMultiple({ - device_id: [ - "a83690b2-2b70-409a-9a94-426699b84c97", - "7bfe1838-5e64-432c-adb6-34e971bda001" - ], - preferred_code_length: 4 -}); - -/* -[ - { - code: '9913', - type: 'ongoing', - status: 'setting', - created_at: '2022-08-26T11:08:24.161Z', - access_code_id: 'e0e31756-9385-408b-89f8-9f5ea43f9adf', - device_id: 'a83690b2-2b70-409a-9a94-426699b84c97', - common_code_key: 'auto_set_by_create_multiple_996c8131-34a4-4d58-86c4-7820f2ccdefb', - }, - { - code: '9913', - type: 'ongoing', - status: 'setting', - created_at: '2022-08-26T11:08:24.161Z', - access_code_id: 'f3a89135-1101-4197-b272-4b4c5ed092b5', - device_id: '7bfe1838-5e64-432c-adb6-34e971bda001', - common_code_key: 'auto_set_by_create_multiple_996c8131-34a4-4d58-86c4-7820f2ccdefb', - } -] -*/ -``` -{% endtab %} -{% endtabs %} - -### Parameters - -| `device_ids` | type: string\[] |
ID of the Device
type: string
Optional
type: string
Optional
type: string
Optional
type: enum
Optional, default throw
type: number
Optional
Preferred code length
If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length.
type: string
Optional
Code (PIN) to assign to each created access code.
If you specify a code, Seam does not link the created access codes with a common_code_key, so you cannot then update these access codes using /access_codes/update_multiple. You can, however, update each access code individually using /access_codes/update.
ID of the Access Code
| Parameter | Type | Description |
|---|---|---|
device_id | String (UUID) Optional | ID of the devices for which to retrieve access codes. |
access_code_ids | Array of strings (UUIDs) Optional | IDs of the access codes to retrieve. |
user_identifier_key | String Optional | Your own internal user ID for the user by which to filter access codes. |
ID of the Access Code
ID of the Access Code
| Parameter | Type | Description |
|---|---|---|
device_id | String (UUID) Required | ID of the devices for which to retrieve unmanaged access codes. |
user_identifier_key | String Optional | Your own internal user ID for the user by which to filter unmanaged access codes. |
type: string
Optional
type: string
Optional
type: string
Optional
type: string
Optional
type: string
Optional