How to get a list of Orders
This document is designed to help you understand how you can fetch a list of Orders with search parameters customizations. The endpoint enables users to search for a list of orders on the basis of various parameters like orderDate, closeDate, orderNumber etc.. The list returned contains an array of orders which contains all the order related information.
To use this endpoint, 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 credentials from us.
The endpoint mentioned below can help you with getting an order list and customize the search parameters :-
Parameters Used
Path parameters
| Parameter Name | Value | Description | Required |
|---|---|---|---|
departmentUUID | String | Unique identifier of dealer department | Yes |
Authorization
| Parameter Name | Description | Required |
|---|---|---|
{{basic_auth_token}} | Authorization: Base64 encoded string using Service Subscriber Username and password | Yes |
Scope
This request requires the following authorization scopes:
| Scope | Level | Description |
|---|---|---|
order.specific.search | DealerDepartment | Authorizes client to search for orders for provided user's dealer department |
Request Body
Request Body object
{
"customerUuid": "string",
"dateFilterType": "ORDER_DATE",
"fromOrderDate": "string",
"orderNumberPrefix": "string",
"orderStatus": "string",
"orderType": "string",
"orderUuid": "string",
"pageNo": "string",
"size": "string",
"tagNumber": "string",
"toOrderDate": "string",
"userUuid": "string",
"vin": "string"
}
Quick summary of request body object fields
| Parameter Name | Description | Required | Default Value |
|---|---|---|---|
{{customerUuid}} | UUID of customer for which order was created. If provided, vin should not be passed. | No | --- |
{{dateFilterType}} | Which date type to filter orders upon like ORDER_DATE, CLOSE_DATE, CREATED_DATE, UPDATED_DATE | Yes(if orders need to be filtered by dates) | --- |
{{fromOrderDate}} | Start date, all orders for which {{dateFilterType}} is before this date will be filtered out. yyyy-MM-dd | No | --- |
{{orderNumberPrefix}} | Prefix of order number, minimum length 3 is required if passed non-empty | No | --- |
{{orderStatus}} | Status of order example Allowed values are O/P/C | No | --- |
{{orderType}} | RO(Repair Order) or PO(Parts Order) | No | --- |
{{orderUuid}} | UUID of order to be searched | No | --- |
{{pageNo}} | Number of pages to be skipped i.e. orders from those first pages will not be fetched and returned | No | 0 |
{{size}} | Maximum number of orders that will be returned i.e. size of the array in response | No | 150 |
{{toOrderDate}} | End date, all orders for which {{dateFilterType}} is after this date will be filtered out. yyyy-MM-dd | No | --- |
{{userUuid}} | Used to fetch dealer associate ID | No | --- |
{{vin}} | VIN of vehicle for which order was created. If provided, customerUuid should not be passed. | No | --- |
Endpoint
curl -X POST "https://api.mykaarma.com/order/v2/department/{{departmentUUID}}/order/specificSearch"
-H "accept: application/json"
-H "authorization: Basic {{basic_auth_token}}"
-H "Content-Type: application/json"
-d "
{
"orderNumberPrefix": "",
"toOrderDate": "",
"fromOrderDate": "",
"tagNumber": "",
"orderUuid": "",
"userUuid": "",
"pageNo": "",
"size": "",
"orderType": "",
"orderStatus": "",
"vin": "",
"customerUuid": "",
"dateFilterType": ""
}
"
Response
Response Object
{
"errors": [
{
"errorCode": "string",
"errorDescription": "string",
"errorUID": "string"
}
],
"orders": [
{
"advisorUuid": "string",
"advisorDetails": {
"userUuid": "string",
"departmentUuid": "string",
"firstName": "string",
"lastName": "string"
},
"amount": "string",
"customer": {
"company": "string",
"firstName": "string",
"lastName": "string",
"uuid": "string"
},
"vehicle": {
"make": "string",
"model": "string",
"year": "string"
},
"invoiceUrl": "string",
"orderDate": "string",
"orderNumber": "string",
"orderStatus": "string",
"orderType": "string",
"orderUuid": "string",
"originalEstimate": "string",
"promiseTime": "string",
"tagNumber": "string",
"technicianUuids": [
"string"
],
"updatedDate": "string",
"vin": "string"
}
],
"totalCount": 0,
"statusCode": 0,
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}
Response Object Explanation
| Parameter Name | Description |
|---|---|
totalCount | Total number of orders matching the search criteria. Useful for pagination. |
Order Details
Array named orders which contains all order related information.
| Parameter Name | Description |
|---|---|
orderNumber | Unique identifier for the order. |
orderUuid | UUID of the order. |
orderDate | Date when the order was created. |
updatedDate | Date when the order was last updated. |
orderStatus | Status of the order. Possible values are O (Open), P (Pre-Invoiced), C (Closed). |
orderType | Type of order. RO (Repair Order) or PO (Parts Order). |
amount | Total amount of the order. |
originalEstimate | Original estimate amount for the order. |
advisorUuid | UUID of the service advisor assigned to the order. |
tagNumber | Identifier for the vehicle tag. |
vin | VIN of the vehicle for which the order was created. |
invoiceUrl | URL link to the invoice associated with the order. |
promiseTime | The promised time for the service to be completed. |
technicianUuids | List of UUIDs of technicians assigned to the order. |
Customer Information
Sub-object named customer which contains basic information of the customer.
| Parameter Name | Description |
|---|---|
customer.uuid | Unique identifier of the customer. |
customer.firstName | First name of the customer. |
customer.lastName | Last name of the customer. |
customer.company | Company name of the customer. |
Vehicle Information
Sub-object named vehicle which contains basic information of the vehicle.
| Parameter Name | Description |
|---|---|
vehicle.make | Manufacturer of the vehicle. |
vehicle.model | Model of the vehicle. |
vehicle.year | Year of the vehicle. |
Advisor Details
Sub-object named advisorDetails which contains detailed information of the service advisor.
| Parameter Name | Description |
|---|---|
advisorDetails.userUuid | UUID of the advisor user. |
advisorDetails.departmentUuid | UUID of the advisor's department. |
advisorDetails.firstName | First name of the advisor. |
advisorDetails.lastName | Last name of the advisor. |