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

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"
},
"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 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

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

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.