# Appointments [Visits in the product knowledge base](https://alteg.io/en/support/knowledge-base/24496357742749-new-visit-window/) Appointment and visit management. **Key concepts:** - **Appointment (record)** — A single scheduled service for a client with a specific team member at a specific time - **Visit** — A container that groups multiple appointments when a client books several services in one session **Example:** Client books haircut + coloring → 1 visit containing 2 appointments This section covers creating, modifying, and managing both individual appointments and visit containers. ## Get list of appointments - [GET /v1/records/{location_id}](https://developer.alteg.io/en/appointments/get_appointment_list.md): #### Filtering Appointments + staff_id: team member ID. Use this to retrieve appointments for a specific team member + client_id: Client ID Use this to retrieve appointments for a specific client + created_user_id: User ID User who created the appointment Use this to filter appointments created by a specific user + start_date: Session start date (inclusive) Returns appointments with a session starting on or after this date + end_date: Session end date (inclusive) Returns appointments with a session ending on or before this date + c_start_date: Appointment creation date from Returns appointments created on or after this date + c_end_date: Appointment creation date until Returns appointments created on or before this date + changed_after: Modified or created after this datetime Returns appointments created or modified after the specified date and time + changed_before: Modified or created before this datetime Returns appointments created or modified before the specified date and time ## Create a New Appointment - [POST /v1/records/{location_id}](https://developer.alteg.io/en/appointments/create_appointment.md): When creating an appointment for a group event, the event_id parameter becomes mandatory. In this case, the following parameters become optional: + staff_id + services + datetime + session_length Custom fields You can pass custom values using custom fields created specifically for your location (see the "Custom Fields" section for setup details). Once created, these fields can be included in the custom_fields object when creating an appointment. Each key in this object must match the code of the corresponding custom field. Example: * If your location has the following custom fields: my_custom_field with type="number" some_another_field with type="list" * You can pass their values during appointment creation as follows: custom_fields: { "my_custom_field": 123, "some_another_field": ["first value", "second value"] } * When this appointment is later retrieved using the GET method, the same custom field values will be returned in the response. ## Get an Appointment - [GET /v1/record/{location_id}/{record_id}](https://developer.alteg.io/en/appointments/get_appointment.md) ## Edit Appointment - [PUT /v1/record/{location_id}/{record_id}](https://developer.alteg.io/en/appointments/update_appointment.md): When an appointment is changed in a group event, the event_id parameter becomes required, staff_id, services, datetime, session_length parameters become optional ## Delete Appointment - [DELETE /v1/record/{location_id}/{record_id}](https://developer.alteg.io/en/appointments/delete_appointment.md) ## Get a List of Partner Appointments - [GET /v1/records/partner](https://developer.alteg.io/en/appointments/get_partner_appointment_list.md): #### Filtering appointments + salon_id: Location ID Use this to filter appointments for a specific location + start_date: Visit date from Filters appointments with a visit date starting from the specified date (inclusive) + end_date: Visit date until Filters appointments with a visit date up to the specified date (inclusive) + created_start_date: Appointment creation date from Filters appointments created on or after this date + created_end_date: Appointment creation date until Returns appointments created on or before this date + user_id: User ID Filters appointments created by a specific user ## Get a visit - [GET /v1/visits/{visit_id}](https://developer.alteg.io/en/appointments/get_visit.md) ## Get Visit Details - [GET /v1/visit/details/{location_id}/{record_id}/{visit_id}](https://developer.alteg.io/en/appointments/get_visit_details.md): Block "kkm_transaction_details_container" Flag "last_operation_type" | Meaning | Description | | ------------- | ------------- | | 0 | Print return receipt | | 1 | Print sales receipt | Types of all transactions with location account | Meaning | Description | | ------------- | ------------- | | 0 | Sales operation – Active for documents of type Visit | | 1 | Sale return operation – Active for documents of type Visit | | 2 | Correction operation | | 4 | Shift opening operation – Opens a new POS shift | | 5 | Shift closing operation – Closes the current POS shift | | 9 | Get POS status – Retrieves the current status of the POS device | | 11 | Get POS team status – Retrieves the status of all POS devices connected to the team | | 12 | Correction operation | | 13 | Print X-report – Prints a non-fiscal summary report of the current shift | | 6 | Cash deposit – Registers a cash-in transaction in the POS | | 7 | Cash withdrawal – Registers a cash-out transaction in the POS | Statuses of All POS Operations | Meaning | Description | | ------------- | ------------- | | 0 | Connection error with POS – Unable to establish a connection with the POS device | | 1 | Success – Operation completed successfully | | 2 | Sent for printing – The request has been sent to the POS and is waiting for print completion | | 3 | Runtime error – An error occurred while processing the operation on the POS device | | 4 | Status check error – Failed to retrieve the current status of the POS | | 5 | Waiting for POS readiness – Operation is pending until the POS device becomes ready | Document Types | Meaning | Description | | ------------- | ------------- | | 1 | Sale of products | | 2 | Provision of services | | 3 | Arrival of products | | 4 | Products write-off | | 5 | Transfer of products | | 6 | Inventory | | 7 | Visit | | 8 | Consumables write-off | ## Edit Visit - [PUT /v1/visits/{visit_id}/{record_id}](https://developer.alteg.io/en/appointments/update_visit.md) ## Receipt PDF for the visit - [GET /v1/attendance/receipt_print/{visit_id}](https://developer.alteg.io/en/appointments/get_visit_receipt_pdf.md) ## Get comments - [GET /v1/comments/{location_id}](https://developer.alteg.io/en/appointments/get_comments.md): The comment object has the following fields: | Field | Type | Description | | ------------- | ------------- | ------------- | | id | number | Comment ID | | salon_id | number | location ID | | type | number | 1 - comment to the team member, 0 - to the location | | master_id | number | Team Member ID if type = 1 | | text | string | Comment text | | date | string | Date when the comment was left | | rating | number | Rating (from 1 to 5) | | user_id | number | Id of the user who left the comment | | username | string | Name of the user who left the comment | | user_avatar | string | Avatar of the user who left the comment | | record_id | number | ID of the post after which the review was left (the value will be non-zero if the review was left through a link asking for a review after the visit) | ## Leave a Comment - [POST /v1/comments/{location_id}/{team_member_id}](https://developer.alteg.io/en/appointments/leave_comment.md) ## Create Recurring Appointments - [POST /v1/company/{location_id}/schedules/{schedule_id}/client_schedules](https://developer.alteg.io/en/appointments/create_timetable_client_schedule.md): Creates a recurring appointment series for a client based on an event schedule. Automatically generates future appointments according to the schedule pattern. ## Update Recurring Appointments - [PATCH /v1/company/{location_id}/schedules/{schedule_id}/client_schedules/{client_schedule_id}](https://developer.alteg.io/en/appointments/update_timetable_client_schedule.md): Updates a recurring appointment series by attaching or detaching schedule days. This creates or removes future appointments accordingly. ## Delete Recurring Appointments - [DELETE /v1/company/{location_id}/schedules/{schedule_id}/client_schedules/{client_schedule_id}](https://developer.alteg.io/en/appointments/delete_timetable_client_schedule.md): Deletes a recurring appointment series and all associated future appointments.