REST API
Last updated
The React dashboard talks to WordPress through the REST API.
Core namespace
/wp-json/jwp-stk/v1/ — dashboard routes require manage_options.
GET /modules— list modules and active statePOST /modules/toggle— enable or disable a moduleGET|POST /settings— global settingsGET|POST /modules/{slug}/settings— per-module settingsGET /blocksandPOST /blocks/toggle— block togglesGET|DELETE /jobsandDELETE /jobs/{id}— background jobs (jobs list delete requires amodulearg)
Stock Manager
Requires manage_woocommerce. See Using the stock table.
GET /stock-manager/productsPATCH|POST /stock-manager/products/{id}
Store Reports
Requires manage_woocommerce except the public share download. See Running an export.
POST /store-reports/report,POST /store-reports/generateGET|POST /store-reports/presets;DELETE|PATCH /store-reports/presets/{id}GET /store-reports/optionsGET|POST /store-reports/schedules;PATCH|DELETE /store-reports/schedules/{id}GET /store-reports/jobs;GET /store-reports/jobs/{id}/downloadPOST|DELETE /store-reports/jobs/{id}/shareGET /store-reports/share/{token}— public file download
Extending
Modules can register extra routes on jwp_stk_register_rest_routes (namespace passed to the action).