Skip to main content

How to Update MPI

This document is designed to help you understand how you can update a Multipoint Inspection (MPI). To use this endpoint, 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.

Request

HTTP Request

PATCH https://api.mykaarma.com/scprocessor/mpi/v1/dealer-departments/{dealer-department-uuid}/multiPointInspections/{mpiUUID}

Parameters

Required path parameters:

Parameter NameValueDescription
dealer-department-uuidstringUUID of the dealer department
mpiUUIDstringUUID of the multipoint inspection containing the recommendations

Authorization

This request requires the following authorization scopes:

ScopeLevelDescription
multipoint.inspection.updateDealerDepartmentAuthorizes client to update multipoint inspection recommendations

Request Body

The request body contains the following properties:

PropertyTypeRequiredDescription
dealerAssociateUuidstringYesUUID of the dealer associate making the update. Required for changelog tracking. The dealer associate name is automatically fetched using this UUID and the department UUID from the path.
recommendationsarrayYesList of recommendations to update
recommendations[].recommendationUuidstringYesUUID of the recommendation to update
recommendations[].approvalStatestringNoThe approval state to set. Valid values: APPROVED, DECLINED, NONE, MORE INFO REQUESTED

Important Notes

Quick Summary
  1. This endpoint allows you to update multiple recommendations within an MPI in a single API call.
  2. dealerAssociateUuid is required - This field is used for changelog tracking and must be provided in every request.
  3. The approvalState property indicates the decision status for each recommendation:
    • APPROVED - Customer/dealer approved the recommendation
    • DECLINED - Customer/dealer declined the recommendation
    • NONE - No decision yet
    • MORE INFO REQUESTED - Customer requested more information
  4. When approvalState is updated, the system automatically sets isApprovedDeclinedByDealerAssociate to true to indicate the action was performed by a dealer associate.
  5. The lastUpdatedBy field on each recommendation is automatically set with the dealer associate UUID and name.
  6. To get the recommendationUuid values, first fetch the MPI using the How to get a MPI endpoint. The recommendation UUIDs can be found at:
    multiPointInspection.mpiSections[].checks[].recommendations[].uuid
  7. This endpoint is designed to be extensible - additional recommendation fields may be added in future updates.

Examples

Example 1: Approve Multiple Recommendations

curl -X PATCH "https://api.mykaarma.com/scprocessor/mpi/v1/dealer-departments/dept-uuid-123/multiPointInspections/mpi-uuid-456" \
-H "accept: application/json" \
-H "content-type: application/json" \
-u "{{username}}:{{password}}" \
-d '{
"dealerAssociateUuid": "da-uuid-123",
"recommendations": [
{
"recommendationUuid": "rec-uuid-1",
"approvalState": "APPROVED"
},
{
"recommendationUuid": "rec-uuid-2",
"approvalState": "APPROVED"
}
]
}'

Example 2: Mixed Approval States

curl -X PATCH "https://api.mykaarma.com/scprocessor/mpi/v1/dealer-departments/dept-uuid-123/multiPointInspections/mpi-uuid-456" \
-H "accept: application/json" \
-H "content-type: application/json" \
-u "{{username}}:{{password}}" \
-d '{
"dealerAssociateUuid": "da-uuid-123",
"recommendations": [
{
"recommendationUuid": "rec-uuid-1",
"approvalState": "APPROVED"
},
{
"recommendationUuid": "rec-uuid-2",
"approvalState": "DECLINED"
},
{
"recommendationUuid": "rec-uuid-3",
"approvalState": "MORE INFO REQUESTED"
}
]
}'

Response

{
"errors": [
{
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
}
],
"statusCode": "integer",
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}

Response Fields

FieldTypeDescription
statusCodeintegerHTTP status code of the response
errorsarrayList of errors, if any occurred
warningsarrayList of warnings, if any occurred

Response Status Codes

Status CodeDescription
200Success - Recommendations updated successfully
400Bad Request - Missing required parameters (dealer-department-uuid, mpiUUID, dealerAssociateUuid, or recommendations list)
404Not Found - MPI or one or more recommendations not found
500Internal Server Error - An error occurred while processing the request

Success Response Example

{
"errors": [],
"statusCode": 200,
"warnings": []
}

Error Response Example (Recommendation Not Found)

{
"errors": [
{
"errorCode": "INVALID_RECOMMENDATION_UUID",
"errorDescription": "Recommendations not found: [invalid-uuid-1, invalid-uuid-2]"
}
],
"statusCode": 404,
"warnings": []
}

Error Response Example (Invalid Dealer Associate)

{
"errors": [
{
"errorCode": "INVALID_REQUEST_BODY",
"errorDescription": "Invalid dealerAssociateUuid"
}
],
"statusCode": 400,
"warnings": []
}