update_appointment
Modify or reschedule existing appointments in Shopmonkey by updating details like date, time, customer information, and work order links.
Instructions
Update or reschedule an existing appointment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The appointment ID to update | |
| customerId | No | Customer ID for the appointment | |
| vehicleId | No | Vehicle ID for the appointment | |
| orderId | No | Work order ID to link to | |
| startDate | No | New start date/time (ISO 8601 format) | |
| endDate | No | New end date/time (ISO 8601 format) | |
| title | No | Appointment title or summary | |
| notes | No | Additional notes |
Implementation Reference
- src/tools/appointments.ts:106-111 (handler)Handler function for 'update_appointment' which sends a PATCH request to the shopmonkey API.
async update_appointment(args) { if (!args.id) return { content: [{ type: 'text', text: 'Error: id is required' }], isError: true }; const body = pickFields(args, UPDATE_FIELDS); const data = await shopmonkeyRequest<Appointment>('PATCH', `/appointment/${sanitizePathParam(String(args.id))}`, body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/appointments.ts:45-62 (schema)Input schema definition for the 'update_appointment' tool.
{ name: 'update_appointment', description: 'Update or reschedule an existing appointment.', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'The appointment ID to update' }, customerId: { type: 'string', description: 'Customer ID for the appointment' }, vehicleId: { type: 'string', description: 'Vehicle ID for the appointment' }, orderId: { type: 'string', description: 'Work order ID to link to' }, startDate: { type: 'string', description: 'New start date/time (ISO 8601 format)' }, endDate: { type: 'string', description: 'New end date/time (ISO 8601 format)' }, title: { type: 'string', description: 'Appointment title or summary' }, notes: { type: 'string', description: 'Additional notes' }, }, required: ['id'], }, },