Link

Token Services

Tokens list

Return a list of all tokens for the current vendor.

HTTP Method / URL

GET /core/v2/rest/token

Security
  • Basic Authentication

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: TokenService.list

Example

Request
GET https://go.netlicensing.io/core/v2/rest/token
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <infos />
    <items>
        <item type="Token">
            <property name="number">a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48</property>
            <property name="active">true</property>
            <property name="expirationTime">2014-01-30T13:21:03.071+01:00</property>
            <property name="tokenType">SHOP</property>
            <property name="shopURL">
                https://go.netlicensing.io/shop/v2/?shoptoken=a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48
            </property>
            <property name="licenseeNumber">I001-DEMO</property>
            <property name="vendorNumber">VDEMO</property>
        </item>
    </items>
</netlicensing>
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/token

 

Get token

Return a token by tokenNumber.

HTTP Method / URL

GET /core/v2/rest/token/{tokenNumber}

Security
  • Basic Authentication

Request Header

Accept: application/json | application/xml

Request Parameters

tokenNumber (string) - Token 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: TokenService.get

Example

Request
GET https://go.netlicensing.io/core/v2/rest/token/a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <infos />
    <items>
        <item type="Token">
            <property name="number">a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48</property>
            <property name="active">true</property>
            <property name="expirationTime">2014-01-30T13:21:03.071+01:00</property>
            <property name="tokenType">SHOP</property>
            <property name="shopURL">
                https://go.netlicensing.io/shop/v2/?shoptoken=a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48
            </property>
            <property name="licenseeNumber">I001-DEMO</property>
            <property name="vendorNumber">VDEMO</property>
        </item>
    </items>
</netlicensing>
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/token/a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48

 

Create token

Create token by tokenType and additional token parameters.

HTTP Method / URL

POST /core/v2/rest/token

Security
  • Basic Authentication
  • API Key Identification (Only for tokenType=SHOP)
    • ROLE_APIKEY_ADMIN
    • ROLE_APIKEY_MAINTENANCE
    • ROLE_APIKEY_OPERATION
    • ROLE_APIKEY_ANALYTICS
    • ROLE_APIKEY_LICENSEE

Request Header

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

Request Parameters

tokenType (enum) - Token type to be generated
- DEFAULT - default one-time token (will be expired after first request)
- SHOP - shop token is used to redirect customer to the NetLicensing Shop
APIKEY - APIKey token
ACTION - Action token (e.g. access token for the Customer Portal)

licenseeNumber (string) - unique customer number
- tokenType=SHOP - identifies licensee that will be assigned to the shop token
- tokenType=APIKEY - specifies the scope of validity of the APIKey; the only licensee with the given number can be validated using this APIKey
- tokenType=ACTION - identifies licensee for whom action token will be created

expirationTime (optional) - Specify a custom expiration time for the token. If not provided, the default expiration time of 30 minutes will be applied.

bundleNumber (optional / Bundle Shop Token) - Specify the bundle number to display on the Shop checkout page.

bundlePrice (optional / Bundle Shop Token) - Specify the customer's individual bundle price. The default bundle price will be used if no bundlePrice is set.

productNumber (optional / Permanent Shop Token) - The product to be purchased.

predefinedShoppingItem (optional / Permanent Shop Token) - The name of the shopping cart item to be purchased.

licenseTemplateNumber_N (optional / Permanent Shop Token) - The license template number(s), where N is an incrementing index starting from “1”.

successURL (URI) - Take customers to this URL when they finish checkout.

successURLTitle (string) - Shop link title for successful checkout process.

cancelURL (URI) - Take customers to this URL when they cancel their checkout.

cancelURLTitle (string) - Shop link title for cancel checkout process.

action (enum) - Action to be executed; only for tokenType=ACTION
- licenseeLogin - action to open Customer Portal

apiKeyRole (string) - RoleID (see Security). Only for tokenType=APIKEY.

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: TokenService.create

Example

Request
POST https://go.netlicensing.io/core/v2/rest/token
tokenType=SHOP&licenseeNumber=I001-DEMO
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <infos />
    <items>
        <item type="Token">
            <property name="number">c6d36895-f2a7-497a-aad1-4290c1d17f40</property>
            <property name="active">true</property>
            <property name="expirationTime">2014-01-30T13:16:09.675+01:00</property>
            <property name="tokenType">SHOP</property>
            <property name="shopURL">
                https://go.netlicensing.io/shop/v2/?shoptoken=c6d36895-f2a7-497a-aad1-4290c1d17f40
            </property>
            <property name="licenseeNumber">I001-DEMO</property>
            <property name="vendorNumber">VDEMO</property>
        </item>
    </items>
</netlicensing>
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request POST https://go.netlicensing.io/core/v2/rest/token --data "tokenType=SHOP&licenseeNumber=I001-DEMO"

Delete token

Delete a token by number.

HTTP Method / URL

DELETE /core/v2/rest/token/{tokenNumber}

Security
  • Basic Authentication

Request Header

Accept: application/json | application/xml

Request Parameters

tokenNumber (string) - Token number.

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: TokenService.delete

Example

Request
DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40
Accept: application/xml
Response
HTTP/1.1 204 No Content
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40