Skip to content

ffl_integrations.fastbound.inventory_sync

Source: apps/ffl_integrations/ffl_integrations/fastbound/inventory_sync.py · 2 endpoint(s)

Generated by make api-docs — do not edit by hand.

boundbook_mismatches

POST /api/method/ffl_integrations.fastbound.inventory_sync.boundbook_mismatches

Auth (derived from code): Roles: System Manager / Sales User / Sales Manager / Stock User / Stock Manager / Accounts User

Report in-stock firearms FastBound shows as disposed — dry run only.

The read-only face of sync_in_stock_from_boundbook: it runs the same reconcile with the dry-run switch hard-wired on, so it can never Material-Issue stock (there is no flag to turn writing on). Safe for read-only API consumers such as the nightly check. POST-only because it pages the whole FastBound book on every call.

Returns: Same dict as sync_in_stock_from_boundbook with dry_run=1: {dry_run: True, fb_disposed_count, would_remove, would_remove_count, consignment_held, consignment_held_count}. A dry run always reports every mismatch.

apps/ffl_integrations/ffl_integrations/fastbound/inventory_sync.py:62

sync_in_stock_from_boundbook

POST /api/method/ffl_integrations.fastbound.inventory_sync.sync_in_stock_from_boundbook

Auth (derived from code): Roles: Sales Manager / Stock Manager / System Manager

Material-Issue in-stock firearms FastBound reports disposed.

arg type required default description
dry_run int str no 0
item_ids — no None On the real run, the ids the operator approved from the dry-run preview — only those are removed, and only if still disposed and in stock. That makes the confirmation authoritative: a firearm that became disposed between the preview and the apply is never removed without being shown.

Returns: Dry run: {dry_run: True, fb_disposed_count, would_remove, would_remove_count, consignment_held, consignment_held_count}; real run: {dry_run: False, fb_disposed_count, removed, removed_count, errors}. Guns held at a consignment dealer are reported under consignment_held and are never removed by either run — "disposed in FastBound, in stock here" is their correct steady state, not a discrepancy (see in_stock_targets).

Permissions: Stock Manager / Sales Manager / System Manager.

apps/ffl_integrations/ffl_integrations/fastbound/inventory_sync.py:33