Skip to main content

How to get the list of DealerAssociates in a department

This document is designed to help you understand how to retrieve the list of active DealerAssociates in a department, one page at a time. To get this data, you first need your credentials. If you don't already have one, head over to the Authentication and Authorization page to see how you can request for credentials from us. Use the endpoint below to fetch a paginated list of active DealerAssociates for a given Department UUID. Each DealerAssociate is returned with minimal details: identifiers, name, email address and role.

Request​

HTTP request​

GET  https://api.mykaarma.com/manage/v2/department/{departmentUUID}/dealerAssociate/list?page={page}&resultSize={resultSize}

Parameters​

Path parameter:​

Parameter NameValueDescriptionRequired
departmentUUIDStringUnique identifier of departmentYes

Query parameters:​

Parameter NameValueDescriptionRequired
pageIntegerZero-based page number. Defaults to 0No
resultSizeIntegerNumber of DealerAssociates per page. Defaults to 25. Values above 100 are capped at 100No

Authorization​

This request requires the following authorization scopes:

ScopeLevelDescription
manage.dealerassociate.minimal.readDepartmentAuthorises client to read minimal dealerassociate data for the department

Curl​

curl -X 'GET' \
'https://api.mykaarma.com/manage/v2/department/{departmentUUID}/dealerAssociate/list?page=0&resultSize=25' \
-H 'accept: application/json' \
-H 'Authorization: {{basic_auth_token}}'

This endpoint does not take a request body.

Pagination​

  • Only active DealerAssociates are returned. Inactive DealerAssociates are not included in the list or in totalElements.
  • Results are returned in a fixed order, so the same page and resultSize return the same DealerAssociates across requests, as long as the department's DealerAssociates have not changed.
  • To fetch all DealerAssociates, start with page=0 and keep incrementing page until it reaches totalPages.
  • If resultSize is above 100, the response uses 100, and the resultSize field in the response shows 100.
  • A page beyond the last page returns an empty dealerAssociates list.

Response​

{
"errors": [
{
"errorCode": 0,
"errorTitle": "string",
"errorMessage": "string"
}
],
"warnings": [
{
"warningCode": 0,
"warningTitle": "string",
"warningMessage": "string"
}
],
"apiRequestId": "string",
"departmentUuid": "string",
"page": 0,
"resultSize": 0,
"totalElements": 0,
"totalPages": 0,
"dealerAssociates": [
{
"uuid": "string",
"userUuid": "string",
"firstName": "string",
"lastName": "string",
"emailAddress": "string",
"role": {
"roleName": "string",
"roleAcronym": "string"
},
"isValid": true
}
]
}

Sample Response​

Success​

{
"errors": [],
"warnings": [],
"apiRequestId": "b20f3c992ede64c934c28ddedf36655c",
"departmentUuid": "69cda869306bb35ecb6c1fed25df6d3da63bd80d0ddc273ed2edc58576a96e04",
"page": 0,
"resultSize": 25,
"totalElements": 2,
"totalPages": 1,
"dealerAssociates": [
{
"uuid": "9a3de39733b1f37273de6c6cc10bd4c7",
"userUuid": "39025afdde045dc8b34d910ada652afb",
"firstName": "John",
"lastName": "Doe",
"emailAddress": "john.doe@example.com",
"role": {
"roleName": "Service Advisor",
"roleAcronym": "SA"
},
"isValid": true
},
{
"uuid": "68bf1cdba314966e36a320ae5460818d",
"userUuid": "546ff8031692d4c08cfdd4b9c71f5c36",
"firstName": "Jane",
"lastName": "Smith",
"emailAddress": "jane.smith@example.com",
"role": {
"roleName": "Service Manager",
"roleAcronym": "SM"
},
"isValid": true
}
]
}

Response Object Explanation​

FieldTypeDescription
departmentUuidStringUnique identifier of the department, as passed in the request
pageIntegerZero-based page number of this response
resultSizeIntegerPage size used for this response, after capping at 100
totalElementsLongTotal number of active DealerAssociates in the department. null if the request had an invalid page or resultSize
totalPagesIntegerTotal number of pages for the given resultSize. null if the request had an invalid page or resultSize
dealerAssociatesList<DealerAssociate>DealerAssociates on this page. null if the request had an invalid page or resultSize
dealerAssociates.uuidStringUnique identifier of the DealerAssociate
dealerAssociates.userUuidStringUnique identifier of the user linked to the DealerAssociate
dealerAssociates.firstNameStringFirst name of the DealerAssociate
dealerAssociates.lastNameStringLast name of the DealerAssociate
dealerAssociates.emailAddressStringEmail address of the DealerAssociate
dealerAssociates.role.roleNameStringName of the DealerAssociate's role
dealerAssociates.role.roleAcronymStringShort form of the DealerAssociate's role
dealerAssociates.isValidBooleanWhether the DealerAssociate is active. Always true for this endpoint
errorsList<Error>Error details, if the request failed
warningsList<Warning>Warning details, if any
apiRequestIdStringUnique identifier of the request

Errors​

HTTP StatusError CodeError TitleWhen
200100175INVALID_PAGE_NUMBERpage is negative
200100248INVALID_PAGE_SIZEresultSize is less than 1
401Credentials are missing or invalid
403100004REQUEST_NOT_AUTHORIZEDCredentials do not have the manage.dealerassociate.minimal.read scope for this department
403100017INVALID_DEPARTMENT_TOKENNo department exists with the given departmentUUID
403100038INVALID_REQUEST_DEALER_INVALIDThe department's dealer is inactive

Important Note​

  • Invalid page and resultSize values return HTTP 200 with the error in errors. Always check errors before reading dealerAssociates.