---
title: "Update a person"
method: PATCH
path: "/v1/locations/{locationId}/persons/{personId}"
tags: ["Persons"]
---

# Update a person

`PATCH /v1/locations/{locationId}/persons/{personId}`

## Request

- Base URL: `https://api.cliento.com`
- URL: `https://api.cliento.com/v1/locations/{locationId}/persons/{personId}`
- Auth: HTTP bearer

Changes only the fields in the request. Either all of them are changed or none. See `PersonUpdate` for how to clear a field.

## Path parameters

- `locationId` string, required
- `personId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- PersonUpdate: A JSON merge patch: send only what changes. A field you leave out keeps its value; a text field, `identityNumber` or `address` set to `null` is cleared, except `name`, which cannot be cleared. `address` merges field by field; `identityNumber` is replaced as a whole. The booleans (`communication.*`, `onlineBookingBlocked`) are true or false and cannot be null.
  - `address` Address
    - `city` string, nullable
    - `country` string, nullable: Free text; an ISO 3166-1 alpha-2 code is recommended.
    - `line1` string, nullable
    - `line2` string, nullable
    - `line3` string, nullable
    - `postCode` string, nullable
  - `communication` Communication: What the person has agreed to receive. In an update, a field you leave out keeps its value. For a new person `smsReminders`, `emailReminders` and `reviewReminders` start as true and `marketing` as false: send `marketing` as true only when the person has agreed to marketing.
    - `emailReminders` boolean: Booking reminders by email.
    - `marketing` boolean: Marketing messages.
    - `reviewReminders` boolean: Requests to review a visit.
    - `smsReminders` boolean: Booking reminders by SMS.
  - `dateOfBirth` string, nullable: ISO 8601 date.
  - `email` string, nullable
  - `gender` 'male' | 'female' | 'other' | 'null', nullable
  - `identityNumber` IdentityNumber: A number issued by an authority that identifies a person, such as a personnummer. The accepted format of each type is listed under Persons.
    - `number` string, required: In the format of its type: twelve digits for a Swedish personnummer.
    - `type` string, required: The kind of number, in lower case, such as `se_personnummer` or `foreign`. More values may be added.
  - `name` string
  - `notes` string, nullable: Staff-facing notes, at most 1000 characters.
  - `onlineBookingBlocked` boolean: Set to true to stop the person booking online.
  - `otherPhoneNumber` string, nullable
  - `phoneNumber` string, nullable: Mobile number in E.164 format: a plus sign, the country code and the number, at most 15 digits.

## Response `200`

OK

- Person: Represents an individual a location serves. Belongs to one location.
  - `address` Address
    - `city` string, nullable
    - `country` string, nullable: Free text; an ISO 3166-1 alpha-2 code is recommended.
    - `line1` string, nullable
    - `line2` string, nullable
    - `line3` string, nullable
    - `postCode` string, nullable
  - `communication` Communication, required: What the person has agreed to receive. In an update, a field you leave out keeps its value. For a new person `smsReminders`, `emailReminders` and `reviewReminders` start as true and `marketing` as false: send `marketing` as true only when the person has agreed to marketing.
    - `emailReminders` boolean: Booking reminders by email.
    - `marketing` boolean: Marketing messages.
    - `reviewReminders` boolean: Requests to review a visit.
    - `smsReminders` boolean: Booking reminders by SMS.
  - `createdAt` string, date-time
  - `dateOfBirth` string: ISO 8601 date.
  - `email` string
  - `externalReference` string: Your own id for it, as sent when it was created.
  - `gender` string: One lower-case word such as `female`. More values may be added.
  - `id` string, required
  - `identityNumber` IdentityNumber: A number issued by an authority that identifies a person, such as a personnummer. The accepted format of each type is listed under Persons.
    - `number` string, required: In the format of its type: twelve digits for a Swedish personnummer.
    - `type` string, required: The kind of number, in lower case, such as `se_personnummer` or `foreign`. More values may be added.
  - `locationId` string, required
  - `name` string
  - `notes` string: Staff-facing notes, at most 1000 characters.
  - `onlineBookingBlocked` boolean, required: True when the person may not book online.
  - `otherPhoneNumber` string
  - `owner` CustomerOwner, required: Whose customer a person is within its location: the location's own, or that of one of the location's resources. A salon that rents out chairs uses it: a person served by a hairdresser who rents a chair is that resource's customer, and a person served by an employee is the location's. Many locations never record it, so `unassigned` is common and says nothing either way.
    - `resourceId` string: The resource (see Resources) whose customer the person is. Present when `type` is `resource`.
    - `type` 'location' | 'resource' | 'unassigned', required: `location`: the location's own customer. `resource`: the customer of one resource, named by `resourceId`. `unassigned`: not recorded. More values may be added.
  - `phoneNumber` string: Mobile number, in E.164 format when it was set through this API.
  - `updatedAt` string, date-time

## Other responses

- `default`: Any failure. See the Errors section.

---

[API](https://skmtc.dev/cliento/apis/cliento-api.md) · [All operations](https://skmtc.dev/cliento/apis/cliento-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cliento/apis/cliento-api/revisions/29ca811bc061?raw)
