Skip to main content

Service Appointment

Service appointment schema for managing appointment bookings. Supports scheduling, calendar integration, and service provider assignment.

Schema: ServiceAppointmentSchema Source: src/core/business-mgt/service-appointment.schema.ts


Attributes​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the appointment
businessServiceIdstringYes—References Business Service being booked
customerIdstringYes—References Customer who booked
startTimenumberYes—Unix timestamp for appointment start
endTimenumberNo—Unix timestamp for appointment end
durationnumberNo30Appointment length in minutes
totalPricenumberNo0Total service cost
depositPaidnumberNo0Deposit amount already paid
statusenumNoPENDINGCurrent appointment status. One of PENDING, CONFIRMED, IN_PROGRESS, COMPLETED, CANCELLED, or NO_SHOW.
assignedUserAccountIdstring | nullNo—Service Person assigned to perform service
calendarIdstring | nullNo—External calendar system ID
calendarEventIdstring | nullNo—Event ID in external calendar
calendarProviderenum | nullNo—Calendar system type. One of GOOGLE, MICROSOFT, or APPLE.
cancelReasonstring | nullNo—Reason for cancellation
serviceConversationConfigIdstring | nullNo—AI service conversation config ID
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

Example​

{
"id": "appt_abc123",
"businessServiceId": "svc_haircut",
"customerId": "cust_def456",
"startTime": 1709910000000,
"endTime": 1709912700000,
"duration": 45,
"totalPrice": 35.00,
"depositPaid": 10.00,
"status": "CONFIRMED",
"assignedUserAccountId": "user_stylist01",
"calendarId": "cal_primary",
"calendarEventId": "evt_xyz789",
"calendarProvider": "GOOGLE",
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}

Create / Update Schemas​

SchemaDescriptionOmits
CreateServiceAppointmentSchemaFor creating appointmentsid, createdAt, updatedAt, status, cancelReason, serviceConversationConfigId
UpdateServiceAppointmentSchemaFor partial updatesAll fields optional except id