How to get the first available slot
Get the first available slot to schedule appointments as per the selected attributes including advisor, transport option, team, opcodes, recalls, customer and their chosen vehicle.
Request
HTTP request
POST https://api.mykaarma.com/appointment/v2/department//first-available-slot
Parameters
Path parameters:
Parameter Name | Value | Description | Required |
---|---|---|---|
departmentUUID | String | Unique identifier of dealer department | Yes |
Authorization
This request requires the following authorization scopes:
Scope | Level | Description |
---|---|---|
appointment.configuration | DealerDepartment | Authorises client to fetch first available slot for the provided dealer department |
Request Body
Property Name | Value | Description | Required |
---|---|---|---|
requesterUserUUID | String | UUID of the user who is making this request | No |
dealerUUIDList | List<String> | List of dealer UUIDs for which we want to compute first available slot | No |
platform | Object | Specify the platform from which request is coming. eg - DealerApp , Web etc | No |
dates | Set<String> | Set containing only the start date (in yyyy-MM-dd format) from which the first available slot needs to be found. If null, first available slot is computed from the present date up until 90 days. | 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 |
existingAppointmentUuid | String | Appointment UUID when updating an existing appointment | 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 | Contains information about selected customer's vehicle such as - vin , make , year , model , brand etc | No |
selectedAvailabilityAttributes | Object | Specifies the selected attributes based on which availabilities needs to be fetched. These attributes are - dealerAssociateUuidList , transportOptionUuidList ,subTransportOptionUuidList ,teamUuidList | Yes, dealerAssociateUuidList is always required and transportOptionUuidList is optional only when service subscriber is mkConsumer . Rest of the fields are optional |
allAvailabilityAttributes | Object | All the UUIDs of the attributes which are configured at the dealership . These attributes are - dealerAssociateUuidList , transportOptionUuidList ,subTransportOptionUuidList ,teamUuidList | No |
selectedOperationUuidSet | Set<String> | Set of opcode/service UUIDs that user has selected | No |
selectedRecallOemIdSet | Set<String> | Set of OEM IDs of recalls that the user has selected | No |
callerDaUuid | String | UUID of dealership personnel who is making this request | Required if serviceSubscriber = mkDealer Otherwise optional. |
subscriberName | String | Name of the subscriber from where the request is coming from. | No |
refreshPanelSelectionState | Boolean | If set to true, it returns the state of panel and categorises each entity - Dealer Associate ,Team ,Transport Option into either selected , unselected or disabled | No |
randomStringIdentifierForEditAppointment | String | Auto generated random identifier which is sent with the request body when editing an appointment through mK desktop scheduler | No |
Sample Request Model
{
"allAvailabilityAttributes": {
"dealerAssociateUuidList": [
"string"
],
"subTransportOptionUuidList": [
"string"
],
"teamUuidList": [
"string"
],
"transportOptionUuidList": [
"string"
]
},
"callerDaUuid": "string",
"customerEmails": [
"string"
],
"customerInformation": {
"company": "string",
"customerKey": "string",
"firstName": "string",
"lastName": "string",
"uuid": "string"
},
"customerPhones": [
"string"
],
"dates": [
"string"
],
"dealerUUIDList": [
"string"
],
"endTime": "string",
"existingAppointmentUuid": "string",
"platform": {
"id": integer,
"name": "string"
},
"randomStringIdentifierForEditAppointment": "string",
"refreshPanelSelectionState": true,
"requesterUserUUID": "string",
"selectedAvailabilityAttributes": {
"dealerAssociateUuidList": [
"string"
],
"subTransportOptionUuidList": [
"string"
],
"teamUuidList": [
"string"
],
"transportOptionUuidList": [
"string"
]
},
"selectedOperationUuidSet": [
"string"
],
"selectedRecallOemIdSet": [
"string"
],
"startTime": "string",
"subscriberName": "string",
"vehicleInformation": {
"brand": "string",
"dealerUuid": "string",
"engine": "string",
"mileage": "string",
"model": "string",
"trim": "string",
"uuid": "string",
"vehicleKey": "string",
"vin": "string",
"year": "string"
}
}
Sample Curl
curl --location 'https://api.mykaarma.com/appointment/v2/department/{{departmentUUID}}/first-available-slot' \
--header 'Authorization: {{basic_auth_token}}' \
--header 'Content-Type: application/json' \
--data '{
"requesterUserUUID": null,
"dealerUUIDList": null,
"platform": {
"id": null,
"name": "DealerApp"
},
"dates": null
"startTime": null,
"endTime": null,
"existingAppointmentUuid": null,
"customerInformation": null,
"customerPhones": null,
"customerEmails": null,
"vehicleInformation": null,
"selectedAvailabilityAttributes": {
"dealerAssociateUuidList": [
"64e07c212f74cf630f9f709fdc321d58e60433227bd5ad8758dfd9c8276fc473"
],
"transportOptionUuidList": [
"Uuid"
],
"subTransportOptionUuidList": null,
"teamUuidList": [
"XHXK76_bW2yRzGIp3uJsLno4HOmrOKpLIlraMD7jn3s"
]
},
"allAvailabilityAttributes": {
"dealerAssociateUuidList": [
"64e07c212f74cf630f9f709fdc321d58e60433227bd5ad8758dfd9c8276fc473",
"e946917fed3fdb82a8b1ace3aa55647cbbcd678e68f2ea50d1a2537a5865d9ff",
"d2d73272312a7868d219fd7b181697a23757222a01cafde3ef9b8b4cf78d20cb",
"2b54e0313aa6e4351d2cce3e5f133c768ca3c224403b8ade9709f502296288b5"
],
"transportOptionUuidList": [
"w5fkIJojY4v-pCn0VBtnCur1AsjPwkH2RHUpf89LiMU",
"qhLQ5MDZWWsZOwy_YEtuvPhz6ZliEkjcrHSqFYdI-o0",
"CjaK5wAvBDG7Di6XAt6RpllbGtz9SiHoBzM2vDiFa9Q",
"Uuid"
],
"subTransportOptionUuidList": null,
"teamUuidList": [
"XHXK76_bW2yRzGIp3uJsLno4HOmrOKpLIlraMD7jn3s",
"ALL_ADVISORS_UUID"
]
},
"selectedOperationUuidSet": ["3V9k8y8f9Rr3p_L7Rgu7kr982vCDoyFyy2Oc1QMmln8","nQisOp04babYr7FpBBZfqOgda3q5VUcOfYakw1mntMY"],
"selectedRecallOemIdSet": [],
"callerDaUuid": "5b372a12f3b33348f096bdd0ee38cbf8d84b25a9c128edad4ff0462d0b3603fd",
"subscriberName": null,
"refreshPanelSelectionState": null,
"randomStringIdentifierForEditAppointment": null
}'
Response
{
"dateTime": "string",
"error": {
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
},
"statusCode": 0,
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}
Response Summary
dateTime
- String of the format yyyy-MM-dd HH:mm:ss
signifying the date and time of the first available slot