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 Name | Value | Description |
|---|---|---|
dealer-department-uuid | string | UUID of the dealer department |
mpiUUID | string | UUID of the multipoint inspection containing the recommendations |
Authorization
This request requires the following authorization scopes:
| Scope | Level | Description |
|---|---|---|
multipoint.inspection.update | DealerDepartment | Authorizes client to update multipoint inspection recommendations |
Request Body
The request body contains the following properties:
| Property | Type | Required | Description |
|---|---|---|---|
dealerAssociateUuid | string | Yes | UUID 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. |
recommendations | array | Yes | List of recommendations to update |
recommendations[].recommendationUuid | string | Yes | UUID of the recommendation to update |
recommendations[].approvalState | string | No | The approval state to set. Valid values: APPROVED, DECLINED, NONE, MORE INFO REQUESTED |
Important Notes
Quick Summary
- This endpoint allows you to update multiple recommendations within an MPI in a single API call.
dealerAssociateUuidis required - This field is used for changelog tracking and must be provided in every request.- The
approvalStateproperty indicates the decision status for each recommendation:APPROVED- Customer/dealer approved the recommendationDECLINED- Customer/dealer declined the recommendationNONE- No decision yetMORE INFO REQUESTED- Customer requested more information
- When
approvalStateis updated, the system automatically setsisApprovedDeclinedByDealerAssociatetotrueto indicate the action was performed by a dealer associate. - The
lastUpdatedByfield on each recommendation is automatically set with the dealer associate UUID and name. - To get the
recommendationUuidvalues, first fetch the MPI using the How to get a MPI endpoint. The recommendation UUIDs can be found at:multiPointInspection.mpiSections[].checks[].recommendations[].uuid - 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
| Field | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code of the response |
errors | array | List of errors, if any occurred |
warnings | array | List of warnings, if any occurred |
Response Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Recommendations updated successfully |
| 400 | Bad Request - Missing required parameters (dealer-department-uuid, mpiUUID, dealerAssociateUuid, or recommendations list) |
| 404 | Not Found - MPI or one or more recommendations not found |
| 500 | Internal 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": []
}