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 Name | Type | Description |
---|---|---|
departmentUUID | string | Unique identifier of dealer department |
customerUuid | string | Unique identifier of customer isssued by mykaarma |
Scope
- The service subscriber needs to have the following scope -
customer.update
Authorization
This request requires the following authorization scopes:
Scope | Level | Description |
---|---|---|
customer.update | DealerDepartment | Authorizes 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 Name | Description | Required |
---|---|---|
serviceSubscriberDealerDepartmentToken | Unique 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 |
customerKey | Unique 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 |
firstName | Customer's first name. | Yes ( no only if isBusiness is set to true and company name is provided) |
lastName | Customer's last name. | Yes ( no only if isBusiness is set to true and company name is provided) |
company | Name of the company if the customer is a business. | No ( yes only if isBusiness is set to true ) |
isBusiness | Boolean indicating if the customer is a business entity. | No |
bestTimeToContact | Boolean indicating if the customer is a business entity. | No |
addresses | List of addresses associated with the customer. | No |
preferredLocale | Customer's preferred language or locale. ( use en-us for English or fr-ca for french) | No |
emails | List of email addresses associated with the customer. | No |
phoneNumbers | List of phone numbers associated with the customer. | No |
vehicles | List of vehicles owned by the customer. | No |
validateVin | Boolean indicating if the vehicle's VIN should be validated. | No |
searchForDuplicate | Boolean indicating if the system should check for duplicate customers before creation. API Partners are expected to pass this parameter as false | No |
addresses.addressType | Enum with possible values COMMON, PRIMARY, BILLING, OTHER and tells type of address | No |
addresses.line1 | The first line of the customer's address. | Yes ( only if addresses is not empty ) |
addresses.line2 | The second line of the customer's address, often used for apartment or suite numbers. | No |
addresses.zip | The postal code for the customer's address. | No |
addresses.country | The country of the customer's address. | Yes ( only if addresses is not empty ) |
addresses.isValid | Boolean indicating if the address is valid. | No |
addresses.isPreferred | Boolean indicating if this is the customer's preferred address. | No |
addresses.state | The state or region of the customer's address. | Yes ( only if addresses is not empty ) |
emails.emailAddress | The customer's email address. | Yes ( only if emails is not empty ) |
emails.label | Describes the type of email (e.g., personal, work). | Yes ( only if emails is not empty ) |
emails.okToEmail | Boolean indicating if it's permissible to send emails to this address. | No |
emails.isPreferred | Boolean indicating if this is the customer's preferred email address. | No |
phoneNumbers.phoneNumber | The customer's phone number, prefixed with +1 for the country code. | Yes ( only if phones is not empty) |
phoneNumbers.label | Describes the type of email (e.g., cell,home,work ). | Yes ( only if phones is not empty) |
phoneNumbers.okToCall | Boolean indicating if it's permissible to call this number. | No |
phoneNumbers.okToText | Boolean indicating if it's permissible to send text messages to this number. | No |
phoneNumbers.isPreferred | Boolean indicating if this is the customer's preferred phone number. | No |
vehicles.vin | The Vehicle Identification Number, a unique code for the vehicle. | Yes ( only if vehicles is not empty and make/model/year are empty) |
vehicles.vehicleYear | The year the vehicle was manufactured. | No ( yes only vehicles is not empty and vin is empty) |
vehicles.vehicleMake | The manufacturer or brand of the vehicle. | No ( yes only vehicles is not empty and vin is empty) |
vehicles.vehicleModel | The specific model of the vehicle. | No ( yes only vehicles is not empty and vin is empty) |
vehicles.vehicleEngine | The type or specification of the vehicle's engine. | No |
vehicles.isValid | Boolean indicating if the vehicle is owned by cusotmer or not presently . | No |
vehicles.licensePlate | The vehicle's license plate number. | No |
vehicles.color | The color of the vehicle. | No |
vehicles.estimatedMileage | The 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.