Developers
REST endpoints, webhook events and the filters and actions worth knowing about.
REST API
Namespace profitsync/v1. Every endpoint requires the manage_woocommerce capability.
| Endpoint | Returns | Parameters |
|---|---|---|
GET /dashboard | KPIs, charts, alerts and notifications. | range |
GET /orders | Order rows with pagination and aggregates. | search, sort, paged, per_page |
GET /products | Top products and product quick stats. | range |
GET /categories | Profit distribution by category. | range |
GET /notifications | Internal notifications. | limit |
Webhook events
When webhooks are enabled, Profitrics posts signed JSON for snapshot_rebuild_completed, threshold_breach and alert_triggered. Each request carries X-ProfitSync-Event, and X-ProfitSync-Signature when a secret is set.
Filters and actions
| Hook | Type | Fires |
|---|---|---|
profitsync_order_profit_calculated | Filter | After an order's profit is calculated. |
profitsync_dashboard_data | Filter | Before the dashboard payload is returned. |
profitsync_orders_aggregates | Filter | After the Orders KPI aggregates are built. |
profitsync_orders_page | Filter | After paginated order rows are prepared. |
profitsync_evaluated_alerts | Filter | After the alert engine evaluates rules. |
profitsync_webhook_payload | Filter | Before a webhook body is sent. |
profitsync_alerts_triggered | Action | When threshold alerts fire. |
profitsync_internal_notification_created | Action | When an internal notification is created. |
profitsync_snapshot_rebuild_completed | Action | When a rebuild finishes. |
profitsync_webhook_dispatched | Action | After a webhook dispatch attempt. |
profitsync_export_started | Action | When an export begins, with its type. |
profitsync_export_completed | Action | When an export finishes, with its type and row count. |
add_filter( 'profitsync_order_profit_calculated', function ( $profit, $order_id ) {
// Subtract a per-order cost your store tracks elsewhere.
return $profit - my_packing_cost( $order_id );
}, 10, 2 );Was this page helpful?Updated 2026-10-25