PBN.LTD API docs
View as Markdown

Pro plugin discount

Hosting customers get 50% off the first payment of our Pro plugins: eligibility and offers.

Pro plugin discount: eligibility and offers

GET/api/v1/pro-discount

Scope prodisc:read

Whether the account gets 50% off the first payment of our Pro plugins (an active, paid hosting plan), and each plugin in the offer with its state for you: available, active (you have an unused code) or redeemed. The code itself is only shown on the page (page_url), where you also ask for it.

Example

curl -s "https://app.pbn.ltd/api/v1/pro-discount" \
  -H "Authorization: Bearer $PBN_API_KEY"
import os
import requests

headers = {"Authorization": "Bearer " + os.environ["PBN_API_KEY"]}
r = requests.get("https://app.pbn.ltd/api/v1/pro-discount", headers=headers, timeout=120)
print(r.status_code, r.json())
const res = await fetch("https://app.pbn.ltd/api/v1/pro-discount", {
  method: "GET",
  headers: {Authorization: `Bearer ${process.env.PBN_API_KEY}`}
});
console.log(res.status, await res.json());

Response

200

{
  "data": {
    "eligible": true,
    "reason": "",
    "page_url": "https://app.pbn.ltd/pro-discount/",
    "terms": {
      "percent": 50,
      "first_payment_only": true,
      "code_valid_days": 30
    },
    "offers": [
      {
        "product": "zinn-cache-pro",
        "name": "Zinn Cache Pro",
        "plugin_name": "Zinn Cache",
        "state": "available"
      }
    ]
  }
}

Errors: rate_limited, scope_missing, unauthorized