Skip to main content

How to create a customer

This document is designed to help you understand how you can create a customer along with vehicles and addresses with a given request body. To create a customer , 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. The endpoint mentioned below can help you with creating a customer list and customize request body :-

Parameters

Path parameters

Parameter NameValueDescriptionRequired
departmentUUIDStringUnique identifier of dealer departmentYes

Authorization

Parameter NameDescriptionRequired
{{basic_auth_token}}Authorization: Base64 encoded string using Service Subscriber Username and passwordYes

Scope

This request requires the following authorization scopes:

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

Endpoint

curl -X POST "https://api.mykaarma.com/customer/v2/department/{{departmentUUID}}/customer/"
-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,
"searchForDuplicate": true
}'

Response


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


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
preferredCommunicationrefers to the customer's preferred method of communication. Allowed values are text, phone , emailNo
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.typeEnum with possible values COMMON, PRIMARY, BILLING which tells type of address. COMMON: Used when the primary and billing addresses are the same. PRIMARY: Represents the customer's home address. BILLING: Represents the customer's business address. Recommended: PRIMARY.Yes
addresses.addressTypeIndicates the type of address: use P for PRIMARY/COMMON type and B for BILLING type. Recommended: P.Yes
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 , then the customer create process will fail.

Response Object Explanation

{{customerUuid}} uuid of the customer which was created/updated .

{{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.