@seamapi/http - v2.0.0
    Preparing search index...

    Type Alias AccessCode

    Represents a smart lock access code.

    An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.

    Seam supports programming two types of access codes: ongoing and time-bound. To differentiate between the two, refer to the type property of the access code. Ongoing codes display as ongoing, whereas time-bound codes are labeled time_bound. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both starts_at and ends_at empty. A time-bound access code will be programmed at the starts_at time and removed at the ends_at time.

    In addition, for certain devices, Seam also supports offline access codes. Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.

    For granting a person access to a space, Access Grants are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.

    type AccessCode = {
        access_code_id: string;
        code: string | null;
        common_code_key: string | null;
        created_at: string;
        device_id: string;
        dormakaba_oracode_metadata?:
            | {
                is_cancellable?: boolean;
                is_early_checkin_able?: boolean;
                is_extendable?: boolean;
                is_overridable?: boolean;
                site_name?: string;
                stay_id?: number;
                user_level_id?: string;
                user_level_name?: string
                | null;
            }
            | null;
        ends_at?: string
        | null;
        errors: (
            | {
                created_at?: string;
                error_code: "provider_issue";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                created_at?: string;
                error_code: "failed_to_set_on_device";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                created_at?: string;
                error_code: "failed_to_remove_from_device";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                created_at?: string;
                error_code: "duplicate_code_on_device";
                is_access_code_error: boolean;
                managed_access_code_id?: string;
                message: string;
                unmanaged_access_code_id?: string;
            }
            | {
                created_at?: string;
                error_code: "no_space_for_access_code_on_device";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                change_type?: "modified"
                | "removed";
                created_at?: string;
                error_code: "conflicting_external_modification";
                is_access_code_error: boolean;
                message: string;
                modified_fields?: {
                    field: string;
                    from: string | null;
                    to: string | null;
                }[];
            }
            | {
                created_at?: string;
                error_code: "access_code_inactive";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                created_at?: string;
                error_code: "insufficient_permissions";
                is_access_code_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "account_disconnected";
                is_connected_account_error: boolean;
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "salto_ks_subscription_limit_exceeded";
                is_connected_account_error: boolean;
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "dormakaba_sites_disconnected";
                is_connected_account_error: boolean;
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "device_offline";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "device_removed";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "hub_disconnected";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "device_disconnected";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "empty_backup_access_code_pool";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "august_lock_not_authorized";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "missing_device_credentials";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "auxiliary_heat_running";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "subscription_required";
                is_device_error: boolean;
                message: string;
            }
            | {
                created_at: string;
                error_code: "bridge_disconnected";
                is_bridge_error?: boolean;
                is_connected_account_error?: boolean;
                message: string;
            }
        )[];
        is_backup?: boolean;
        is_backup_access_code_available: boolean;
        is_external_modification_allowed: boolean;
        is_managed: boolean;
        is_offline_access_code: boolean;
        is_one_time_use: boolean;
        is_scheduled_on_device?: boolean;
        is_waiting_for_code_assignment?: boolean;
        name: string
        | null;
        pending_mutations: (
            | { created_at: string; message: string; mutation_code: "creating" }
            | {
                created_at: string;
                message: string;
                mutation_code: "deferring_creation";
                scheduled_at: string;
            }
            | { created_at: string; message: string; mutation_code: "deleting" }
            | {
                created_at: string;
                from: { code: string | null };
                message: string;
                mutation_code: "updating_code";
                to: { code: string | null };
            }
            | {
                created_at: string;
                from: { name: string
                | null };
                message: string;
                mutation_code: "updating_name";
                to: { name: string | null };
            }
            | {
                created_at: string;
                from: { ends_at: string
                | null; starts_at: string | null };
                message: string;
                mutation_code: "updating_time_frame";
                to: { ends_at: string | null; starts_at: string | null };
            }
        )[];
        pulled_backup_access_code_id?: string
        | null;
        starts_at?: string | null;
        status: "setting" | "set" | "unset" | "removing" | "unknown";
        type: "time_bound" | "ongoing";
        warnings: (
            | {
                created_at?: string;
                message: string;
                warning_code: "code_rotates_periodically";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "time_frame_adjusted_for_unknown_time_zone";
            }
            | {
                change_type?: "modified"
                | "removed";
                created_at?: string;
                message: string;
                modified_fields?: {
                    field: string;
                    from: string | null;
                    to: string | null;
                }[];
                warning_code: "external_modification_in_effect";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "delay_in_setting_on_device";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "delay_in_removing_from_device";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "third_party_integration_detected";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "igloo_algopin_must_be_used_within_24_hours";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "management_transferred";
            }
            | {
                created_at?: string;
                message: string;
                warning_code: "using_backup_access_code";
            }
            | { created_at?: string; message: string; warning_code: "being_deleted" }
            | {
                created_at?: string;
                message: string;
                warning_code: "unknown_issue_with_access_code";
            }
        )[];
        workspace_id: string;
    }
    Index
    access_code_id: string

    Unique identifier for the access code.

    code: string | null

    Code used for access. Typically, a numeric or alphanumeric string.

    common_code_key: string | null

    Unique identifier for a group of access codes that share the same code.

    created_at: string

    Date and time at which the access code was created.

    device_id: string

    Unique identifier for the device associated with the access code.

    dormakaba_oracode_metadata?:
        | {
            is_cancellable?: boolean;
            is_early_checkin_able?: boolean;
            is_extendable?: boolean;
            is_overridable?: boolean;
            site_name?: string;
            stay_id?: number;
            user_level_id?: string;
            user_level_name?: string
            | null;
        }
        | null

    Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.

    Type Declaration

    • {
          is_cancellable?: boolean;
          is_early_checkin_able?: boolean;
          is_extendable?: boolean;
          is_overridable?: boolean;
          site_name?: string;
          stay_id?: number;
          user_level_id?: string;
          user_level_name?: string | null;
      }
      • Optionalis_cancellable?: boolean

        Indicates whether the stay can be cancelled via the Dormakaba Oracode API.

      • Optionalis_early_checkin_able?: boolean

        Indicates whether early check-in is available for this stay.

      • Optionalis_extendable?: boolean

        Indicates whether the stay can be extended via the Dormakaba Oracode API.

      • Optionalis_overridable?: boolean

        Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached.

      • Optionalsite_name?: string

        Dormakaba Oracode site name associated with this access code.

      • Optionalstay_id?: number

        Dormakaba Oracode stay ID associated with this access code.

      • Optionaluser_level_id?: string

        Dormakaba Oracode user level ID associated with this access code.

      • Optionaluser_level_name?: string | null

        Dormakaba Oracode user level name associated with this access code.

    • null
    ends_at?: string | null

    Date and time after which the time-bound access code becomes inactive.

    errors: (
        | {
            created_at?: string;
            error_code: "provider_issue";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            created_at?: string;
            error_code: "failed_to_set_on_device";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            created_at?: string;
            error_code: "failed_to_remove_from_device";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            created_at?: string;
            error_code: "duplicate_code_on_device";
            is_access_code_error: boolean;
            managed_access_code_id?: string;
            message: string;
            unmanaged_access_code_id?: string;
        }
        | {
            created_at?: string;
            error_code: "no_space_for_access_code_on_device";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            change_type?: "modified"
            | "removed";
            created_at?: string;
            error_code: "conflicting_external_modification";
            is_access_code_error: boolean;
            message: string;
            modified_fields?: {
                field: string;
                from: string | null;
                to: string | null;
            }[];
        }
        | {
            created_at?: string;
            error_code: "access_code_inactive";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            created_at?: string;
            error_code: "insufficient_permissions";
            is_access_code_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "account_disconnected";
            is_connected_account_error: boolean;
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "salto_ks_subscription_limit_exceeded";
            is_connected_account_error: boolean;
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "dormakaba_sites_disconnected";
            is_connected_account_error: boolean;
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "device_offline";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "device_removed";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "hub_disconnected";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "device_disconnected";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "empty_backup_access_code_pool";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "august_lock_not_authorized";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "missing_device_credentials";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "auxiliary_heat_running";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "subscription_required";
            is_device_error: boolean;
            message: string;
        }
        | {
            created_at: string;
            error_code: "bridge_disconnected";
            is_bridge_error?: boolean;
            is_connected_account_error?: boolean;
            message: string;
        }
    )[]

    Errors associated with the access code.

    Type Declaration

    • {
          created_at?: string;
          error_code: "provider_issue";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "provider_issue"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at?: string;
          error_code: "failed_to_set_on_device";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "failed_to_set_on_device"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at?: string;
          error_code: "failed_to_remove_from_device";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "failed_to_remove_from_device"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at?: string;
          error_code: "duplicate_code_on_device";
          is_access_code_error: boolean;
          managed_access_code_id?: string;
          message: string;
          unmanaged_access_code_id?: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "duplicate_code_on_device"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • Optionalmanaged_access_code_id?: string

        ID of the managed access code that conflicts with this managed access code, when Seam can identify it.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

      • Optionalunmanaged_access_code_id?: string

        ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.

    • {
          created_at?: string;
          error_code: "no_space_for_access_code_on_device";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "no_space_for_access_code_on_device"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          change_type?: "modified" | "removed";
          created_at?: string;
          error_code: "conflicting_external_modification";
          is_access_code_error: boolean;
          message: string;
          modified_fields?: { field: string; from: string | null; to: string | null }[];
      }
      • Optionalchange_type?: "modified" | "removed"

        Indicates the type of external modification. modified means the code's PIN or schedule was changed. removed means the code was deleted from the device.

      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "conflicting_external_modification"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

      • Optionalmodified_fields?: { field: string; from: string | null; to: string | null }[]

        List of fields that were changed externally, with their previous and new values.

    • {
          created_at?: string;
          error_code: "access_code_inactive";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "access_code_inactive"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at?: string;
          error_code: "insufficient_permissions";
          is_access_code_error: boolean;
          message: string;
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the error.

      • error_code: "insufficient_permissions"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_access_code_error: boolean

        Indicates that this is an access code error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "account_disconnected";
          is_connected_account_error: boolean;
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "account_disconnected"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_connected_account_error: boolean

        Indicates that the error is a connected account error.

      • is_device_error: boolean

        Indicates that the error is not a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "salto_ks_subscription_limit_exceeded";
          is_connected_account_error: boolean;
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "salto_ks_subscription_limit_exceeded"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_connected_account_error: boolean

        Indicates that the error is a connected account error.

      • is_device_error: boolean

        Indicates that the error is not a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "dormakaba_sites_disconnected";
          is_connected_account_error: boolean;
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "dormakaba_sites_disconnected"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_connected_account_error: boolean

        Indicates that the error is a connected account error.

      • is_device_error: boolean

        Indicates that the error is not a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "device_offline";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "device_offline"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "device_removed";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "device_removed"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "hub_disconnected";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "hub_disconnected"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "device_disconnected";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "device_disconnected"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "empty_backup_access_code_pool";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "empty_backup_access_code_pool"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "august_lock_not_authorized";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "august_lock_not_authorized"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "missing_device_credentials";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "missing_device_credentials"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "auxiliary_heat_running";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "auxiliary_heat_running"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "subscription_required";
          is_device_error: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "subscription_required"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • is_device_error: boolean

        Indicates that the error is a device error.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    • {
          created_at: string;
          error_code: "bridge_disconnected";
          is_bridge_error?: boolean;
          is_connected_account_error?: boolean;
          message: string;
      }
      • created_at: string

        Date and time at which Seam created the error.

      • error_code: "bridge_disconnected"

        Unique identifier of the type of error. Enables quick recognition and categorization of the issue.

      • Optionalis_bridge_error?: boolean

        Indicates whether the error is related to Seam Bridge.

      • Optionalis_connected_account_error?: boolean

        Indicates whether the error is related specifically to the connected account.

      • message: string

        Detailed description of the error. Provides insights into the issue and potentially how to rectify it.

    is_backup?: boolean

    Indicates whether the access code is a backup code.

    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_external_modification_allowed: boolean

    Indicates whether changes to the access code from external sources are permitted.

    is_managed: boolean

    Indicates whether Seam manages the access code.

    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.

    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_scheduled_on_device?: boolean

    Indicates whether the code is set on the device according to a preconfigured schedule.

    is_waiting_for_code_assignment?: boolean

    Indicates whether the access code is waiting for a code assignment.

    name: string | null

    Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as first_name and last_name. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called appearance. This is an object with a name property and, optionally, first_name and last_name properties (for providers that break down a name into components).

    pending_mutations: (
        | { created_at: string; message: string; mutation_code: "creating" }
        | {
            created_at: string;
            message: string;
            mutation_code: "deferring_creation";
            scheduled_at: string;
        }
        | { created_at: string; message: string; mutation_code: "deleting" }
        | {
            created_at: string;
            from: { code: string | null };
            message: string;
            mutation_code: "updating_code";
            to: { code: string | null };
        }
        | {
            created_at: string;
            from: { name: string
            | null };
            message: string;
            mutation_code: "updating_name";
            to: { name: string | null };
        }
        | {
            created_at: string;
            from: { ends_at: string
            | null; starts_at: string | null };
            message: string;
            mutation_code: "updating_time_frame";
            to: { ends_at: string | null; starts_at: string | null };
        }
    )[]

    Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device.

    Type Declaration

    • { created_at: string; message: string; mutation_code: "creating" }
      • created_at: string

        Date and time at which the mutation was created.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "creating"

        Mutation code to indicate that Seam is in the process of setting an access code on the device.

    • {
          created_at: string;
          message: string;
          mutation_code: "deferring_creation";
          scheduled_at: string;
      }
      • created_at: string

        Date and time at which the mutation was created.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "deferring_creation"

        Mutation code to indicate that Seam is waiting until closer to the access code's start time before programming it on the device.

      • scheduled_at: string

        Date and time at which Seam will attempt to program this access code on the device.

    • { created_at: string; message: string; mutation_code: "deleting" }
      • created_at: string

        Date and time at which the mutation was created.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "deleting"

        Mutation code to indicate that Seam is in the process of removing an access code from the device.

    • {
          created_at: string;
          from: { code: string | null };
          message: string;
          mutation_code: "updating_code";
          to: { code: string | null };
      }
      • created_at: string

        Date and time at which the mutation was created.

      • from: { code: string | null }

        Previous code configuration.

        • code: string | null

          Previous PIN code.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "updating_code"

        Mutation code to indicate that Seam is in the process of pushing an updated PIN code to the device.

      • to: { code: string | null }

        New code configuration.

        • code: string | null

          New PIN code.

    • {
          created_at: string;
          from: { name: string | null };
          message: string;
          mutation_code: "updating_name";
          to: { name: string | null };
      }
      • created_at: string

        Date and time at which the mutation was created.

      • from: { name: string | null }

        Previous name configuration.

        • name: string | null

          Previous access code name.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "updating_name"

        Mutation code to indicate that Seam is in the process of pushing an updated access code name to the device.

      • to: { name: string | null }

        New name configuration.

        • name: string | null

          New access code name.

    • {
          created_at: string;
          from: { ends_at: string | null; starts_at: string | null };
          message: string;
          mutation_code: "updating_time_frame";
          to: { ends_at: string | null; starts_at: string | null };
      }
      • created_at: string

        Date and time at which the mutation was created.

      • from: { ends_at: string | null; starts_at: string | null }

        Previous time frame configuration.

        • ends_at: string | null

          Previous end time for the access code.

        • starts_at: string | null

          Previous start time for the access code.

      • message: string

        Detailed description of the mutation.

      • mutation_code: "updating_time_frame"

        Mutation code to indicate that Seam is in the process of pushing updated access code time frame to the device.

      • to: { ends_at: string | null; starts_at: string | null }

        New time frame configuration.

        • ends_at: string | null

          New end time for the access code.

        • starts_at: string | null

          New start time for the access code.

    pulled_backup_access_code_id?: string | null

    Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code.

    starts_at?: string | null

    Date and time at which the time-bound access code becomes active.

    status: "setting" | "set" | "unset" | "removing" | "unknown"

    Current status of the access code within the operational lifecycle. Values are setting, a transitional phase that indicates that the code is being configured or activated; set, which indicates that the code is active and operational; unset, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; removing, which indicates a transitional period in which the code is being deleted or made inactive; and unknown, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also Lifecycle of Access Codes.

    type: "time_bound" | "ongoing"

    Type of the access code. ongoing access codes are active continuously until deactivated manually. time_bound access codes have a specific duration.

    warnings: (
        | {
            created_at?: string;
            message: string;
            warning_code: "code_rotates_periodically";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "time_frame_adjusted_for_unknown_time_zone";
        }
        | {
            change_type?: "modified"
            | "removed";
            created_at?: string;
            message: string;
            modified_fields?: {
                field: string;
                from: string | null;
                to: string | null;
            }[];
            warning_code: "external_modification_in_effect";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "delay_in_setting_on_device";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "delay_in_removing_from_device";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "third_party_integration_detected";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "igloo_algopin_must_be_used_within_24_hours";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "management_transferred";
        }
        | {
            created_at?: string;
            message: string;
            warning_code: "using_backup_access_code";
        }
        | { created_at?: string; message: string; warning_code: "being_deleted" }
        | {
            created_at?: string;
            message: string;
            warning_code: "unknown_issue_with_access_code";
        }
    )[]

    Warnings associated with the access code.

    Type Declaration

    • {
          created_at?: string;
          message: string;
          warning_code: "code_rotates_periodically";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "code_rotates_periodically"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "time_frame_adjusted_for_unknown_time_zone";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "time_frame_adjusted_for_unknown_time_zone"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          change_type?: "modified" | "removed";
          created_at?: string;
          message: string;
          modified_fields?: { field: string; from: string | null; to: string | null }[];
          warning_code: "external_modification_in_effect";
      }
      • Optionalchange_type?: "modified" | "removed"

        Indicates the type of external modification. modified means the code's PIN or schedule was changed. removed means the code was deleted from the device.

      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • Optionalmodified_fields?: { field: string; from: string | null; to: string | null }[]

        List of fields that were changed externally, with their previous and new values.

      • warning_code: "external_modification_in_effect"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "delay_in_setting_on_device";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "delay_in_setting_on_device"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "delay_in_removing_from_device";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "delay_in_removing_from_device"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "third_party_integration_detected";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "third_party_integration_detected"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "igloo_algopin_must_be_used_within_24_hours";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "igloo_algopin_must_be_used_within_24_hours"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • { created_at?: string; message: string; warning_code: "management_transferred" }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "management_transferred"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "using_backup_access_code";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "using_backup_access_code"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • { created_at?: string; message: string; warning_code: "being_deleted" }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "being_deleted"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    • {
          created_at?: string;
          message: string;
          warning_code: "unknown_issue_with_access_code";
      }
      • Optionalcreated_at?: string

        Date and time at which Seam created the warning.

      • message: string

        Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.

      • warning_code: "unknown_issue_with_access_code"

        Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.

    workspace_id: string

    Unique identifier for the Seam workspace associated with the access code.