Documentation REST API Stock Queries and Item Ledger Reports

Stock Queries and Item Ledger Reports

Retrieve available stock

GET https://[SERVER]/integration/rest/V1/ItemInst?finder=findByExternStatusReceived

For large stock datasets, use a filtered finder instead of retrieving every record.

Generate an item ledger report

POST https://[SERVER]/integration/rest/V1/generateItemLedgerReport/ITEM_LEDGER_REPORTS?fromInMs=0

The fromInMs parameter represents milliseconds since the Unix epoch.
Use it to request ledger entries created after a known point in time.

Available report types

  • SALES_REPORT
  • PURCHASE_REPORT
  • RETURN_REPORT
  • GENERIC_REPORT
  • GOODS_ISSUE_REPORT
  • GOODS_RECEIPT_REPORT
  • TRANSFER_OUT_REPORT
  • TRANSFER_IN_REPORT
  • SALES_LEDGER_REPORT

Example sales report request

POST https://[SERVER]/integration/rest/V1/generateItemLedgerReport/SALES_REPORT?fromInMs=0

Integration recommendations

  • Store the timestamp of the latest successfully processed record.
  • Use that timestamp in the next fromInMs request.
  • Make processing idempotent to prevent duplicate transactions.
  • Log the request period and number of returned records.
  • Avoid repeatedly requesting the full ledger in production.