Skip to main content

How to create a draft Appointment

Create a sample draft appointment and generate a short URL for consumer scheduler with pre-filled information.

Request

HTTP request

POST https://api.mykaarma.com/appointment/v2/dealer/{dealerUuid}/draftAppointment

Parameters

Path parameter:

Parameter NameValueDescriptionRequired
dealerUuidStringUnique identifier of dealerYes

Authorization

This request requires the following authorization scopes:

ScopeLevelDescription
appointment.draft.createDealerAuthorizes client to create draft appointments for a dealer

Request Body

Property NameValueDescriptionRequired
appointmentCommunicationPreferenceObjectCommunication preferences for the appointmentNo
appointmentEndDateTimeStringThe preferred end date-time of the appointment in yyyy-MM-ddTHH:mm:ss formatNo
appointmentStartDateTimeStringThe preferred start date-time of the appointment in yyyy-MM-ddTHH:mm:ss formatYes
assignedAdvisorUuidStringUUID of the advisor to whom appointment will be assigned. Get from eligible advisors APINo
opCodesArrayList of operation codes/services for the appointmentNo
customerDetailsObjectDetails of the customer and vehicleYes
transportOptionStringUUID of the transport option. Get from transport options APINo
noteStringAdditional notes for the appointmentNo
expiryStringExpiry date-time for the draft appointment in yyyy-MM-ddTHH:mm:ss formatNo

Explaining objects in request body

appointmentCommunicationPreference

Property NameValueDescriptionRequired
emailConfirmationBooleanWhether to send email confirmationNo
emailReminderBooleanWhether to send email reminderNo
notifyCustomerBooleanWhether to notify customer about appointmentNo
sendCommunicationToDABooleanWhether to send communications to dealer associateNo
textConfirmationBooleanWhether to send text confirmationNo
textReminderBooleanWhether to send text reminderNo

Note: If you don't want any communication to be sent, you can omit this object or set all values to false.

opCodes

Property NameValueDescriptionRequired
laborOpCodeStringOperation code for the serviceNo
descriptionStringDescription of the serviceNo
opCodeNameStringName of the opcodeNo
operationUuidStringUnique token assigned to an operationNo

Note: Operation codes can be obtained from the Opcodes API. At minimum, provide the laborOpCode.

customerDetails

Property NameValueDescriptionRequired
uuidStringCustomer's UUID in myKaarma. Get from customer search APIYes
vehicleIdentifiersObjectVehicle identification informationYes
vehicleIdentifiers
Property NameValueDescriptionRequired
uuidStringVehicle's UUID in myKaarmaNo
vinStringVehicle Identification NumberNo

Note: For vehicle identification, you can provide either the uuid or vin. At least one of these fields must be provided.

Sample Curl with VIN

curl --location 'https://api.mykaarma.com/appointment/v2/dealer/{{dealer_uuid}}/draftAppointment' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{basic_auth_token}}' \
--data '{
"appointmentCommunicationPreference": {
"emailConfirmation": true,
"emailReminder": true,
"notifyCustomer": true,
"sendCommunicationToDA": true,
"textConfirmation": true,
"textReminder": true
},
"appointmentEndDateTime": "2024-01-01T10:00:00",
"appointmentStartDateTime": "2024-01-01T09:00:00",
"assignedAdvisorUuid": "{{advisor_uuid}}",
"opCodes": [
{
"laborOpCode": "OIL_CHANGE",
"description": "Oil Change Service",
"opCodeName": "Oil Change"
}
],
"customerDetails": {
"uuid": "{{customer_uuid}}",
"vehicleIdentifiers": {
"vin": "1HGCM82633A123456"
}
},
"transportOption": "{{transport_option_uuid}}",
"note": "Regular maintenance service",
"expiry": "2024-02-01T00:00:00"
}'

Sample Curl with Vehicle UUID

curl --location 'https://api.mykaarma.com/appointment/v2/dealer/{{dealer_uuid}}/draftAppointment' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{basic_auth_token}}' \
--data '{
"appointmentCommunicationPreference": {
"emailConfirmation": true,
"emailReminder": true,
"notifyCustomer": true,
"sendCommunicationToDA": true,
"textConfirmation": true,
"textReminder": true
},
"appointmentEndDateTime": "2024-01-01T10:00:00",
"appointmentStartDateTime": "2024-01-01T09:00:00",
"assignedAdvisorUuid": "{{advisor_uuid}}",
"opCodes": [
{
"laborOpCode": "OIL_CHANGE",
"description": "Oil Change Service",
"opCodeName": "Oil Change"
}
],
"customerDetails": {
"uuid": "{{customer_uuid}}",
"vehicleIdentifiers": {
"uuid": "{{vehicle_uuid}}",
"vin": "{{vehicle_vin}}
}
},
"transportOption": "{{transport_option_uuid}}",
"note": "Regular maintenance service",
"expiry": "2024-02-01T00:00:00"
}'

Response

{
"statusCode": 0,
"draftAppointmentUuid": "string",
"shortUrl": "string",
"error": {
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
},
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}