ffl_woo_sync.woocommerce.categories¶
Source: apps/ffl_woo_sync/ffl_woo_sync/woocommerce/categories.py · 1 endpoint(s)
Generated by
make api-docs— do not edit by hand.
recategorize_store¶
POST /api/method/ffl_woo_sync.woocommerce.categories.recategorize_store
Auth (derived from code): Roles: System Manager
Put the products on the store(s) in their tree category: the products whose
tree categories are not their node's term — e.g. filed under a parent before
their category was created on the store, or every product on a store's first
Apply (linking a term moves nothing by itself). Categories outside the tree
(Clearance, Open Box …) are kept. Per-serial guns count as products and are
counted apart (by_doctype).
Limit: a product's full push (and the catalog feed's re-categorise) still writes its tree category alone, dropping Clearance / Open Box — only this catch-up keeps them.
| arg | type | required | default | description |
|---|---|---|---|---|
site |
string | null | no | None |
"retail" (the only store); empty = every store that follows the tree. |
dry_run |
integer | no | 1 |
1 (default) reports only; 0 moves them in a background job (category only, paced; a product the store refuses lands in the Error Log). |
under |
— | no | None |
node slugs (a list, JSON list or comma-separated) — only the products filed in their subtrees; empty = the whole store. |
Returns: {site: {checked, to_move, by_doctype: {Item, Serial No}, moves: [{doctype, now, want, count, sample: [product ids]}] (grouped by the tree categories now → the one to get, largest first), no_term, no_node, gone, sample: [{doctype, name, item, product_id, category, now, want, set}] (the first 50)}}; applying adds queued: true per store. A store that does not follow the tree (or is not connected): {skipped: "off" | "not connected"}.
Permissions: System Manager.
apps/ffl_woo_sync/ffl_woo_sync/woocommerce/categories.py:673