Skip to main content

How to create an order for Parts Department

This document is designed to help you understand how you can create a Parts Order for the Parts Department. The endpoint enables users to submit a new repair order with various parameters like orderDate, closeDate, orderNumber, etc.. The created order will contain all the relevant order information. To use this endpoint, 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 creating a Repair Order with customized parameters :-

Parameters Used

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
order.createDealerDepartmentAuthorizes client to create parts order for provided user's dealer department

Endpoint

curl -X PUT "https://api.mykaarma.com/order/v2/department/{{departmentUUID}}/order/"
-H "authorization: {{basic_auth_token}}"
-d '{
"order":{
"type":"RO",
"header":{
"orderNumber":"string",
"serviceAccount":"string",
"accountingAccount":"string",
"status":"string",
"deptType":"string",
"advisorNumber":"string",
"advisorName":"string",
"assignedUserUuid":"string",
"creatorUserUuid":"string",
"appointmentNumber":"string",
"tagNumber":"string",
"mileageIn":"string",
"mileageOut":"string",
"createDate":"string",
"createTime":"string",
"promisedDate":"string",
"promisedTime":"string",
"voidDate":"string",
"closeDate":"string",
"closeTime":"string",
"waiter":"string",
"rental":"string",
"soldHours":"string",
"actualHours":"string",
"laborCost":"string",
"laborSale":"string",
"laborSaleCustomer":"string",
"laborSaleInternal":"string",
"laborSaleWarranty":"string",
"partsCost":"string",
"partsCostCustomer":"string",
"partsCostInternal":"string",
"partsCostWarranty":"string",
"partsSale":"string",
"partsSaleCustomer":"string",
"partsSaleInternal":"string",
"partsSaleWarranty":"string",
"lubeSale":"string",
"lubeSaleCustomer":"string",
"lubeSaleInternal":"string",
"lubeSaleWarranty":"string",
"miscSale":"string",
"miscSaleCustomer":"string",
"miscSaleInternal":"string",
"miscSaleWarranty":"string",
"subletSale":"string",
"subletSaleCustomer":"string",
"subletSaleInternal":"string",
"subletSaleWarranty":"string",
"customerPayAmount":"string",
"customerPayStateTax":"string",
"internalPayAmount":"string",
"warrantyPayAmount":"string",
"description":"string"
},
"vehicle":{
"uuid":"string",
"vin":"string",
"make":"string",
"model":"string",
},
"customer":{
"uuid":"string",
"firstName":"string",
"lastName":"string"
},
"parts" :[
{
"partNumber": "string",
"description": "string",
"seqNo": "string",
"quantityOrdered": "string",
"quantitySold": "string",
"cost": "string",
"salePrice": "string",
"saleTotal": "string",
"laborType": "string"
}
]
}
}'

Response


{
"errors": [
{
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
}
],
"warnings": [
{
"warningCode": 0,
"warningDescription": "string"
}
],
"orderUUID": "string",
"statusCode": "Integer"
}

Request Body

Order Details

Parameter NameDescriptionRequiredField Length
type"RO" for service/repair orderYes2
orderNumberUnique identifier for the order. Ordernumber should match regex ^[a-zA-Z0-9-#_\s]*$Yes75
serviceAccountAccount associated with the service in the DMS.No20
accountingAccountAccount used for accounting purposes in the DMS.No20
statusCurrent status of the order .Yes ( allowed values are OPENED, PRE-INVOICED, CLOSED )50
deptTypeType of department handling the order.No20
advisorNumberIdentifier for the service advisor in the DMS to which RO is being assigned.No( only required if assignedUserUuid is blank)20
advisorNameName of the service advisor.No90
assignedUserUuidUnique token issued by mykaarma of the dealer associate to which RO is being assignedNo( Required Only if advisorNumber is blank )-
creatorUserUuidUnique token issued by mykaarma of the dealer associate which is creating the RO.No-
appointmentNumberAppointment Number (generated in the DMS) associated with RO.No100
tagNumberIdentifier for the vehicle tag.No45
mileageInMileage of the vehicle when it arrived.No30
mileageOut Mileage of the vehicle when it left.No30
createDateDate when the order was created. yyyy-MM-dd format in UTC timezoneYes-
orderTimeTime when the order was created. HH:mm:ss in UTC timezoneYes-
promisedDateDate by which the service is promised to be completed. yyyy-MM-dd format in UTC timezoneNo-
promisedTimeTime by which the service is promised to be completed. HH:mm:ss format in UTC timezoneNo-
voidDateDate when the order was voided. yyyy-MM-dd HH:mm:ss format in UTC timezone.No-
closeDateDate when the order was closed. yyyy-MM-dd format in UTC timezoneNo-
closeTimeTime when the order was closed. HH:mm:ss formatNo-
waiterIndicates if the customer is waiting for the service. "Y" /"N"No1
rentalIndicates if a rental vehicle is provided. "Y"/"N"No1
soldHoursNumber of hours sold for the service.No10
actualHoursActual hours spent on the service.No10
laborCostCost of labor for the service. (Only numerics alowed upto 2 decimal places like "12.56" )No10
laborSaleSale amount for labor. (Only numerics alowed upto 2 decimal places like "12.56" )No10
laborSaleCustomerSale amount for labor charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
laborSaleInternalSale amount for internal labor. (Only numerics alowed upto 2 decimal places like "12.56" )No10
laborSaleWarrantySale amount for labor under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsCostCost of parts used in the service. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsCostCustomerCost of parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsCostInternalCost of parts for internal use. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsCostWarrantyCost of parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsSaleSale amount for parts. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsSaleCustomerSale amount for parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsSaleInternalSale amount for internal parts. (Only numerics alowed upto 2 decimal places like "12.56" )No10
partsSaleWarrantySale amount for parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
lubeSaleSale amount for lubricants. (Only numerics alowed upto 2 decimal places like "12.56" )No10
lubeSaleCustomerSale amount for lubricants charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
lubeSaleInternalSale amount for internal lubricants. (Only numerics alowed upto 2 decimal places like "12.56" )No10
lubeSaleWarrantySale amount for lubricants under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
miscSaleSale amount for miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" )No10
miscSaleCustomerSale amount for miscellaneous items charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
miscSaleInternalSale amount for internal miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" )No10
miscSaleWarrantySale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
subletSaleSale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
subletSaleCustomerSale amount for sublet services charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
subletSaleInternalSale amount for internal sublet services. (Only numerics alowed upto 2 decimal places like "12.56" )No10
subletSaleWarrantySale amount for sublet services under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
customerPayAmountTotal amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
customerPayStateTaxState tax amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No10
internalPayAmountTotal internal charges. (Only numerics alowed upto 2 decimal places like "12.56" )No10
warrantyPayAmountTotal amount covered by warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No10
descriptionDescription of the order.No800

Vehicle Information

Parameter NameDescriptionRequired
vehicle.uuidUnique identifier issued by mykaarma for the vehicle for which the order is being created.No
vehicle.vinVehicle Identification Number for the vehicle for which the order is being created .No
vehicle.makeManufacturer of the vehicle the order is being created.No
vehicle.modelModel of the vehicle.No

Customer Information

Parameter NameDescriptionRequired
customer.uuidUnique identifier issued by mykaarma for the customer for which the order is being created. To obtain this, use the Create or update customer with search for duplicates API.Yes
customer.firstNameFirst name of the customer.No
customer.lastNameLast name of the customer.No

Parts Information

Parameter NameDescriptionRequired
part.partNumberNumber identifying the part.Yes
part.descriptionDescription of the part.No
part.seqNoSequence number for the part.No
part.quantityOrderedQuantity of the part ordered.No
part.quantitySoldQuantity of the part sold.No
part.costCost of the part.No
part.salePriceSale price of the part.No
part.saleTotalTotal sale amount for the part.No
part.laborTypeType of labor associated with the part.No

Response Object Explanation

{{orderUUID}} uuid of the order which was created/updated .

{{errors}} An array of error objects detailing issues encountered during order 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 order creation or update; refer to the API reference for a list of possible error codes.

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

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

{{warnings.warningCode}} Code indicating the specific warning encountered during order creation or update; refer to the API reference for a list of possible warning codes.

{{warnings.warningDescription}} Detailed message describing the specific warning encountered during order creation or update; refer to the API reference for more information.