Get Stock No

API Endpoint: Get Stock Information

Purpose

This endpoint retrieves detailed information about a specific stock item identified by its stock number. It provides essential details such as ownership, creation and modification dates, costs, and various pricing metrics.

Request Format

  • Method: GET

  • Endpoint: {{url}}/api/resource/Stock No

Response Structure

The response will return a JSON object containing the following key components:

  1. data: This key contains the details of the stock item. The structure can vary based on the stock number queried.

    • When a single stock item is found, the response will include:

      • name: The name of the stock item.

      • owner: The owner of the stock item.

      • creation: Timestamp of when the stock item was created.

      • modified: Timestamp of the last modification.

      • modified_by: Identifier of the user who last modified the stock item.

      • docstatus: Status of the document (e.g., draft, submitted).

      • idx: Index of the stock item.

      • naming_series: The naming series of the stock item.

      • serial_no: The serial number associated with the stock item.

      • alternate_stock_no: Any alternate stock number.

      • costs: Various cost metrics including:

        • auto_loaded_costs

        • acquisition_cost

        • capitalized_cost

        • non_capitalized_cost

        • soft_cost

        • hard_pack_cost

        • total_cost

      • valuation_mileage: Mileage valuation for the stock item.

      • trade_value, retail_value, wholesale_value: Different valuation metrics.

      • pricing: Includes various pricing details such as:

        • offer_price

        • bid_price

        • pricing_msrp

        • asking_price_1

        • asking_price_2

      • doctype: Document type of the stock item.

    • If multiple stock items are found, the response will be an array of objects, each containing:

      • serial_no: The serial number of the stock item.

      • item: The item associated with the stock.

      • company: The company related to the stock.

      • company_branch: The branch of the company.

Example Response

{
  "data": {
    "name": "",
    "owner": "",
    "creation": "",
    "modified": "",
    "modified_by": "",
    "docstatus": 0,
    "idx": 0,
    "naming_series": "",
    "serial_no": "",
    "alternate_stock_no": "",
    "auto_loaded_costs": 0,
    "is_converted": 0,
    "item": "",
    "vin": "",
    "vehicle": "",
    "company": "",
    "inventory_stage": "",
    "company_branch": "",
    "sales_status": "",
    "acquisition_type": "",
    "acquired_from": "",
    "acquisition_buyer": "",
    "acquisition_date": "",
    "purchase_document_type": "",
    "purchase_document": "",
    "acquisition_cost": 0,
    "capitalized_cost": 0,
    "non_capitalized_cost": 0,
    "soft_cost": 0,
    "hard_pack_cost": 0,
    "total_without_pack": 0,
    "total_pack_cost": 0,
    "total_cost": 0,
    "valuation_mileage": 0,
    "trade_value": 0,
    "retail_value": 0,
    "wholesale_value": 0,
    "offer_price": 0,
    "bid_price": 0,
    "pricing_msrp": 0,
    "asking_price_1": 0,
    "asking_price_2": 0,
    "pricing_condition": "",
    "price_tier": "",
    "req_down_payment": 0,
    "estimated_frequency": "",
    "estimated_term": "",
    "is_published": 0,
    "doctype": ""
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Response Structure


The root key in every response is:

data

Depending on the request, this key contains:

  • A single stock item object (detailed response), or
  • An array of stock item objects (list response)

When a Single Stock Item Is Returned

  • name – Unique identifier of the stock item record
  • owner – User who created the stock record
  • creation – Timestamp of when the record was created
  • modified – Timestamp of the last update
  • modified_by – User who last modified the record
  • docstatus – Document status (0 = Draft, 1 = Submitted, 2 = Cancelled)
  • idx – Internal index value
  • naming_series – Naming series used to generate the stock number
  • serial_no – Serial number associated with the stock item
  • alternate_stock_no – Alternative or secondary stock number

Cost-Related Fields

  • auto_loaded_costs – Automatically calculated loaded costs
  • acquisition_cost – Cost incurred to acquire the item
  • capitalized_cost – Cost capitalized as an asset
  • non_capitalized_cost – Cost expensed immediately
  • soft_cost – Non-tangible costs (transport, handling, etc.)
  • hard_pack_cost – Costs related to physical add-ons
  • total_cost – Final total cost including all components

Valuation & Pricing Fields

  • valuation_mileage – Mileage used for valuation (often for vehicles)
  • trade_value – Trade-in value
  • retail_value – Retail market value
  • wholesale_value – Wholesale market value

Detailed Pricing Information

  • offer_price – Selling offer price
  • bid_price – Value offered by a buyer
  • pricing_msrp – Manufacturer’s Suggested Retail Price (MSRP)
  • asking_price_1 – Primary asking price
  • asking_price_2 – Secondary asking price

Other Fields

  • doctype – Document type (e.g., Stock No)

When Multiple Stock Items Are Returned

Each object in the data array includes:

  • serial_no – Serial number for the stock item
  • item – Linked item/product
  • company – Company associated with the stock item
  • company_branch – Branch of the company managing the stock item

Example Response:

{
  "data": {
    "name": "",
    "owner": "",
    "creation": "",
    "modified": "",
    "modified_by": "",
    "docstatus": 0,
    "idx": 0,
    "naming_series": "",
    "serial_no": "",
    "alternate_stock_no": "",
    "auto_loaded_costs": 0,
    "is_converted": 0,
    "item": "",
    "vin": "",
    "vehicle": "",
    "company": "",
    "inventory_stage": "",
    "company_branch": "",
    "sales_status": "",
    "acquisition_type": "",
    "acquired_from": "",
    "acquisition_buyer": "",
    "acquisition_date": "",
    "purchase_document_type": "",
    "purchase_document": "",
    "acquisition_cost": 0,
    "capitalized_cost": 0,
    "non_capitalized_cost": 0,
    "soft_cost": 0,
    "hard_pack_cost": 0,
    "total_without_pack": 0,
    "total_pack_cost": 0,
    "total_cost": 0,
    "valuation_mileage": 0,
    "trade_value": 0,
    "retail_value": 0,
    "wholesale_value": 0,
    "offer_price": 0,
    "bid_price": 0,
    "pricing_msrp": 0,
    "asking_price_1": 0,
    "asking_price_2": 0,
    "pricing_condition": "",
    "price_tier": "",
    "req_down_payment": 0,
    "estimated_frequency": "",
    "estimated_term": "",
    "is_published": 0,
    "doctype": ""
  }
}

Query Params
number
Defaults to 20

Skip the first 'n'

number
Defaults to 40

By default, 20 records are loaded.

string
Defaults to creation desc

Orders the results by a variable and asc/desc

string
Defaults to ["name","business_phone_numbers_string"]

Fields that you want to fetch. "name" is the primary key or ID of the document

string
Defaults to [["name","like","%01-00460%"]]

Filters can be passed in as arrays.

string

Similar to filters, but they perform a Logical OR

Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json