Update an Access Code

Update an Access Code for a Device by its ID

Update an Access Code

PUT https://connect.getseam.com/access_codes/update

Request Body

Name
Type
Description

access_code_id*

String

Access code id

name

String

Access code name

code

String

Access code

starts_at

String

ends_at

String

{
  "action_attempt": {
    "status": "pending",
    "action_type": "UPDATE_ACCESS_CODE",
    "action_attempt_id": "bbb8a07d-a91d-4564-b002-8172f7cdadc4",
    "result": null,
    "error": null
  },
  "ok": true
}

Code Example

seam.access_codes.update(
    access_code_id: "123e4567-e89b-12d3-a456-426614174000",
    code: "1112",
    name: 'New name'
)

# <Seam::ActionAttempt:0x00c7998
#   status="success"
#   action_type="UPDATE_ACCESS_CODE"
#   action_attempt_id="2da52c27-9487-4a55-9379-60690a653b4e"
#   result={
#     "access_code"=>{
#       "code"=>"1112",
#       "name"=>"New name",
#       "type"=>"ongoing",
#       "status"=>"setting",
#       "created_at"=>"2022-07-06T16:01:18.063Z",
#       "access_code_id"=>"123e4567-e89b-12d3-a456-426614174000"}}>

Parameters

access_code_id

type:string

ID of the Access Code

device_id

type: string Optional

ID of the Device

name

type: string Optional

Name of Access Code

starts_at

type: string Optional

From when is the code valid

ends_at

type: string Optional

Code expiry

code

type: string Optional

Access code of Device

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

{
  "action_attempt": {
    "status": "pending",
    "action_type": "UPDATE_ACCESS_CODE",
    "action_attempt_id": "bbb8a07d-a91d-4564-b002-8172f7cdadc4",
    "result": null,
    "error": null
  },
  "ok": true
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.