Skip to main content

How to update a customer

This document is designed to help you understand how you can update an existing customer, along with their vehicles and addresses, using a given request body and customer UUID. To update a customer, you first need your credentials. If you don't already have them, head over to the Authentication and Authorization page to see how you can request credentials from us. The endpoint mentioned below can assist you in updating a customer by customizing the request body for the specified customer UUID:

Parameters

Required path parameters:

Parameter NameTypeDescription
departmentUUIDstringUnique identifier of dealer department
customerUuidstringUnique identifier of customer isssued by mykaarma

Scope

  1. The service subscriber needs to have the following scope - customer.update

Authorization

This request requires the following authorization scopes:

ScopeLevelDescription
customer.updateDealerDepartmentAuthorizes client to create customer for provided user's dealer department

Endpoint

curl -X PUT "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/{{customerUuid}}"
-H "authorization: {{basic_auth_token}}"
-d '{
"requesterUserUUID": "string",
"dealerUUIDList": [
"string"
],
"customer": {
"customerKey": "string",
"firstName": "string",
"lastName": "string",
"company": "string",
"isBusiness": true,
"addresses": [
{
"line1": "string",
"line2": "string",
"city": "string",
"zip": "string",
"addressType": "string",
"type": "Enum",
"country": "string",
"isValid": true,
"isPreferred": true,
"state": "string"
}
],
"preferredLocale": "string",
"customerUuid": "string",
"emails": [
{
"emailAddress": "string",
"label": "string",
"okToEmail": true,
"isPreferred": true
}
],
"phoneNumbers": [
{
"phoneNumber": "string",
"label": "string",
"okToCall": true,
"okToText": true,
"isPreferred": true
}
]
},
"vehicles": [
{
"vin": "string",
"vehicleYear": "string",
"vehicleMake": "string",
"vehicleModel": "string",
"estimatedMileage": "string",
"vehicleKey": "string",
"vehicleTrim": "string",
"licensePlate": "string",
"color": "string",
"vehicleUuid": "string",
"vehicleEngine": "string",
"isValid": true
}
],
"validateVin": true
}'

Response


{
"errors": [
{
"errorCode": 0,
"errorTitle": "string",
"errorMessage": "string"
}
],
"warnings": [
{
"warningCode": 0,
"warningTitle": "string",
"warningMessage": "string"
}
],
"customerUuid": "string",
"customerId": "string"
}


Request Body

Parameter NameDescription
serviceSubscriberDealerDepartmentTokenUnique identifier issued by mykaarma to uniquely identify each department, used by mykaarma to lookup customers in DMS databases for various purposes like updation, deletion, booking appointment etc.
customerKeyUnique identifier used by DMS to uniquely identify each customer, used by mykaarma to lookup customers in DMS databases for various purposes like updation, deletion, booking appointment etc.
firstNameCustomer's first name.
lastNameCustomer's last name.
companyName of the company if the customer is a business.
isBusinessBoolean indicating if the customer is a business entity.
bestTimeToContactBoolean indicating if the customer is a business entity.
addressesList of addresses associated with the customer.
preferredLocaleCustomer's preferred language or locale. ( use en-us for English or fr-ca for french)
emailsList of email addresses associated with the customer.
phoneNumbersList of phone numbers associated with the customer.
vehiclesList of vehicles owned by the customer.
validateVinBoolean indicating if the vehicle's VIN should be validated.
addresses.addressTypeEnum with possible values COMMON, PRIMARY, BILLING, OTHER and tells type of address
addresses.line1The first line of the customer's address.
addresses.line2The second line of the customer's address, often used for apartment or suite numbers.
addresses.zipThe postal code for the customer's address.
addresses.countryThe country of the customer's address.
addresses.isValidBoolean indicating if the address is valid.
addresses.isPreferredBoolean indicating if this is the customer's preferred address.
addresses.stateThe state or region of the customer's address.
emails.emailAddressThe customer's email address.
emails.labelDescribes the type of email (e.g., personal, work).
emails.okToEmailBoolean indicating if it's permissible to send emails to this address.
emails.isPreferredBoolean indicating if this is the customer's preferred email address.
phoneNumbers.phoneNumberThe customer's phone number, prefixed with +1 for the country code.
phoneNumbers.labelDescribes the type of email (e.g., cell,home,work ).
phoneNumbers.okToCallBoolean indicating if it's permissible to call this number.
phoneNumbers.okToTextBoolean indicating if it's permissible to send text messages to this number.
phoneNumbers.isPreferredBoolean indicating if this is the customer's preferred phone number.
vehicles.vinThe Vehicle Identification Number, a unique code for the vehicle.
vehicles.vehicleYearThe year the vehicle was manufactured.
vehicles.vehicleMakeThe manufacturer or brand of the vehicle.
vehicles.vehicleModelThe specific model of the vehicle.
vehicles.vehicleEngineThe type or specification of the vehicle's engine.
vehicles.isValidBoolean indicating if the vehicle is owned by cusotmer or not presently .
vehicles.licensePlateThe vehicle's license plate number.
vehicles.colorThe color of the vehicle.
vehicles.colorUnique identifier for the vehicle used by the DMS.
vehicles.estimatedMileageThe estimated mileage the vehicle has traveled.

Note

If a customer key passed in the request body already exists in myKaarma system for the given department for a different customer , then the customer update process will fail.

Response Object Explanation

{{errors}} An array of error objects detailing issues encountered during customer creation or update.

{{warnings}} An array of warning objects providing non-critical alerts encountered during customer creation or update.

{{errors.errorCode}} Code indicating the specific error encountered during customer creation or update; refer to the API reference for a list of possible error codes.

{{errors.errorTitle}} Title describing the specific error encountered during customer creation or update; refer to the API reference for detailed descriptions.

{{errors.errorMessage}} Detailed message describing the specific error encountered during customer creation or update; refer to the API reference for more information.