# Update a Custom Field

To update a field, the user must be part of the **Chain associated with the location** and have the appropriate access rights in the following section **Settings → Access → Custom Fields → Modify custom fields**

Endpoint: PUT /custom_fields/{field_category}/{location_id}/{field_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `field_category` (string, required)
    Field category.
- For appointments - appointment
- For clients - client

  - `location_id` (integer, required)
    location ID

  - `field_id` (integer, required)
    field ID

## Header parameters:

  - `Accept` (string, required)
    e.g. application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Request fields (application/json):

  - `type` (string, required)
    Field type

  - `code` (string, required)
    Field ID

  - `title` (string, required)
    Field name

  - `user_can_edit` (boolean, required)
    Can the user edit the field

  - `show_in_ui` (boolean, required)
    Whether to show the field in the interface

## Response 202:

  - `202` (unknown)
    Accepted

## Response 202 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (array)
    Array of objects with data

  - `data.id` (integer)
    Field ID

  - `data.salon_id` (number)
    location ID

  - `data.custom_field` (object)
    Custom fields

  - `data.custom_field.id` (integer)
    Field ID

  - `data.custom_field.code` (string)
    Field code by which values for appointment fields are set

  - `data.custom_field.entity_type` (string)
    Entity type for which the field is valid (customer card, appointment window)

  - `data.custom_field.show_in_ui` (boolean)
    Whether to show fields in the interface

  - `data.custom_field.title` (string)
    Name of add. fields

  - `data.custom_field.user_can_edit` (boolean)
    Is editing allowed

  - `data.custom_field.type` (object)
    Field type

  - `data.custom_field.type.code` (string)
    Field type code

  - `data.custom_field.type.title` (string)
    Field type name

  - `data.custom_field.values` (string)
    List of valid values for type "list"

  - `meta` (array)
    Metadata (empty array)

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (array)
    Array of objects with data

  - `data.id` (integer)
    Field ID

  - `data.salon_id` (number)
    location ID

  - `data.custom_field` (object)
    Custom fields

  - `data.custom_field.id` (integer)
    Field ID

  - `data.custom_field.code` (string)
    Field code by which values for appointment fields are set

  - `data.custom_field.entity_type` (string)
    Entity type for which the field is valid (customer card, appointment window)

  - `data.custom_field.show_in_ui` (boolean)
    Whether to show fields in the interface

  - `data.custom_field.title` (string)
    Name of add. fields

  - `data.custom_field.user_can_edit` (boolean)
    Is editing allowed

  - `data.custom_field.type` (object)
    Field type

  - `data.custom_field.type.code` (string)
    Field type code

  - `data.custom_field.type.title` (string)
    Field type name

  - `data.custom_field.values` (string)
    List of valid values for type "list"

  - `meta` (array)
    Metadata (empty array)

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (array)
    Array of objects with data

  - `data.id` (integer)
    Field ID

  - `data.salon_id` (number)
    location ID

  - `data.custom_field` (object)
    Custom fields

  - `data.custom_field.id` (integer)
    Field ID

  - `data.custom_field.code` (string)
    Field code by which values for appointment fields are set

  - `data.custom_field.entity_type` (string)
    Entity type for which the field is valid (customer card, appointment window)

  - `data.custom_field.show_in_ui` (boolean)
    Whether to show fields in the interface

  - `data.custom_field.title` (string)
    Name of add. fields

  - `data.custom_field.user_can_edit` (boolean)
    Is editing allowed

  - `data.custom_field.type` (object)
    Field type

  - `data.custom_field.type.code` (string)
    Field type code

  - `data.custom_field.type.title` (string)
    Field type name

  - `data.custom_field.values` (string)
    List of valid values for type "list"

  - `meta` (array)
    Metadata (empty array)

