Skip to main content

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 NameValueDescriptionRequired
departmentUUIDStringUnique identifier of dealer departmentYes

Authorization

This request requires the following authorization scopes:

ScopeLevelDescription
appointment.configurationDealerDepartmentAuthorises client to fetch first available slot for the provided dealer department

Request Body

Property NameValueDescriptionRequired
requesterUserUUIDStringUUID of the user who is making this requestNo
dealerUUIDListList<String>List of dealer UUIDs for which we want to compute first available slotNo
platformObjectSpecify the platform from which request is coming. eg - DealerApp , Web etcNo
datesSet<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
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
existingAppointmentUuidStringAppointment UUID when updating an existing appointmentNo
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
vehicleInformationObjectContains information about selected customer's vehicle such as - vin , make , year , model , brand etcNo
selectedAvailabilityAttributesObjectSpecifies the selected attributes based on which availabilities needs to be fetched. These attributes are - dealerAssociateUuidList, transportOptionUuidList,subTransportOptionUuidList,teamUuidListYes, dealerAssociateUuidList is always required and transportOptionUuidList is optional only when service subscriber is mkConsumer. Rest of the fields are optional
allAvailabilityAttributesObjectAll the UUIDs of the attributes which are configured at the dealership . These attributes are - dealerAssociateUuidList, transportOptionUuidList,subTransportOptionUuidList,teamUuidListNo
selectedOperationUuidSetSet<String>Set of opcode/service UUIDs that user has selectedNo
selectedRecallOemIdSetSet<String>Set of OEM IDs of recalls that the user has selectedNo
callerDaUuidStringUUID of dealership personnel who is making this requestRequired if serviceSubscriber = mkDealer Otherwise optional.
subscriberNameStringName of the subscriber from where the request is coming from.No
refreshPanelSelectionStateBooleanIf set to true, it returns the state of panel and categorises each entity - Dealer Associate,Team,Transport Option into either selected , unselected or disabledNo
randomStringIdentifierForEditAppointmentStringAuto generated random identifier which is sent with the request body when editing an appointment through mK desktop schedulerNo

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