# Update a person

This endpoint allows you to partially update a person in Calamari.
You can send any number of fields in the request body.
Only the fields included in the request will be updated.
If a field is set to `null`, its value will be removed (if removal is allowed).
Fields that are not included in the request will remain unchanged, even if they exist in the system.
This means you can send both updated and unchanged fields, but only those explicitly provided in the request will be processed.

Endpoint: PATCH /people/v2/{id}
Version: v1
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `id` (any, required)

## Request fields (application/json):

  - `email` (string)
    Valid email address.
    Example: john.doe@example.com

  - `firstName` (string)
    Person's first name.
    Example: John

  - `middleName` (any)
    Person's middle name (Core HR module required).

  - `lastName` (string)
    Person's last name.
    Example: Doe

  - `approvalProcess` (any)
    Approval process name or identifier.

  - `workSchedule` (any)
    Work schedule name or identifier.

  - `holidaysCalendar` (any)
    Holidays calendar name or identifier.

  - `contractType` (any)
    Contract type name or identifier.

  - `hireDate` (any)
    Hire date in ISO 8601 format.

  - `birthdate` (any)
    Birthdate in ISO 8601 format (Core HR module required).

  - `sex` (string | null)
    Sex.
    Enum: "MALE", "FEMALE", "OTHER", null

  - `position` (any)
    Job position/title name or identifier.

  - `teams` (any)
    List of team names or identifiers the person belongs to.
    Example: ["Accountants",3]

  - `maritalStatus` (string | null)
    Martial status.
    Enum: "SINGLE", "MARRIED", "WIDOWED", "SEPARATED", "DIVORCED", "DOMESTIC_PARTNERSHIP", "COMMON_LAW", "OTHER", null

  - `terminationDate` (any)

  - `directManager` (any)
    Identifier of the direct manager.

  - `probationEndDate` (any)
    End date of probation period (ISO 8601 format).

  - `externalNumber` (any)
    External reference number for the person.

  - `symfoniaGuid` (any)
    GUID from Symfonia system.

  - `customNote` (any)
    Custom note or additional information

  - `businessContact` (any)
    Business contact information (Core HR module required).

  - `businessContact.phone` (any)

  - `personalContact` (any)
    Personal contact information (Core HR module required).

  - `personalContact.phone` (any)

  - `personalContact.email` (any)

  - `seniorityBeforeHire` (any)
    Seniority in months before the hire date.

  - `address` (any)
    Person's home address (Core HR module required).

  - `address.street` (any)

  - `address.number` (any)

  - `address.city` (any)

  - `address.provinceState` (any)

  - `address.postalCode` (any)

  - `address.country` (any)

  - `emergencyContact` (any)
    Emergency contact details (Core HR module required).

  - `emergencyContact.name` (any)

  - `emergencyContact.relationship` (any)

  - `emergencyContact.phone` (any)

  - `bankAccountNumber` (any)
    Person's bank account number (Core HR module required).

  - `contractorDetails` (any)
    Contractor-related details (Core HR module required).

  - `contractorDetails.taxNumber` (any)

  - `contractorDetails.companyName` (any)

  - `contractorDetails.companyAddress` (any)

  - `shirtSize` (any)
    Shirt size (Core HR module required).

  - `children` (array)
    List of persons' children (Core HR module required).

Note: Include all active children. The excluded item will be removed.

  - `children.firstName` (any)

  - `children.lastName` (any)

  - `children.birthdate` (any)

  - `children.parent` (any)

  - `customFields` (array)
    Custom attributes assigned to the person (Core HR module required).

  - `customFields.name` (any, required)
    Example: Skills/Languages spoken/Speaks fluently

  - `customFields.value` (any, required)
    Custom field value. Can be single value or array of values in case Single Choice Custom Field or Multi Choice Custom Field. The value is restricted by selected type.

## Response 204:

  - `204` (unknown)
    Person updated successfully.

## Response 400:

  - `400` (unknown)
    The request is invalid due to syntax errors or incorrect parameters. Check the request structure and data format.

## Response 400 fields (application/json):

  - `type` (string, required)
    Example: about:blank

  - `title` (string, required)
    Example: One or more validation errors occurred.

  - `detail` (string, required)
    Example: Please refer to the errors property for additional details.

  - `status` (number, required)
    Example: 400

  - `instance` (number, required)
    Example: 1

  - `errors` (object)
    Example: {"lastName":["must not be blank"]}

## Response 401:

  - `401` (unknown)
    Authorization error - e.g. invalid server url, no Authorization header, wrong user / API key

## Response 401 fields (application/problem+json):

  - `title` (string, required)
    Type of error
    Example: Authentication failure

  - `status` (string, required)
    HTTP status code
    Example: 401

  - `detail` (string, required)
    Detailed error message explaining the issue.
    Example: Please check if valid API key was provided

## Response 403:

  - `403` (unknown)
    The license is unavailable.

## Response 403 fields (application/json):

  - `type` (string, required)
    Example: about:blank

  - `title` (string, required)
    Example: Licence error.

  - `detail` (string, required)
    Example: Time Off module required.

  - `status` (number, required)
    Example: 402

  - `instance` (number, required)
    Example: 1

## Response 404:

  - `404` (unknown)
    The requested resource could not be found.

## Response 404 fields (application/json):

  - `type` (string, required)
    Example: about:blank

  - `title` (string, required)
    Example: Person not found.

  - `detail` (string, required)
    Example: The requested resource could not be found.

  - `status` (number, required)
    Example: 404

  - `instance` (number, required)
    Example: 1

## Response 429:

  - `429` (unknown)
    Maximum number of requests was exceeded - either per second, hour or day.

## Response 429 fields (application/problem+json):

  - `title` (string, required)
    Type of error
    Example: Request quota exceeded

  - `status` (string, required)
    HTTP status code
    Example: 429

  - `detail` (string, required)
    Detailed error message explaining the issue.
    Example: Your current usage is 101/day, 10/hour, 1/sec
Your current limits 100/day, 10/hour, 1/sec.

## Response 500:

  - `500` (unknown)
    Internal server error - something went wrong!

## Response 500 fields (application/problem+json):

  - `title` (string, required)
    Type of error
    Example: Internal server error.

  - `status` (string, required)
    HTTP status code
    Example: 500

  - `detail` (string, required)
    Detailed error message explaining the issue.
    Example: Please try again later. If the issue persists, don't hesitate to reach to our Support via team@calamari.io

## Response 504:

  - `504` (unknown)
    Gateway timeout - call to downstream service exceeded maximum configured amount of time

## Response 504 fields (application/problem+json):

  - `title` (string, required)
    Type of error
    Example: Public API call exceeded timeout.

  - `status` (string, required)
    HTTP status code
    Example: 504

  - `detail` (string, required)
    Detailed error message explaining the issue.
    Example: Please try again later. If the issue persists, don't hesitate to reach to our Support via team@calamari.io

