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