How to update an Appointment
You can update appointments in myKaarma for customer visits so that your Service Advisors are aware of the changed schedule and your customers could be notified/reminded for their scheduled visit.
To update an appointment, you have to first the get unique identifier (UUID) of the appointment. This is a patch endpoint, so only detail that has to be updated needs to be sent in the request.
Following details can be updated
- Customer (send the updated customerUuid)
- Vehicle (send the updated vehicleUuid in vehicleInformation)
- Appointment time (send the updated appointmentStartDateTime and appointmentEndDateTime).
- User to which appointment is assigned (send the updated uuid in assignedUser object).
- Transport option (send the updated transportOptionUuid in transportOption object, alternatively you can also send name of the updated transport option in altTransportation in transportOption object)
- Comments related to appointment (comments field), Internal notes related to appointment (internalNotes field), Mileage of the vehicle (mileageText field) are simple string fields.
- Service related to the appointment (serviceList object in the body). Please note that any service that was initially present in the appointment but is not present in update request will be cancelled. So if you plan to add/change a particular service, please fetch the appointment, edit the serviceList accordingly and then send the complete serviceList in the update appointment request.
- Metadata with appointment (appointmentData field in appointmentMetaData object).
On how fetch customer, vehicle or any other parameter, please refer to the create appointment page
The following parameters can help you with forming a proper request to update an appointment:
- Parameters Used:
{{dept_uuid}}
- UUID of department for which you want to fetch the customer.{{test_vin}}
- VIN of the vehicle for which you want to search the customer.{{basic_auth_token}}
- Authorization token generated using your mykaarma credentials.{{dealer_uuid}}
- UUID of dealer for which you want to fetch the customer{{phone_number}}
- Phone number of the customer{{test_vin_customer_uuid}}
- Customer UUID for test VIN (can be computed from 'Get a customer's details' request){{test_vin_vehicle_key}}
- VehicleKey from DMS for test VIN (can be computed from 'vehicles' in 'Get a customer's details' request){{test_vin_vehicle_uuid}}
- Vehicle UUID for test VIN (can be computed from 'vehicles' in 'Get a customer's details' request){{assignee_da_uuid}}
- UUID of the Chosen Advisor (Can be computed from 'Get Advisors' endpoint){{creator_da_uuid}}
- UUID of the advisor creating the Appointment{{customer_email_id}}
- Email ID of customer to be used for appointment related communication{{customer_phone_number}}
- Phone no. of customer to be used for appointment related communication (Example - 9110012345)
- Update Appointment:
{{altTransportation}}
- Custom Name of transport option fetched using 'Get Transport options' endpoint. Example: Loaner{{transportOptionUuid}}
- UUID of transport option fetched using 'Get Transport options' endpoint. Example: -f_LNFHYWiHQg4AbTH-b_qmDTO8CKwknvhCtpYFmbWGw{{transportation}}
- Option Name of transport option fetched using 'Get Transport options' endpoint. Example: Loaner{{appointmentStartDateTime}}
- Start timestamp of the appointment. You can fetch data for valid slots using the 'Get Appointment Slots' endpoint. This data should be in the format same as the example. (Example: 2021-12-24T07:00:00 ){{appointmentEndDateTime}}
- End timestamp of the appointment. This timestamp should be exactly one second less that the beginning of next slot. You can view valid slots using the 'Get Appointment Slots' endpoint. (Example: 2021-12-24T07:29:59 )
curl --location -g --request PATCH 'https://api.mykaarma.com/appointment/v2/department/{{dealerDepartmentUuid}}/appointment/{{appointmentUuid}}' \
--header 'Authorization: {{basic_auth_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerUuid": "{{test_vin_customer_uuid}}",
"vehicleInformation": {
"vin": "{{test_vin}}",
"vehicleKey": {{test_vin_vehicle_key}},
"vehicleUuid": "{{test_vin_vehicle_uuid}}"
},
"appointmentInformation": {
"appointmentStartDateTime": "{{appointment_start_date_time}} e.g. 2021-12-24T07:00:00",
"appointmentEndDateTime": "{{appointment_end_date_time}} e.g. 2021-12-24T07:29:59",
"assignedUser": {
"uuid": "{{assignee_da_uuid}}",
"deptUUID": "{{dept_uuid}}"
},
"creatorUser": {
"uuid": "{{creator_da_uuid}}",
"deptUUID": "{{dept_uuid}}"
},
"serviceList": [
{
"title": "{{laborOpcode}}",
"description": "{{description}}",
"price": "{{price}}"
}
],
"customerAppointmentPreference": {
"emailConfirmation": true,
"textConfirmation": true,
"emailReminder": true,
"textReminder": true,
"confirmationEmail": "{customer_email_id}",
"confirmationPhoneNumber": "{customer_phone_number}"
},
"comments": "Comment String",
"internalNotes": "Internal Note String",
"mileageText": "{{vehicle_mileage}}",
"recall": false,
"transportOption": {
"altTransportation": "{{altTransportation}}",
"transportOptionUuid": {{transportOptionUuid}},
"transportation": "{{transportation}}"
}
},
"appointmentMetaData": {
"dmsMetaData": null,
"appointmentData": null
}
}
'
'