Skip to main content

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:
  1. {{altTransportation}} - Custom Name of transport option fetched using 'Get Transport options' endpoint. Example: Loaner
  2. {{transportOptionUuid}} - UUID of transport option fetched using 'Get Transport options' endpoint. Example: -f_LNFHYWiHQg4AbTH-b_qmDTO8CKwknvhCtpYFmbWGw
  3. {{transportation}} - Option Name of transport option fetched using 'Get Transport options' endpoint. Example: Loaner
  4. {{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 )
  5. {{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 )
  6. {{title}} - Can be a success or a faliure.
  7. {{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,
"sarCheckinDataDTO":null
},
"appointmentMetaData":null
}'