One product, two policies

I can create licenses for the same product with different policies in the dashboard, but can I do the same with the Web API?

Hi Juanjo,

The Dashboard itself uses the REST API. So anything you can do in the Dashboard can be done through Web API too.

But the documentation does not explain how. I can specify the productId or the metadata but I don’t know what field to use to specify the policy.

$license_body["productId"] = "myproductid";
$metadata["key"] = "order_id";
$metadata["value"] = $order_id;
$metadata["visible"] = false;
$license_body["metadata"] = array($metadata);
$license = CryptlexApi::CreateLicense($license_body);

How do I specify the policy id here? I tried with policyId but didn’t work.

It does specify licensePolicyId as one of the post parameters.

Thank you. I was looking in the documentation, not in the API reference.
Maybe you should add a link to the API reference at this page.