ffl_core.api.agent¶
Source: apps/ffl_core/ffl_core/api/agent.py · 3 endpoint(s)
Generated by
make api-docs— do not edit by hand.
firearm_stock_summary¶
POST /api/method/ffl_core.api.agent.firearm_stock_summary
Auth (derived from code): Roles resolved at runtime via STOCK_READ_ROLES.
How many firearms the store has on hand, and how many of them can be sold.
A gun is on hand while its Serial No is Active. It is not for sale when the POS picker would not offer it: held on a ticket or order, reserved by a web or GunBroker order, consigned out, or a customer's transfer gun.
Returns: {on_hand, for_sale, not_for_sale, antiques, by_warehouse: {warehouse: count}, by_type: {firearm_type: count}}. Antiques are counted in on_hand and are not in the A&D book.
apps/ffl_core/ffl_core/api/agent.py:21
item_stock¶
POST /api/method/ffl_core.api.agent.item_stock
Auth (derived from code): Requires read permission on Item (Frappe DocType permission check).
Quantity on hand per item across all warehouses, for non-gun items.
| arg | type | required | default | description |
|---|---|---|---|---|
item_codes |
array | yes | — | Item codes — list, JSON list or comma-separated string. |
Returns: {item_code: total_actual_qty}.
apps/ffl_core/ffl_core/api/agent.py:78
serials_for_sale¶
POST /api/method/ffl_core.api.agent.serials_for_sale
Auth (derived from code): Roles: Sales User / Sales Manager / Stock Manager / System Manager
The units of each firearm item the counter would sell now, with their price.
| arg | type | required | default | description |
|---|---|---|---|---|
item_codes |
array | yes | — | Item codes — list, JSON list or comma-separated string. |
Returns: {item_code: [{"serial", "sell_price", "purchase_rate"}, ...]}, cheapest first.
apps/ffl_core/ffl_core/api/agent.py:63