Skip to main content

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 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.specific.searchDealerDepartmentAuthorizes 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 NameDescriptionRequiredDefault 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_DATEYes(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-ddNo---
{{orderNumberPrefix}}Prefix of order number, minimum length 3 is required if passed non-emptyNo---
{{orderStatus}}Status of order example Allowed values are O/P/CNo---
{{orderType}}RO(Repair Order) or PO(Parts Order)No---
{{orderUuid}}UUID of order to be searchedNo---
{{pageNo}}Number of pages to be skipped i.e. orders from those first pages will not be fetched and returnedNo0
{{size}}Maximum number of orders that will be returned i.e. size of the array in responseNo150
{{toOrderDate}}End date, all orders for which {{dateFilterType}} is after this date will be filtered out. yyyy-MM-ddNo---
{{userUuid}}Used to fetch dealer associate IDNo---
{{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 NameDescription
totalCountTotal number of orders matching the search criteria. Useful for pagination.

Order Details

Array named orders which contains all order related information.

Parameter NameDescription
orderNumberUnique identifier for the order.
orderUuidUUID of the order.
orderDateDate when the order was created.
updatedDateDate when the order was last updated.
orderStatusStatus of the order. Possible values are O (Open), P (Pre-Invoiced), C (Closed).
orderTypeType of order. RO (Repair Order) or PO (Parts Order).
amountTotal amount of the order.
originalEstimateOriginal estimate amount for the order.
advisorUuidUUID of the service advisor assigned to the order.
tagNumberIdentifier for the vehicle tag.
vinVIN of the vehicle for which the order was created.
invoiceUrlURL link to the invoice associated with the order.
promiseTimeThe promised time for the service to be completed.
technicianUuidsList of UUIDs of technicians assigned to the order.

Customer Information

Sub-object named customer which contains basic information of the customer.

Parameter NameDescription
customer.uuidUnique identifier of the customer.
customer.firstNameFirst name of the customer.
customer.lastNameLast name of the customer.
customer.companyCompany name of the customer.

Vehicle Information

Sub-object named vehicle which contains basic information of the vehicle.

Parameter NameDescription
vehicle.makeManufacturer of the vehicle.
vehicle.modelModel of the vehicle.
vehicle.yearYear of the vehicle.

Advisor Details

Sub-object named advisorDetails which contains detailed information of the service advisor.

Parameter NameDescription
advisorDetails.userUuidUUID of the advisor user.
advisorDetails.departmentUuidUUID of the advisor's department.
advisorDetails.firstNameFirst name of the advisor.
advisorDetails.lastNameLast name of the advisor.