Skip to main content

How to get vacant slot info with rules

Request

HTTP request

POST  https://api.mykaarma.com/appointment/v2/department/{{departmentUUID}}/vacantTimeSlotInfoWithRules

Parameters

Path parameter:

Parameter NameValueDescriptionRequired
departmentUUIDStringUnique identifier of dealer departmentYes

Request Body

Property NameValueDescriptionRequired
datesSet<String>Dates for which availability needs to be fetched where date is in yyyy-MM-dd format. startDate and numberOfDays will be given preference in fetching availabilities.No
startDateStringStarting date from which availabilities have to be shownYes (No, if dates is provided)
numberOfDaysIntegerNumber of days for which availabilities have to be shown. Maximum number of days for which availability can be fetched is 21Yes (No, if dates is provided)
daIdListList<Long>Dealer Associate ID list for which availability needs to be checkedNo
appointmentUuidStringUUID of the appointment which is selected while fetching availabilitiesNo
callerDaUuidStringUUID of DealerAssociate who is making the requestNot required in the case of third party integration.
isWebSchedulerBooleanA boolean value which tells if the request came from web scheduler or not. This should be sent true for all requests coming in from third party integrations.No
startTimeStringTime from which we want to compute availability. It should be in the format - HH:mm:ssNo
endTimeStringTime till which we want to compute availability. It should be in the format - HH:mm:ssNo
transportOptionCustomNameStringCustom name for the transport option selected. First preference is given to transportOptionUuidList, if it is empty or null then availability is fetched through CustomNameNo
selectedRecallOemIdSetSet<String>Set of OEM IDs of recalls that the user has selectedNo
operationUuidListList<String>List of uuids of selected operations. Given preference to fetch availabilities over laborOpcodeList.No
laborOpcodeListList<String>List of selected labor opcodes. Refer to above operationUuidList definition for preference order.No
teamUuidListList<String>List of uuids of selected teamsNo
transportOptionUuidListList<String>List of uuids of selected transport options. Refer to transportOptionCustomName definition for preference detailsNo
customerInformationObjectContains selected customer information such as - firstName , lastName, company , customerKey, uuid on which rules can applyNo
customerPhonesList<String>List containing selected customer's phone numbersNo
customerEmailsList<String>List containing selected customer's email addressNo
vehicleInformationObjectvehicleInformation is an object which contains the information about the customer vehicle. Here are the description of some of the fields: vin-It is the Vehicle Identification Number used to uniquely identify each vehicle, vehicleKey-Unique token assigned to each vehicle in DMS, vehicleUuid-Unique token assigned to each vehicle in myKaarmaNo

Sample Request model

{
"appointmentUuid": "string",
"callerDaUuid": "80c9166f65eecad91e3855555198156470d9cd3e5d7a95841c3a2a7086d1c87a",
"customerEmails": [
"string"
],
"customerInformation": {
"company": "string",
"customerKey": "string",
"firstName": "string",
"lastName": "string",
"uuid": "SYAucpMne87oAv9to2sQ4WvljeYTqFkMrdtSyklMAuU"
},
"customerPhones": [
"string"
],
"daIdList": [
142846
],
"startDate": "2024-02-01",
"numberOfDays": 21,
"dates": [
"2023-12-28",
"2023-12-29"
],
"dealerUUIDList": [
"039fdebb455231122badd410c61288c1204816098c6c822f495c81e2fae4f70e"
],
"startTime": "16:30:00",
"endTime": "16:39:59",
"isWebScheduler": true,
"operationLeadTimeInMins": 0,
"operationUuidList": [
"Gsg9_HOGn0d5uTb2aB3YTkwC_6xAdmB-rlr0KYfk5h0"
],
"laborOpcodeList" : [
"BFEA"
],
"requesterUserUUID": "string",
"selectedRecallOemIdSet": [
"string"
],
"teamUuidList": [
"string"
],
"transportOptionCustomName": "Shuttle",
"transportOptionUuidList": [
"w5fkIJojY4v-pCn0VBtnCur1AsjPwkH2RHUpf89LiMU"
],
"vehicleInformation": {
"brand": "Audi",
"dealerUuid": "string",
"engine": "string",
"mileage": 10000,
"model": "A3 Quattro",
"trim": "string",
"uuid": "string",
"vehicleKey": "string",
"vin": "string",
"year": "2022"
}
}

Sample Curl

curl --location 'https://api.mykaarma.com/appointment/v2/department/{{departmentUUID}}/vacantTimeSlotInfoWithRules' \
--header 'Authorization: {{basic_auth_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"requesterUserUUID": null,
"dealerUUIDList": null,
"dates": [
"2023-12-27"
],
"daIdList": [
142846
],
"appointmentUuid": null,
"callerDaUuid": "80c9166f65eecad91e3855555198156470d9cd3e5d7a95841c3a2a7086d1c87a",
"isWebScheduler": false,
"startTime": "17:30:00",
"endTime": "17:39:59",
"transportOptionCustomName": null,
"selectedRecallOemIdSet": [],
"operationLeadTimeInMins": null,
"operationUuidList": [],
"teamUuidList": null,
"transportOptionUuidList": [
"Uuid"
],
"customerInformation": {
"firstName": "string",
"lastName": "string",
"company": null,
"customerKey": null,
"uuid": "string"
},
"customerEmails": [
"string"
],
"customerPhones": [
"string"
],
"vehicleInformation": {
"vin": null,
"vehicleKey": null,
"model": "A4 allroad",
"year": "2021",
"brand": "Audi",
"trim": null,
"engine": null,
"mileage": null,
"dealerUuid": null,
"uuid": "tDA9fbgT45HE-k_Emm4ZlL3gPcmcy6zmUZqwRfu2Gg4"
},
"recallConfigsResponse": null
}'

Response

{
"apiError": {
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
},
"apiWarnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
],
"error": {
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
},
"statusCode": 0,
"vacantSlotInfo": [
{
"date": "2023-12-28",
"vacantSlotInfoForDate": {
"142846": [
{
"isVacant": true,
"startTime": "16:30:00",
"warningCodes": [
"APPT_RULE_WARN_CAPACITY_PLANNING_CONSTRAINT_VIOLATED"
],
"warningList": [
"Rule = \"capacity rule\" is violated."
]
}
]
}
}
],
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}

Summary of Response

Parameter NameDescription
vacantSlotInfoIt contains a List of object vacantSlotInfoForDate which contains the availability of particular date
vacantSlotInfoForDateIt contains a key value pair of the selected property with their availability and warningList
142846It is the selected DealerAssociate Id which is used as a key in vacantSlotInfoForDate object and its corresponding value shows the availability of slot whose startTime is 16:30:00 by parameter isVacant, also contains the list of warnings and its corresponding code