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 Name | Value | Description | Required |
---|---|---|---|
departmentUUID | String | Unique identifier of dealer department | Yes |
Request Body
Property Name | Value | Description | Required |
---|---|---|---|
dates | Set<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 |
startDate | String | Starting date from which availabilities have to be shown | Yes (No, if dates is provided) |
numberOfDays | Integer | Number of days for which availabilities have to be shown. Maximum number of days for which availability can be fetched is 21 | Yes (No, if dates is provided) |
daIdList | List<Long> | Dealer Associate ID list for which availability needs to be checked | No |
appointmentUuid | String | UUID of the appointment which is selected while fetching availabilities | No |
callerDaUuid | String | UUID of DealerAssociate who is making the request | Not required in the case of third party integration. |
isWebScheduler | Boolean | A 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 |
startTime | String | Time from which we want to compute availability. It should be in the format - HH:mm:ss | No |
endTime | String | Time till which we want to compute availability. It should be in the format - HH:mm:ss | No |
transportOptionCustomName | String | Custom name for the transport option selected. First preference is given to transportOptionUuidList , if it is empty or null then availability is fetched through CustomName | No |
selectedRecallOemIdSet | Set<String> | Set of OEM IDs of recalls that the user has selected | No |
operationUuidList | List<String> | List of uuids of selected operations. Given preference to fetch availabilities over laborOpcodeList. | No |
laborOpcodeList | List<String> | List of selected labor opcodes. Refer to above operationUuidList definition for preference order. | No |
teamUuidList | List<String> | List of uuids of selected teams | No |
transportOptionUuidList | List<String> | List of uuids of selected transport options. Refer to transportOptionCustomName definition for preference details | No |
customerInformation | Object | Contains selected customer information such as - firstName , lastName , company , customerKey , uuid on which rules can apply | No |
customerPhones | List<String> | List containing selected customer's phone numbers | No |
customerEmails | List<String> | List containing selected customer's email address | No |
vehicleInformation | Object | vehicleInformation 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 myKaarma | No |
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 Name | Description |
---|---|
vacantSlotInfo | It contains a List of object vacantSlotInfoForDate which contains the availability of particular date |
vacantSlotInfoForDate | It contains a key value pair of the selected property with their availability and warningList |
142846 | It 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 |