Skip to main content

How to create an order for Service Department

This document is designed to help you understand how you can create a Repair Order for the Service 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

Parameter NameDescriptionRequired
{{department_token}}UUID of service subscriberTrue
{{authorization}}Authorization: Basic generate using username passwordTrue

Scope

  1. The service subscriber needs to have the following scope - order.create

Authorization

This request requires the following authorization scopes:

ScopeLevelDescription
order.createDealerDepartmentAuthorizes client to create order for provided user's dealer department

Endpoint

curl -X PUT "https://api.mykaarma.com/order/v2/department/{{serviceSubscriberDealerDepartmentToken}}/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"
},
"jobs":[
{
"jobIdentifier":"string",
"jobNumberString":"string",
"lopSeqNumber":"string",
"laborOpCode":"string",
"laborOpCodeDesc":"string",
"laborType":"string",
"laborSale":"string",
"soldHours":"string",
"actualHours":"string",
"partsSale":"string",
"miscSale":"string",
"bookerNo":"string",string
"dispatchLineStatus":"string",
"techNo":"string",
"campaignCode":"string",
"parts":[
{

"partNumber":"string",
"description":"string",
"seqNo":"string",
"quantityOrdered":"string",
"quantitySold":"string",
"cost":"string",
"salePrice":"string",
"saleTotal":"string",
"laborType":"string"
}
],
"gog":[
{
"itemType":"string",
"itemDescription":"string",
"jobNumber":"string",
"quantity":"string",
"saleTotal":"string",
"salePrice":"string",
"laborType":"string"
}
],
"techHours":[
{
"techNo":"string",
"partSeqNo":"string",
"laborCost":"string",
"laborSale":"string",
"soldHours":"string",
"otherHours":"string",
"laborType":"string"
}
],
"comments":[
{
"comment":"string",
"lastUpdatedBy":"string",
"updateDate":string"",
"updateTime":"string"
}
],
"ccc":{
"complaint":"string",
"complaintCode":"string",
"cause":"string",
"correction":"string"
}
}

],
"mls" :[
{
"laborType": "string",
"opCode" : "string",
"opCodeDesc" : "string",
"failureCode" : "string",
"salePrice" : "string",
"costPrice" : "string",
"saleCompany" : "string",
"sourceCompany" : "string",
"lineCode" : "string",
"poNumber" : "string",
"poCreateDate" :"string",
"poLineID" : "string",
"mlsType" : "string"
}
]
}
}'

Response


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

Request Body

Order Details

Parameter NameDescriptionRequired
type"RO" for service/repair orderYes
orderNumberUnique identifier for the order.Yes
serviceAccountAccount associated with the service.No
accountingAccountAccount used for accounting purposes.No
statusCurrent status of the order .Yes ( allowed values are "OPENED" , "PRE-INVOICED", "CLOSED" )
deptTypeType of department handling the order.No
advisorNumberIdentifier for the service advisor in the DMS to which RO is being assigned .Yes
advisorNameName of the service advisor.No
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 ( Required Only if advisorNumber is blank )
appointmentNumberAppointment Number (generated in the DMS) associated with RO .No
tagNumberIdentifier for the vehicle tag.No
mileageInMileage of the vehicle when it arrived.No
mileageOut Mileage of the vehicle when it left.No
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 formatNo
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"No
rentalIndicates if a rental vehicle is provided. "Y/N"No
soldHoursNumber of hours sold for the service.No
actualHoursActual hours spent on the service.No
laborCostCost of labor for the service. (Only numerics alowed upto 2 decimal places like "12.56" )No
laborSaleSale amount for labor. (Only numerics alowed upto 2 decimal places like "12.56" )No
laborSaleCustomerSale amount for labor charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
laborSaleInternalSale amount for internal labor. (Only numerics alowed upto 2 decimal places like "12.56" )No
laborSaleWarrantySale amount for labor under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsCostCost of parts used in the service. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsCostCustomerCost of parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsCostInternalCost of parts for internal use. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsCostWarrantyCost of parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsSaleSale amount for parts. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsSaleCustomerSale amount for parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsSaleInternalSale amount for internal parts. (Only numerics alowed upto 2 decimal places like "12.56" )No
partsSaleWarrantySale amount for parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
lubeSaleSale amount for lubricants. (Only numerics alowed upto 2 decimal places like "12.56" )No
lubeSaleCustomerSale amount for lubricants charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
lubeSaleInternalSale amount for internal lubricants. (Only numerics alowed upto 2 decimal places like "12.56" )No
lubeSaleWarrantySale amount for lubricants under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
miscSaleSale amount for miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" )No
miscSaleCustomerSale amount for miscellaneous items charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
miscSaleInternalSale amount for internal miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" )No
miscSaleWarrantySale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
subletSaleSale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
subletSaleCustomerSale amount for sublet services charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
subletSaleInternalSale amount for internal sublet services. (Only numerics alowed upto 2 decimal places like "12.56" )No
subletSaleWarrantySale amount for sublet services under warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
customerPayAmountTotal amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
customerPayStateTaxState tax amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" )No
internalPayAmountTotal internal charges. (Only numerics alowed upto 2 decimal places like "12.56" )No
warrantyPayAmountTotal amount covered by warranty. (Only numerics alowed upto 2 decimal places like "12.56" )No
descriptionDescription of the order.No

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.Yes
customer.firstNameFirst name of the customer.No
customer.lastNameLast name of the customer.No

Job details

Parameter NameDescriptionRequired
job.jobIdentifierUnique identifier for the line + labor operation. Example "A-1","B-2"No
job.jobNumberStringUnique identifier for the line. Example "A","B","C"Yes
job.lopSeqNumberSequence number for the labor operation. Example "1","2" ,"3"Yes
job.laborOpCodeCode for the labor operation. Example "OIL"Yes
job.laborOpCodeDescDescription of the labor operation.No
job.laborTypeType of labor performed. Perferred allowed values are C/W/INo
job.laborSaleSale amount for the labor.(Only numerics alowed upto 2 decimal places like "12.56" )No
job.soldHoursNumber of hours sold for the job.No
job.actualHoursActual hours spent on the job.No
job.partsSaleSale amount for parts used in the job. (Only numerics alowed upto 2 decimal places like "12.56" )No
job.miscSaleSale amount for miscellaneous items in the job. (Only numerics alowed upto 2 decimal places like "12.56" )No
job.bookerNoBooker number for the job.No
job.dispatchLineStatusStatus of the dispatch line.No
job.techNoIdentifier for the technician in the DMS who performed the job.No
job.campaignCodeCode for any applicable campaign.No

Parts Information

Parameter NameDescriptionRequired
part.partNumberNumber identifying the part.Yes
part.descriptionDescription of the part.No
part.seqNoSequence number for the part.Yes
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

GOG Information

Parameter NameDescriptionRequired
gog.itemTypeType of item in the GOG.No
gog.itemDescriptionDescription of the item.No
gog.jobNumberJob number associated with the item.No
gog.quantityQuantity of the item.No
gog.saleTotalTotal sale amount for the item.No
gog.salePriceSale price of the item.No
gog.salePriceSale price of the item.No
gog.laborTypeType of labor associated with the item.No

Tech Hours

Parameter NameDescriptionRequired
tech.itemTypeIdentifier for the technician.No
tech.itemDescriptionCost of labor for the technician.No
tech.jobNumberSale amount for the labor.No
tech.quantityNumber of hours sold for the technician's work.No
tech.saleTotalOther hours associated with the technician's work.No
tech.salePriceType of labor performed by the technician.No

Comments

Parameter NameDescriptionRequired
comments.commentText of the comment.No
comments.lastUpdatedByIdentifier for the person who last updated the comment.No
comments.updateDateDate when the comment was last updated. yyyy-MM-dd format UTC timezoneNo
comments.updateTimeTime when the comment was last updated. HH:mm:ss format UTC timezoneNo

Complaint cause correction

Parameter NameDescriptionRequired
ccc.complaintDescription of the customer's complaint.No
ccc.complaintCodeCode for the complaint.No
ccc.causeCause of the job.No
ccc.correctionCorrection made to address the complaint.No

MLS Information

Parameter NameDescriptionRequired
mls.laborTypeType of labor in the MLS.No
mls.opCodeOperation code in the MLS.No
mls.opCodeDescDescription of the operation code.No
mls.failureCodeCode for any failure.No
mls.salePriceSale price in the MLS..No
mls.costPriceCost price in the MLS.No
mls.saleCompanyCompany responsible for the sale.No
mls.sourceCompanyCompany that sourced the item.No
mls.lineCodeCode for the line item.No
mls.poNumberPurchase order number.No
mls.poCreateDateDate when the purchase order was created.No
mls.poLineIDLine ID for the purchase order.No
mls.mlsTypeType of MLS entry.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 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.errorDescription}} Detailed message describing the specific error encountered during customer creation or update; refer to the API reference for more information.

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

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