Link

Product Module Services

Product modules list

Return a list of all product modules for the current vendor.

HTTP Method / URL

GET /core/v2/rest/productmodule

Security
  • Basic Authentication
  • API Key Identification
    • ROLE_APIKEY_ADMIN
    • ROLE_APIKEY_MAINTENANCE
    • ROLE_APIKEY_OPERATION
    • ROLE_APIKEY_ANALYTICS

Request Header

Accept: application/json | application/xml

Request Parameters

 - None -

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: ProductModuleService.list

Example

Request
GET https://go.netlicensing.io/core/v2/rest/productmodule
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M001</property>
            <property name="active">true</property>
            <property name="name">Product Module Numero Duo</property>
            <property name="licensingModel">LMOD1</property>
        </item>
    </items>
</netlicensing>

Get product module

Return a product module by productModuleNumber.

HTTP Method / URL

GET /core/v2/rest/productmodule/{productModuleNumber}

Security
  • Basic Authentication
  • API Key Identification
    • ROLE_APIKEY_ADMIN
    • ROLE_APIKEY_MAINTENANCE
    • ROLE_APIKEY_OPERATION
    • ROLE_APIKEY_ANALYTICS

Request Header

Accept: application/json | application/xml

Request Parameters

productModuleNumber (string) - Product module number.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: ProductModuleService.get

Example

Request
GET https://go.netlicensing.io/core/v2/rest/productmodule/M001
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M001</property>
            <property name="active">true</property>
            <property name="name">Product Module Numero Duo</property>
            <property name="licensingModel">LMOD1</property>
        </item>
    </items>
</netlicensing>

Create product module

Creates a new product module.

HTTP Method / URL

POST /core/v2/rest/productmodule

Security

Request Header

Accept: application/json | application/xml
Content-Type: application/x-www-form-urlencoded

Request Parameters

productNumber (string) - Unique number (across all products of a vendor) that identifies the product module. Vendor can assign this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first licensee for the product.

active (boolean) - If set to 'false', the product module is disabled. Licensees can not obtain any new licenses for this product module.

name (string) - Product module name that is visible to the end customers in NetLicensing Shop.

licensingModel (Array[string]) - Licensing model applied to this product module. Defines what license templates can be configured for the product module and how licenses for this product module are processed during validation. Supported types: "Subscription", "TryAndBuy", "Rental", "Floating", "MultiFeature", "PayPerUse".

 

number (string) - Unique number (across all products of a vendor) that identifies the product module. Vendor can assign this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first licensee for the product. Optional.

maxCheckoutValidity (integer) - Maximum checkout validity (days). Mandatory for 'Floating' licensing model.

yellowThreshold (integer) - Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.

redThreshold (integer) - Remaining time volume for red level. Mandatory for 'Rental' licensing model.

licenseTemplate (Array[string]) - License template. Mandatory for 'Try & Buy' licensing model. Supported types: "TIMEVOLUME", "FEATURE".

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
402 - Quota exceeded
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: ProductModuleService.create

Example

Request
POST https://go.netlicensing.io/core/v2/rest/productmodule
productNumber=PQVJQ5F7H&number=M0UKRZU3X&active=false&name=Product+Module+JB8KUEW8&licensingModel=LM-E4UWXR75
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M0UKRZU3X</property>
            <property name="active">false</property>
            <property name="name">Product Module JB8KUEW8</property>
            <property name="licensingModel">LM-E4UWXR75</property>
        </item>
    </items>
</netlicensing>

Update product module

Sets the provided properties to a product module. Return an updated product module.

HTTP Method / URL

POST /core/v2/rest/productmodule/{productModuleNumber}

Security

Request Header

Accept: application/json | application/xml
Content-Type: application/x-www-form-urlencoded

Request Parameters

productModuleNumber (string) - Product module number.

number (string) - New product module number (update). Optional.

active (boolean) - If set to 'false', the product module is disabled. Licensees can not obtain any new licenses for this product module. Optional.

name (string) - Product module name that is visible to the end customers in NetLicensing Shop. Optional.

licensingModel (Array[string]) - Licensing model applied to this product module. Defines what license templates can be configured for the product module and how licenses for this product module are processed during validation. Supported types: "Subscription", "TryAndBuy", "Rental", "Floating", "MultiFeature", "PayPerUse". Optional.

maxCheckoutValidity (integer) - Maximum checkout validity (days). Mandatory for 'Floating' licensing model. Optional.

yellowThreshold (integer) - Remaining time volume for yellow level. Mandatory for 'Rental' licensing model. Optional.

redThreshold (integer) - Remaining time volume for red level. Mandatory for 'Rental' licensing model. Optional.

licenseTemplate (Array[string]) - License template. Mandatory for 'Try & Buy' licensing model. Supported types: "TIMEVOLUME", "FEATURE". Optional.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
402 - Quota exceeded
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: ProductModuleService.update

Example

Request
POST https://go.netlicensing.io/core/v2/rest/productmodule/M001
number=MNAR74BK9&name=newName
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">MNAR74BK9</property>
            <property name="active">false</property>
            <property name="name">newName</property>
            <property name="licensingModel">FeatureTimeVolume</property>
        </item>
    </items>
</netlicensing>

Delete product module

Delete a product module by number.

HTTP Method / URL

DELETE /core/v2/rest/productmodule/{productModuleNumber}?forceCascade

Security

Request Header

Accept: application/json | application/xml

Request Parameters

productModuleNumber (string) - Product module number.
forceCascade (boolean) - Force object deletion and all descendants.

HTTP Status Code

204 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: ProductModuleService.delete

Example

Request
DELETE https://go.netlicensing.io/core/v2/rest/productmodule/M001
Accept: application/xml
Response
HTTP/1.1 204 No Content