How to cancel an Appointment
To cancel an appointment, you can simply use the same endpoint that is used to update an appointment with slightly different parameter values (Majorly, status: "CANCELLED").
- 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 ){{title}}
- Can be a success or a faliure.{{type}}
- Can be a push or a pull.
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":null,
"vehicleInformation":null,
"appointmentInformation": {
"appointmentStartDateTime":"2021-12-24T07:00:00",
"appointmentEndDateTime":"2021-12-24T07:29:59",
"transportOption":null,
"assignedUser":null,
"creatorUser":{
"uuid":{{UUID}},
deptUUID":{{DEPARTMENT_UUID}},
"teamUuid":null
},
"appointmentKey":null,
"mileageText":null,
"comments":null,
"internalNotes":null,
"serviceList":null,
"customerAppointmentPreference": {
"emailConfirmation":null,
"textConfirmation":null,
"emailReminder":null,
"textReminder":null,
"confirmationEmail":null,
"confirmationPhoneNumber":null,
"notifyCustomer":false,
"sendCommunicationToDA":true
},
"status":"CANCELLED",
"recall":null,
"isOverridden":null,
"pushToDms":true,
"draftUuid":null,
"pdrToOpcodes":null
},
"appointmentMetaData":null
}'