public
POST /v1/wp/pro-discount/{siteId}
The hosting-customer Pro discount, asked for from a hosted site's wp-admin.
Authentication
Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/wp/pro-discount/{siteId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "plugin": <string> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Called by a Zinn® free plugin's upgrade card on a WordPress site we host, not by a person. action: status says whether the site's owner qualifies and returns a live code if one exists, without creating anything; action: issue returns the owner's code, creating it if needed. It is the SAME code the owner sees in the dashboard — one per customer per Pro plugin, whichever door they use. Authenticated by the site's own secret, exactly as getSitePanel: X-Zinn-Cache-Signature: sha256=HMAC(timestamp + "\n" + body) keyed with the site's ZINN_UPDATE_SECRET, and the response is signed back in X-Zinn-Signature over the request's timestamp and the response body. Anything unauthenticated, stale, unknown or deleted is a 404.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
plugin | string | Yes | The free plugin whose upgrade card is asking. |
action | string<status, issue> | No | — |
locale | string | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
terms | ProDiscountTerms | Yes | The hosting-customer discount's terms, read from the plugin registry. |
offer | object | Yes | — |
state | string<not_offered, not_eligible, available, active, redeemed, unavailable> | Yes | unavailable means the store could not be reached just now — try again; it is never the customer's fault and never names a vendor. |
code | ProDiscountCode | No | — |
Errors this endpoint can return
404 · 429