API Endpoint: Get Stock Item List Data
This endpoint retrieves a list of stock items along with their associated details from the inventory. It allows clients to paginate through the stock items and specify which fields to return in the response.
Request
-
Method: GET
-
URL:
{{url}}/api/method/emotive_app.inventory.doctype.stock_no.stock_no.get_stock_item_list_data
Query Parameters:
-
page_length(integer): The number of stock items to return per page. In this case, it is set to20. -
start(integer): The starting index for pagination. Here, it is set to0, indicating the first page. -
fields(array of strings): A JSON array specifying the fields to include in the response. The following fields can be requested:-
stock_no.name -
vehicle_item.main_image -
stock_no.alternate_stock_no -
vehicle_item.vin -
stock_no.inventory_stage -
serial_no.status -
stock_no.sales_status -
vehicle_title_history.title_status -
vehicle_title_history.title_type -
vehicle_item.current_mileage -
stock_no.company_branch -
stock_no.acquisition_cost -
serial_no.company -
stock_no.modified -
stock_no.acquisition_type -
stock_no.acquisition_date -
stock_no.item
-
Response
The response will be a JSON object containing the following structure:
-
message(object): Contains the data returned from the request.-
rowData(array of objects): An array of stock item objects, each containing the requested fields. Example structure of each object:-
stock_no.name: (string) The name of the stock item. -
vehicle_item.main_image: (string) URL of the main image for the vehicle item. -
stock_no.alternate_stock_no: (string) The alternate stock number. -
vehicle_item.vin: (string) The Vehicle Identification Number. -
stock_no.inventory_stage: (string) The current inventory stage of the stock item. -
serial_no.status: (string) The status of the serial number. -
stock_no.sales_status: (string) The sales status of the stock item. -
vehicle_title_history.title_status: (string) The title status of the vehicle. -
vehicle_title_history.title_type: (string) The title type of the vehicle. -
vehicle_item.current_mileage: (string) The current mileage of the vehicle. -
stock_no.company_branch: (string) The branch of the company associated with the stock item. -
stock_no.acquisition_cost: (number) The cost of acquiring the stock item. -
serial_no.company: (string) The company associated with the serial number. -
stock_no.modified: (string) The date and time when the stock item was last modified. -
stock_no.acquisition_type: (string) The type of acquisition for the stock item. -
stock_no.acquisition_date: (string) The date when the stock item was acquired. -
stock_no.item: (string) The item identifier.
-
-
user_info(object): Contains user-specific information related to the request.
-
Example Response
{
"message": {
"rowData": [
{
"stock_no.name": "",
"vehicle_item.main_image": "",
"stock_no.alternate_stock_no": "",
"vehicle_item.vin": "",
"stock_no.inventory_stage": "",
"serial_no.status": "",
"stock_no.sales_status": "",
"vehicle_title_history.title_status": "",
"vehicle_title_history.title_type": "",
"vehicle_item.current_mileage": "",
"stock_no.company_branch": "",
"stock_no.acquisition_cost": 0,
"serial_no.company": "",
"stock_no.modified": "",
"stock_no.acquisition_type": "",
"stock_no.acquisition_date": "",
"stock_no.item": ""
}
],
"user_info": {}
}
}
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Response Structure
The root key in every response is:
message
messageDepending on the request, this key contains:
rowData– An array of stock item objects (list response)user_info– Additional user-related metadata (if applicable)
When a Single Stock Item Is Returned
- stock_no.name – Unique identifier of the stock item
- vehicle_item.main_image – URL of the vehicle’s primary displayed image
- stock_no.alternate_stock_no – Secondary or alternate stock number assigned to the item
- vehicle_item.vin – Vehicle Identification Number recorded for the unit
- stock_no.inventory_stage – Current stage/status of the item within the inventory workflow
- serial_no.status – Operational or availability status of the vehicle's serial number
- stock_no.sales_status – Sales lifecycle status of the stock item (e.g., available, sold)
- vehicle_title_history.title_status – Current legal title status of the vehicle
- vehicle_title_history.title_type – Type/category of the vehicle’s title (e.g., clean, salvage)
- vehicle_item.current_mileage – Latest recorded mileage on the vehicle
- stock_no.company_branch – Company branch/location associated with this stock item
- stock_no.acquisition_cost – Total cost incurred to acquire the vehicle
- serial_no.company – Company linked to the serial number record
- stock_no.modified – Timestamp of the most recent update to the stock item
- stock_no.acquisition_type – Method or category of acquisition (e.g., trade-in, purchase)
- stock_no.acquisition_date – Date on which the vehicle was acquired
- stock_no.item – Item reference or master item identifier for the stock record
Example Response :
{
"message": {
"rowData": [
{
"stock_no.name": "-02034",
"vehicle_item.main_image": null,
"stock_no.alternate_stock_no": null,
"vehicle_item.vin": "SALFT2BN1AH200936",
"stock_no.inventory_stage": "InTransit",
"serial_no.status": "Inactive",
"stock_no.sales_status": "Not Sold",
"vehicle_title_history.title_status": "Unknown",
"vehicle_title_history.title_type": "Clear",
"vehicle_item.current_mileage": "25000",
"stock_no.company_branch": null,
"stock_no.acquisition_cost": 0.0,
"serial_no.company": "Emotive Auto Sales Inc.",
"stock_no.modified": "2025-03-11 10:30:10.280756",
"stock_no.acquisition_type": "Purchase",
"stock_no.acquisition_date": null,
"stock_no.item": "2010 Land Rover LR2 - SALFT2BN1AH200936 -00001"
},
{
"stock_no.name": "01-00001",
"vehicle_item.main_image": "/private/files/download9f0519.jpg",
"stock_no.alternate_stock_no": "",
"vehicle_item.vin": "5XYKU4A2XBG043259",
"stock_no.inventory_stage": "Pending Sale",
"serial_no.status": "Active",
"stock_no.sales_status": "Contracted",
"vehicle_title_history.title_status": "Received",
"vehicle_title_history.title_type": "Clear",
"vehicle_item.current_mileage": "12",
"stock_no.company_branch": "Emotive Recon Center",
"stock_no.acquisition_cost": 1000.0,
"serial_no.company": "Emotive Auto Sales Inc.",
"stock_no.modified": "2025-09-17 16:10:51.187540",
"stock_no.acquisition_type": "Purchase",
"stock_no.acquisition_date": "2024-03-13",
"stock_no.item": "VH0000001"
}
],
"user_info": {}
}
}