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 Name | Description | Required |
---|---|---|
{{department_token}} | UUID of service subscriber | True |
{{authorization}} | Authorization: Basic generate using username password | True |
Scope
- The service subscriber needs to have the following scope -
order.create
Authorization
This request requires the following authorization scopes:
Scope | Level | Description |
---|---|---|
order.create | DealerDepartment | Authorizes 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 Name | Description | Required |
---|---|---|
type | "RO" for service/repair order | Yes |
orderNumber | Unique identifier for the order. | Yes |
serviceAccount | Account associated with the service. | No |
accountingAccount | Account used for accounting purposes. | No |
status | Current status of the order . | Yes ( allowed values are "OPENED" , "PRE-INVOICED", "CLOSED" ) |
deptType | Type of department handling the order. | No |
advisorNumber | Identifier for the service advisor in the DMS to which RO is being assigned . | Yes |
advisorName | Name of the service advisor. | No |
assignedUserUuid | Unique token issued by mykaarma of the dealer associate to which RO is being assigned | No ( Required Only if advisorNumber is blank ) |
creatorUserUuid | Unique token issued by mykaarma of the dealer associate which is creating the RO. | No ( Required Only if advisorNumber is blank ) |
appointmentNumber | Appointment Number (generated in the DMS) associated with RO . | No |
tagNumber | Identifier for the vehicle tag. | No |
mileageIn | Mileage of the vehicle when it arrived. | No |
mileageOut | Mileage of the vehicle when it left. | No |
createDate | Date when the order was created. yyyy-MM-dd format in UTC timezone | Yes |
orderTime | Time when the order was created. HH:mm:ss in UTC timezone | Yes |
promisedDate | Date by which the service is promised to be completed. yyyy-MM-dd format in UTC timezone | No |
promisedTime | Time by which the service is promised to be completed. HH:mm:ss format in UTC timezone | No |
voidDate | Date when the order was voided. yyyy-MM-dd HH:mm:ss format | No |
closeDate | Date when the order was closed. yyyy-MM-dd format in UTC timezone | No |
closeTime | Time when the order was closed. HH:mm:ss format | No |
waiter | Indicates if the customer is waiting for the service. "Y/N" | No |
rental | Indicates if a rental vehicle is provided. "Y/N" | No |
soldHours | Number of hours sold for the service. | No |
actualHours | Actual hours spent on the service. | No |
laborCost | Cost of labor for the service. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
laborSale | Sale amount for labor. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
laborSaleCustomer | Sale amount for labor charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
laborSaleInternal | Sale amount for internal labor. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
laborSaleWarranty | Sale amount for labor under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsCost | Cost of parts used in the service. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsCostCustomer | Cost of parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsCostInternal | Cost of parts for internal use. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsCostWarranty | Cost of parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsSale | Sale amount for parts. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsSaleCustomer | Sale amount for parts charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsSaleInternal | Sale amount for internal parts. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
partsSaleWarranty | Sale amount for parts under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
lubeSale | Sale amount for lubricants. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
lubeSaleCustomer | Sale amount for lubricants charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
lubeSaleInternal | Sale amount for internal lubricants. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
lubeSaleWarranty | Sale amount for lubricants under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
miscSale | Sale amount for miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
miscSaleCustomer | Sale amount for miscellaneous items charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
miscSaleInternal | Sale amount for internal miscellaneous items. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
miscSaleWarranty | Sale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
subletSale | Sale amount for miscellaneous items under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
subletSaleCustomer | Sale amount for sublet services charged to the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
subletSaleInternal | Sale amount for internal sublet services. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
subletSaleWarranty | Sale amount for sublet services under warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
customerPayAmount | Total amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
customerPayStateTax | State tax amount payable by the customer. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
internalPayAmount | Total internal charges. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
warrantyPayAmount | Total amount covered by warranty. (Only numerics alowed upto 2 decimal places like "12.56" ) | No |
description | Description of the order. | No |
Vehicle Information
Parameter Name | Description | Required |
---|---|---|
vehicle.uuid | Unique identifier issued by mykaarma for the vehicle for which the order is being created. | No |
vehicle.vin | Vehicle Identification Number for the vehicle for which the order is being created . | No |
vehicle.make | Manufacturer of the vehicle the order is being created. | No |
vehicle.model | Model of the vehicle. | No |
Customer Information
Parameter Name | Description | Required |
---|---|---|
customer.uuid | Unique identifier issued by mykaarma for the customer for which the order is being created. | Yes |
customer.firstName | First name of the customer. | No |
customer.lastName | Last name of the customer. | No |
Parts Information
Parameter Name | Description | Required |
---|---|---|
part.partNumber | Number identifying the part. | Yes |
part.description | Description of the part. | No |
part.seqNo | Sequence number for the part. | Yes |
part.quantityOrdered | Quantity of the part ordered. | No |
part.quantitySold | Quantity of the part sold. | No |
part.cost | Cost of the part. | No |
part.salePrice | Sale price of the part. | No |
part.saleTotal | Total sale amount for the part. | No |
part.laborType | Type 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.