Skip to main content

How to create a draft Appointment

You can create draft appointments in myKaarma and generate consumer scheduler links. Consequently the consumer scheduler link will have all the information supplied in the draft appointment API pre filled.

To create a draft appointment, you first need your credentials. If you don't already have one, head over to the Authentication and Authorization page to see how you can request for credentials from us.

The following endpoints can help you with forming a proper request to create an appointment:

  • Parameters Used:
  1. {{dept_uuid}} - UUID of department for which you want to fetch the customer.
  2. {{test_vin}} - VIN of the vehicle for which you want to search the customer.
  3. {{basic_auth_token}} - Authorization token generated using your mykaarma credentials.
  4. {{dealer_uuid}} - UUID of dealer for which you want to fetch the customer
  5. {{test_vin_customer_uuid}} - Customer UUID for test VIN (can be computed from 'Get a customer's details' request)
  6. {{test_vin_vehicle_uuid}} - Vehicle UUID for test VIN (can be computed from 'vehicles' in 'Get a customer's details' request)
  7. {{assignee_da_uuid}} - UUID of the Chosen Advisor (Can be computed from 'Get Advisors' endpoint)
  8. {{creator_da_uuid}} - UUID of the advisor creating the Appointment
  9. {{customer_email_id}} - Email ID of customer to be used for appointment related communication
  10. {{customer_phone_number}} - Phone no. of customer to be used for appointment related communication (Example - +19110012345)
  • Search for a Customer
curl --location --request GET 'https://api.mykaarma.com/customer/v2/department/{{dept_uuid}}/customer/list?searchTerm={{test_vin}}&searchPreference=vehicle&maxResults=50' \
--header 'Authorization: {{basic_auth_token}}'

More details on customer search https://docs.mykaarma.com/our-products/integration/customer/how-to-get-a-list-of-customers

  • Match a customer's details: You may get multiple customer responses from search and you will need to do matching on your side to find one customer UUID and Vehicle UUID to be supplied to draft appointment API. We recommend using a combination of Vehicle VIN and Customer LastName to uniquely identify a customer.
  • Optional - Get Opcodes:
curl --location --request POST 'https://api.mykaarma.com/appointment/v2/department/{{dept_uuid}}/fetch/opcodes' \
--header 'Authorization: {{basic_auth_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"communicationCodes": [],
"dealerAppSchedulerVisibility": null,
"dealerUUIDList": [],
"endPosition": null,
"eventDealerAssociateUuid": null,
"getMkAndDmsSimilarOpcodeCount": true,
"getTotalCount": true,
"isLastPage": true,
"mobileServiceVisibility": null,
"onlineSchedulerVisibility": true,
"opCodes": [],
"requesterUserUUID": "string",
"resultSize": null,
"searchToken": null,
"serviceCartVisibility": null,
"sortDirection": "ASCENDING",
"sortPreference": "OPCODE",
"startPosition": 0,
"uuidList": []
}'
  • Optional - Get Advisors:
curl --location --request GET 'https://api.mykaarma.com/appointment/v2/dealer/{{dealer_uuid}}/eligibleAdvisor/list' \
--header 'Authorization: {{basic_auth_token}}'
  • Optional - Get Transport options:
curl --location --request GET 'https://api.mykaarma.com/appointment/v2/department/{{dept_uuid}}/transportOption/list' \
--header 'Authorization: {{basic_auth_token}}'
  • Optional - Get Appointment Slots:
  1. {{dealerDepartmentUuid}} - Department Uuid of the user who wants to see the available slots
curl --location 'https://api.mykaarma.com/appointment/v2/department/{{dealerDepartmentUuid}}/availability' \
--header 'Authorization: Basic {{basic_auth_token}}' \
--header 'Content-Type: application/json'
--data '{
"requesterUserUUID": "string",
"dealerUUIDList": "string",
"platform": {
"id": 0,
"name": ""string""
},
"dates": [
"string"
],
"startTime": "string",
"endTime": "string",
"existingAppointmentUuid": "string",
"customerInformation": {
"firstName": "string",
"lastName": "string",
"company": "string",
"customerKey": "string",
"uuid": "string"
},
"customerPhones": [
"string"
],
"customerEmails": [
"string"
],
"vehicleInformation": {
"brand": "string",
"dealerUuid": "string",
"engine": "string",
"mileage": 10000,
"model": "string",
"trim": "string",
"uuid": "string",
"vehicleKey": "string",
"vin": "string",
"year": "string"
},
"selectedAvailabilityAttributes": {
"dealerAssociateUuidList": [
"string"
],
"transportOptionUuidList": [
"string"
],
"subTransportOptionUuidList": "string",
"teamUuidList": [
"string"
]
},
"allAvailabilityAttributes": {
"dealerAssociateUuidList": [
"string"
],
"transportOptionUuidList": [
"string"
],
"subTransportOptionUuidList": null,
"teamUuidList": [
"string"
]
},
"selectedOperationUuidSet": [
"string"
],
"selectedRecallOemIdSet": [],
"callerDaUuid": "string",
"subscriberName": "string",
"refreshPanelSelectionState": true,
"randomStringIdentifierForEditAppointment": "string"
}'

For detailed explanation please go through https://docs.mykaarma.com/our-products/scheduler/API/how-to-use-getResourceAvailability

  • Create draft Appointment:
curl --location 'https://api.mykaarma.com/appointment/v2/dealer/{{dealer_uuid}}/draftAppointment' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '{
"appointmentCommunicationPreference": {
"emailConfirmation": true,
"emailReminder": true,
"notifyCustomer": true,
"sendCommunicationToDA": true,
"textConfirmation": true,
"textReminder": true
},
"appointmentEndDateTime": "",
"appointmentStartDateTime": "",
"assignedAdvisorUuid": "",
"opCodes": [
{
"laborOpCode": "DUMMYOPCODE",
"description": "mykDescription",
"price": ""
}
],
"preFilledLinkMetaData":{
"source": "email"
},
"customerDetails": {
"uuid":"{{test_vin_customer_uuid}}",
"vehicleIdentifiers": {
"uuid":"{{test_vin_vehicle_uuid}}"
}
},
"transportOption": "",
"note": "testing appt creation",
"expiry": ""
}
'