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

Request Body

Parameter NameDescriptionRequired
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.Yes
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.No
firstNameCustomer's first name.Yes ( no only if isBusiness is set to true and company name is provided)
lastNameCustomer's last name.Yes ( no only if isBusiness is set to true and company name is provided)
companyName of the company if the customer is a business.No ( yes only if isBusiness is set to true )
isBusinessBoolean indicating if the customer is a business entity.No
bestTimeToContactBoolean indicating if the customer is a business entity.No
addressesList of addresses associated with the customer.No
preferredLocaleCustomer's preferred language or locale. ( use en-us for English or fr-ca for french)No
emailsList of email addresses associated with the customer.No
phoneNumbersList of phone numbers associated with the customer.No
vehiclesList of vehicles owned by the customer.No
validateVinBoolean indicating if the vehicle's VIN should be validated.No
searchForDuplicateBoolean indicating if the system should check for duplicate customers before creation. API Partners are expected to pass this parameter as falseNo
addresses.addressTypeEnum with possible values COMMON, PRIMARY, BILLING, OTHER and tells type of addressNo
addresses.line1The first line of the customer's address.Yes ( only if addresses is not empty )
addresses.line2The second line of the customer's address, often used for apartment or suite numbers.No
addresses.zipThe postal code for the customer's address.No
addresses.countryThe country of the customer's address.Yes ( only if addresses is not empty )
addresses.isValidBoolean indicating if the address is valid.No
addresses.isPreferredBoolean indicating if this is the customer's preferred address.No
addresses.stateThe state or region of the customer's address.Yes ( only if addresses is not empty )
emails.emailAddressThe customer's email address.Yes ( only if emails is not empty )
emails.labelDescribes the type of email (e.g., personal, work).Yes ( only if emails is not empty )
emails.okToEmailBoolean indicating if it's permissible to send emails to this address.No
emails.isPreferredBoolean indicating if this is the customer's preferred email address.No
phoneNumbers.phoneNumberThe customer's phone number, prefixed with +1 for the country code.Yes ( only if phones is not empty)
phoneNumbers.labelDescribes the type of email (e.g., cell,home,work ).Yes ( only if phones is not empty)
phoneNumbers.okToCallBoolean indicating if it's permissible to call this number.No
phoneNumbers.okToTextBoolean indicating if it's permissible to send text messages to this number.No
phoneNumbers.isPreferredBoolean indicating if this is the customer's preferred phone number.No
vehicles.vinThe Vehicle Identification Number, a unique code for the vehicle.Yes ( only if vehicles is not empty and make/model/year are empty)
vehicles.vehicleYearThe year the vehicle was manufactured.No ( yes only vehicles is not empty and vin is empty)
vehicles.vehicleMakeThe manufacturer or brand of the vehicle.No ( yes only vehicles is not empty and vin is empty)
vehicles.vehicleModelThe specific model of the vehicle.No ( yes only vehicles is not empty and vin is empty)
vehicles.vehicleEngineThe type or specification of the vehicle's engine.No
vehicles.isValidBoolean indicating if the vehicle is owned by cusotmer or not presently .No
vehicles.licensePlateThe vehicle's license plate number.No
vehicles.colorThe color of the vehicle.No
vehicles.estimatedMileageThe estimated mileage the vehicle has traveled.No

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.