Token Services
Tokens list
Return a list of all tokens for the current vendor.
HTTP Method / URL | GET /core/v2/rest/token |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | - None - |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: TokenService.list
GET https://go.netlicensing.io/core/v2/rest/token
Accept: application/xml
<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>
$ 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 |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | tokenNumber (string) - Token number. |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: TokenService.get
GET https://go.netlicensing.io/core/v2/rest/token/a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48
Accept: application/xml
<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>
$ 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 |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | tokenType (enum) - Token type to be generated licenseeNumber (string) - unique customer number 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 apiKeyRole (string) - RoleID (see Security). Only for tokenType=APIKEY. |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: TokenService.create
POST https://go.netlicensing.io/core/v2/rest/token
tokenType=SHOP&licenseeNumber=I001-DEMO
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
<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>
$ 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 |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | tokenNumber (string) - Token number. |
HTTP Status Code | 204 - Successful request |
See also JavaDoc: TokenService.delete
DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40
Accept: application/xml
HTTP/1.1 204 No Content
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40