# Update Event Appointment

Update pricing, Product Items, Tags, color, comment, or capacity for an Event Appointment.

Endpoint: PUT /locations/{location_id}/events/{event_id}/appointments/{record_id}
Version: 2.0.0
Security: BearerPartnerUser

## Security:

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

## Path parameters:

  - `location_id` (integer, required)
    Location ID

  - `event_id` (integer, required)
    Event ID

  - `record_id` (integer, required)
    Appointment ID; `record_id` is the literal wire path parameter

## Query parameters:

  - `include` (array)
    Related resources to include in the updated Appointment

## Header parameters:

  - `Accept` (string, required)
    Required B2B v2 response media type. Use `application/vnd.api.v2+json`. A charset parameter is also accepted.

  - `Content-Type` (string, required)
    Request media type

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

## Request fields (application/json):

  - `attendance_service_item` (object, required)

  - `attendance_service_item.cost_per_unit` (number, required)

  - `attendance_service_item.discount_percent` (number, required)

  - `attendance_service_item.manual_cost` (number, required)

  - `attendance_service_item.is_trial` (boolean)
    Whether this is a trial Service Appointment

  - `attendance_good_items` (array)
    Literal wire field for Appointment Product Items

  - `attendance_good_items.id` (integer | null, required)
    Appointment Product Item ID; `null` creates an item

  - `attendance_good_items.good_id` (integer, required)
    Literal wire field for Product ID

  - `attendance_good_items.unit_id` (integer, required)
    Unit ID

  - `attendance_good_items.storage_id` (integer, required)
    Inventory Location ID

  - `attendance_good_items.staff_id` (integer, required)
    Team Member ID

  - `attendance_good_items.operation_unit_type` (string, required)
    Product operation type
    Enum: "sale", "consumable"

  - `attendance_good_items.number` (string | null, required)

  - `attendance_good_items.quantity` (number, required)

  - `attendance_good_items.cost_per_unit` (number, required)

  - `attendance_good_items.manual_cost` (number, required)

  - `attendance_good_items.discount_percent` (number, required)

  - `attendance_good_items.marks` (array, required)

  - `attendance_good_items.planned_activation_date` (string | null, required)

  - `comment` (string | null)
    Appointment comment

  - `label_ids` (array | null)
    Tag IDs

  - `color` (string | null)
    Appointment color without `#`

  - `clients_count` (integer | null)
    Number of places reserved by the Appointment

## Response 200:

  - `200` (unknown)
    Event Appointment updated successfully

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.type` (string, required)
    Literal JSON:API resource type
    Enum: "record"

  - `data.id` (string, required)
    Appointment ID

  - `data.attributes` (object, required)

  - `data.attributes.company_id` (integer, required)
    Location ID

  - `data.attributes.external_id` (string, required)
    External Appointment ID

  - `data.attributes.visit_id` (integer, required)
    Linked visit ID, or `0` when not linked

  - `data.attributes.booking_user_id` (integer, required)
    Booking User account ID, or `0`

  - `data.attributes.bookform_id` (integer, required)
    Booking form ID, or `0`

  - `data.attributes.master_id` (integer, required)
    Deprecated wire field for Team Member ID; use `staff_id`

  - `data.attributes.staff_id` (integer, required)
    Team Member ID

  - `data.attributes.client_id` (integer, required)
    Booking User profile ID, or `0` when absent

  - `data.attributes.comer_id` (integer | null, required)
    Walk-in visitor ID

  - `data.attributes.source` (integer, required)
    Appointment source wire value

  - `data.attributes.attendance` (integer, required)
    Deprecated attendance wire value; use `attendance_status_slug`
    Enum: "-1", "0", "1", "2"

  - `data.attributes.attendance_status` (integer, required)
    Deprecated attendance status; use `attendance_status_slug`
    Enum: "-1", "0", "1", "2"

  - `data.attributes.attendance_status_slug` (string, required)
    Appointment attendance status
    Enum: "absent", "waiting", "attended", "confirmed"

  - `data.attributes.client_fictive_name` (string | null, required)
    Fallback Booking User name stored on the Appointment

  - `data.attributes.client_fictive_phone` (string | null, required)
    Fallback Booking User phone stored on the Appointment

  - `data.attributes.client_fictive_email` (string | null, required)
    Fallback Booking User email stored on the Appointment

  - `data.attributes.clients_count` (integer, required)
    Number of Booking Users in the Appointment

  - `data.attributes.activity_id` (integer, required)
    Event ID, or `0` when the Appointment is not part of an Event

  - `data.attributes.custom_color` (string, required)
    Appointment background color without `#`, or an empty string

  - `data.attributes.custom_font_color` (string, required)
    Appointment text color without `#`, or an empty string

  - `data.attributes.length` (integer, required)
    Deprecated duration in seconds; use `duration`

  - `data.attributes.duration` (integer, required)
    Appointment duration in seconds

  - `data.attributes.paid_full` (integer, required)
    Deprecated payment wire value; use `is_paid` and `is_overpaid`
    Enum: "0", "1", "2"

  - `data.attributes.is_paid` (boolean, required)
    Whether the Appointment is fully paid

  - `data.attributes.is_overpaid` (boolean, required)
    Whether the Appointment is overpaid

  - `data.attributes.timestamp` (integer, required)
    Appointment start as a Unix timestamp

  - `data.attributes.date` (string, required)
    Appointment start in the Location timezone, without an offset

  - `data.attributes.created_datetime` (string, required)
    Creation date and time in the Location timezone, without an offset

  - `data.attributes.from_url` (string, required)
    Source URL, or an empty string

  - `data.attributes.is_mobile` (integer, required)
    Mobile-origin wire status

  - `data.attributes.comment` (string, required)
    Appointment comment

  - `data.attributes.prepaid_status` (integer, required)
    Prepayment status wire value

  - `data.attributes.record_from` (string, required)
    Human-readable Appointment source, or an empty string

  - `data.attributes.payment_status` (integer | null, required)
    Membership auto-payment status, when available

  - `data.attributes.is_sale_bill_printed` (boolean | null, required)
    Whether the sale bill is printed, when available

  - `data.attributes.is_client_notification_sent` (boolean, required)
    Whether a Booking User notification was sent

  - `data.relationships` (object)
    Present when related data is requested through `include`

  - `data.relationships.client` (object)

  - `data.relationships.client.data` (any, required)

  - `data.relationships.client.data.type` (string, required)

  - `data.relationships.client.data.id` (string, required)

  - `data.relationships.services` (object)

  - `data.relationships.services.data` (array, required)

  - `included` (array)
    Resources requested through `include`, when available

  - `included.type` (string, required)

  - `included.id` (string, required)

  - `included.attributes` (object, required)

  - `included.relationships` (object)

  - `meta` (array, required)
    Empty JSON array returned for an Event Appointment item

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean, required)
    Enum: "false"

  - `data` (null, required)

  - `meta` (object, required)

  - `meta.message` (string, required)

  - `meta.errors` (object)
    Field-level validation errors, when applicable

## Response 403:

  - `403` (unknown)
    Forbidden - No permission to update the Appointment

## Response 403 fields (application/json):

  - `success` (boolean, required)
    Enum: "false"

  - `data` (null, required)

  - `meta` (object, required)

  - `meta.message` (string, required)

  - `meta.errors` (object)
    Field-level validation errors, when applicable

## Response 404:

  - `404` (unknown)
    Location, Event, or Appointment not found

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Enum: "false"

  - `data` (null, required)

  - `meta` (object, required)

  - `meta.message` (string, required)

  - `meta.errors` (object)
    Field-level validation errors, when applicable

## Response 422:

  - `422` (unknown)
    Request validation failed

## Response 422 fields (application/json):

  - `success` (boolean, required)
    Enum: "false"

  - `data` (null, required)

  - `meta` (object, required)

  - `meta.message` (string, required)

  - `meta.errors` (object)
    Field-level validation errors, when applicable

