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",
"amount": "string",
"customer": {
"company": "string",
"firstName": "string",
"lastName": "string",
"uuid": "string"
},
"orderDate": "string",
"orderNumber": "string",
"orderStatus": "string",
"orderType": "string",
"orderUuid": "string",
"originalEstimate": "string",
"tagNumber": "string",
"technicianUuids": [
"string"
],
"updatedDate": "string",
"vin": "string"
}
],
"statusCode": 0,
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
]
}

Response Object Explanation

Array named {{orders}} which contains all order related information like amount, orderNumber, orderStatus, orderType etc., sub-object named {{customer}} which contains basic information of the customer like name, companyName and vin of the vehicle for which order was created.