Contents

Appendix B. Licensing API Reference

POST v1/paddlesubs/activations developer

Binds a site to one of the customer's licenses. Needs Activate sites (API). The body is JSON, either plain or as a JSON:API document's attributes:

{
    "user_id": 42,
    "product_ids": [7],
    "identifier": "https://www.example.com",
    "license_id": null
}
user_id (required)

The customer's Joomla user ID.

product_ids or product_id (required)

The licensed product, or several products any of which will do (for example a single product and a bundle that includes it).

identifier (required)

The site, as an address or a host name. It is normalized as described in the section called “How Sites Are Recognized”.

license_id

A particular license to use. Without it, PaddleSubs chooses an active license of the customer's with a free seat.

The answer is the activation: 201 Created for a new one, 200 OK if the site was already bound to the license, so it is safe to call every time the software starts. A site the license held before is bound again without counting as a change. Refusals are described in the section called “Refusal Codes”.

An activation's attributes:

AttributeMeaning
id, license_id, product_idThe activation, its license and product.
identifier_type, identifierdomain, and the normalized site, such as example.com.
statusactive, suspended, expired, inactive or released; see the section called “License and Activation States”. Only active means licensed.
counts_seatfalse for a development site that uses no seat.
activated_at, released_at, releasable_atWhen it was bound, released, and from when it can be released.
license_state, valid_until, lifetimeThe license's state and end, as above.