Skip to content
View as Markdown
Enter your site to enable Send. Requests are sent from your browser, so the site must allow cross-origin calls (CORS).

POST Resync Campaign Revenues​

POST
/campaigns/{id}/revenues/resync

Re-synchronize the revenue data for a campaign by recalculating totals from WooCommerce orders. Updates the _campaign_revenue meta with fresh order totals. Only works with WooCommerce.

Required capability: fcrm_read_emails or fcrm_manage_emails — which one applies depends on the action being performed.

Enforced by CampaignPolicy::verifyRequest(), the policy default for this route group.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Parameters​

Path Parameters

id*

The campaign ID.

Type
integer
Required

Request Body​

application/json
JSON
{
"auto": "no"
}

Responses​

Revenue re-synced successfully or no revenue/orders found.

application/json
JSON
{
"message": "Revenue has been re-synced successfully",
"total": "4950.00"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI