API Documentation

Integraciones

No-Code Platforms

Zapier, Make, n8n, Pabbly Connect, Activepieces and similar tools all speak plain HTTP, so no special connector is needed. There are two ways to wire them up.

  1. In your automation tool, create a scenario starting with a Webhook / Catch Hook trigger and copy the URL it gives you.
  2. In WordPress, go to Coupon Affiliates → Admin Tools → API → Webhooks and add an endpoint with that URL, subscribed to the events you care about.
  3. Press Prueba. Your tool receives a ping payload and learns the structure.
  4. Map the fields from data into whatever comes next — a Slack message, a spreadsheet row, a CRM record.

This is instant, costs no polling quota, and scales to any program size.

Warning
Most no-code tools cannot verify the HMAC signature. Treat the catch-hook URL itself as a secret: it is long and unguessable, so do not publish it, and never let the automation perform a destructive or financial action purely on the say-so of an unverified payload. Where the action matters, have the scenario read the object back from the API (for example GET /payouts/{id}) before acting on it.

Pull: scheduled polling

If you are on the free version, or your tool cannot receive webhooks, poll the change feed on a schedule instead:

  1. Add a Scheduled trigger (every 5–15 minutes is plenty).
  2. Add an HTTP GET module pointed at https://example.com/wp-json/wcusage/v2/events with the query after={{ last_id }}&per_page=100, and a header Authorization: Bearer wcus_….
  3. Store the response header X-WCUsage-Last-Event in a data store / variable, and feed it back as last_id next run.
  4. Iterate the returned array and branch on event.

Starting from after=0 would replay the whole history, so seed the cursor once with a single unfiltered call and store the highest id you see.

Writing back

Actions such as approving an application are ordinary HTTP requests:

Method:  POST
URL:     https://example.com/wp-json/wcusage/v2/registrations/512/status
Headers: Authorization: Bearer wcus_...
         Content-Type: application/json
Body:    { "status": "accepted", "send_email": true }

Use a key with write for this, and keep it separate from any read-only key you use elsewhere so you can revoke one without breaking the other.