> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Update EasySecure user.

> Can be used to update some details of an EasySecure user. The most important property is gdprConsent. Show a GDPR consent form to the user to update this property before uploading a photo.

- Product: Easysecure
- Section: Integration - EasySecure
- Snapshot: Current
- Method: `PUT`
- Path: `/api/easysecure/users/{id}`

## Path parameters

### `id`

Type: `number`  
Required: yes  

## Request body

Required: no  
Content types: `application/json`  

### object[]

Type: `object[]`  

#### object

Type: `object`  

##### `hasPhotoEnabled`

Type: `boolean`  
Required: no  

##### `hasQRCodeEnabled`

Type: `boolean`  
Required: no  

##### `gdprConsent`

Type: `boolean`  
Required: no  

##### `retainConsent`

Type: `string`  
Required: no  

##### `locked`

Type: `string`  
Required: no  

## Execute with TypeScript

Package: `@recranet/sdk`  

A TypeScript example is not available yet.

## Execute with curl

```bash
curl -X PUT "https://app.recranet.com/api/easysecure/users/$ID" \
    -H "X-Api-Key: $RECRANET_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '[{}]'
```

## Responses

### Response `200`

Category: success  

Successful response

#### `application/json`

##### Generated example

```json
{
  "id": 0,
  "uuid": "uuid",
  "uniqueId": "RB-123456",
  "name": "name",
  "start": "2024-07-01T00:00:00Z",
  "end": "2024-07-08T00:00:00Z",
  "created": "created",
  "configuration": {
    "id": 0,
    "created": "created",
    "locale": "locale",
    "description": "description",
    "gdprStatement": "gdprStatement",
    "locationReference": 1,
    "numOfDaysBeforeCheckin": 7,
    "numOfDaysAfterCheckout": 1,
    "numOfDaysAfterCheckoutWithRetainConsent": 180,
    "hasCustomCheckinCheckoutTime": false,
    "checkinTime": "checkinTime",
    "checkoutTime": "checkoutTime",
    "numOfMinutesBeforeCheckin": 0,
    "numOfMinutesAfterCheckout": 0,
    "includeOwnerReservations": false,
    "includeReservationFellowGuests": true,
    "includeReservationAdditionalGuests": true,
    "hasPhotoEnabled": false,
    "hasTapkeyEnabled": false,
    "hasQRCodeEnabled": false,
    "updateProfilePictureAfterPhotoUpload": false,
    "lockUserAfterPhotoUpload": false,
    "deleteQRCodeAfterPhotoUpload": false,
    "deletePhotoAfterQRCodeEnabled": false,
    "active": false,
    "modified": "modified"
  },
  "hasPhotoEnabled": true,
  "hasPhoto": true,
  "hasTapkeyEnabled": true,
  "hasTapkey": true,
  "hasQRCodeEnabled": true,
  "hasQRCode": true,
  "registered": false,
  "gdprConsent": false,
  "retainConsent": false,
  "locked": false,
  "modified": "modified",
  "expires": "expires",
  "exported": "exported"
}
```

##### Schema

###### ESUser

Type: `ESUser`  

###### `id`

Type: `number`  
Required: yes  

###### `uuid`

Type: `string`  
Required: yes  

###### `uniqueId`

Type: `string`  
Required: yes  

EasySecure ID of the user

###### `name`

Type: `string`  
Required: yes  

###### `start`

Type: `string`  
Format: `date-time`  
Required: yes  

###### `end`

Type: `string`  
Format: `date-time`  
Required: yes  

###### `hasPhotoEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user can use the photo method.

###### `hasPhoto`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user currently has a photo.

###### `hasTapkeyEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user can use the Tapkey method.

###### `hasTapkey`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user currently has a Tapkey.

###### `hasQRCodeEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user can use the QR code method.

###### `hasQRCode`

Type: `boolean`  
Required: no  
Default: `false`  

Indicates if the user currently has a QR code.

###### `registered`

Type: `boolean`  
Required: no  
Default: `false`  

###### `gdprConsent`

Type: `boolean`  
Required: no  
Default: `false`  

###### `retainConsent`

Type: `boolean`  
Required: no  
Default: `false`  

###### `locked`

Type: `boolean`  
Required: no  
Default: `false`  

###### `created`

Type: `string`  
Format: `date-time`  
Required: yes  

###### `modified`

Type: `string`  
Format: `date-time`  
Required: no  

###### `expires`

Type: `string`  
Format: `date-time`  
Required: no  

###### `exported`

Type: `string`  
Format: `date-time`  
Required: no  

###### `configuration`

Type: `ESConfiguration`  
Required: yes  

###### `id`

Type: `number`  
Required: yes  

###### `description`

Type: `string`  
Required: no  

###### `gdprStatement`

Type: `string`  
Required: no  

###### `locationReference`

Type: `number`  
Required: no  
Default: `1`  

###### `numOfDaysBeforeCheckin`

Type: `number`  
Required: no  
Default: `7`  

###### `numOfDaysAfterCheckout`

Type: `number`  
Required: no  
Default: `1`  

###### `numOfDaysAfterCheckoutWithRetainConsent`

Type: `number`  
Required: no  
Default: `180`  

###### `hasCustomCheckinCheckoutTime`

Type: `boolean`  
Required: no  
Default: `false`  

###### `checkinTime`

Type: `string`  
Required: no  

###### `checkoutTime`

Type: `string`  
Required: no  

###### `numOfMinutesBeforeCheckin`

Type: `number`  
Required: no  
Default: `0`  

###### `numOfMinutesAfterCheckout`

Type: `number`  
Required: no  
Default: `0`  

###### `includeOwnerReservations`

Type: `boolean`  
Required: no  
Default: `false`  

###### `includeReservationFellowGuests`

Type: `boolean`  
Required: no  
Default: `true`  

###### `includeReservationAdditionalGuests`

Type: `boolean`  
Required: no  
Default: `true`  

###### `hasPhotoEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

###### `hasTapkeyEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

###### `hasQRCodeEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

###### `updateProfilePictureAfterPhotoUpload`

Type: `boolean`  
Required: no  
Default: `false`  

###### `lockUserAfterPhotoUpload`

Type: `boolean`  
Required: no  
Default: `false`  

###### `deleteQRCodeAfterPhotoUpload`

Type: `boolean`  
Required: no  
Default: `false`  

###### `deletePhotoAfterQRCodeEnabled`

Type: `boolean`  
Required: no  
Default: `false`  

###### `active`

Type: `boolean`  
Required: no  
Default: `false`  

###### `created`

Type: `string`  
Format: `date-time`  
Required: yes  

###### `modified`

Type: `string`  
Format: `date-time`  
Required: no  

###### `locale`

Type: `string`  
Required: yes  

### Response `400`

Category: client-error  

Bad request

#### `application/json`

##### Example

```json
{
  "statusCode": 400,
  "description": "Bad request",
  "errors": [
    "Bad request"
  ]
}
```

##### Schema

###### object

Type: `object`  

## Related representations

- [Human documentation](/easysecure/users/methods/update/)
- [TypeScript Markdown](/easysecure/users/methods/update.md?lang=typescript)
- [curl Markdown](/easysecure/users/methods/update.md?lang=curl)
- [site llms.txt](/llms.txt)
- [product llms.txt](/easysecure/llms.txt)
- [snapshot llms.txt](/easysecure/llms.txt)
