Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

 

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

Expand
titleExample
Code Block
titleRequest
GET https://go.netlicensing.io/core/v2/rest/token
Accept: application/xml
Code Block
titleResponse
languagehtml/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>
Code Block
titleTry it now
languagebash
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/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

Expand
titleExample
Code Block
titleRequest
GET https://go.netlicensing.io/core/v2/rest/token/a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48
Accept: application/xml
Code Block
titleResponse
languagehtml/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>
Code Block
titleTry it now
languagebash
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/token/a6cd4cc9-5a37-4f8f-8c1d-090bd6e4bd48

 

...

HTTP Method / URL

POST /core/v2/rest/token

Security

Basic Authentication
API Key Identification

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 netlicensingShop
                   (licenseeNumber is mandatory)

- APIKEY - APIKey-token


licenseeNumber (string) - only for tokenType=SHOP; identifies licensee that will be assigned to the shop token

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

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

Expand
titleExample
Code Block
titleRequest
POST https://go.netlicensing.io/core/v2/rest/token
tokenType=SHOP&licenseeNumber=I001-DEMO
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Code Block
titleResponse
languagehtml/xml
<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>
Code Block
titleTry it now
languagebash
$ 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 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

Expand
titleExample
Code Block
titleRequest
DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40
Accept: application/xml
Code Block
titleResponse
HTTP/1.1 204 No Content
Code Block
titleTry it now
languagebash
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request DELETE https://go.netlicensing.io/core/v2/rest/token/c6d36895-f2a7-497a-aad1-4290c1d17f40