Create a license

更新时间:
复制 MD 格式

This API notifies an Independent Software Vendor (ISV) to create a software license.

API description

When a user purchases software from an ISV, an order is sent to the ISV. The ISV uses the order information to create the required software license.

Request parameters

Name

Type

Required

Example value

Description

action

String

Yes

CREATE_ORDER

The operation to perform. The value must be `CREATE_ORDER`.

buyerId

Long

Yes

123451234512345

The ID of the buyer.

orderId

Long

Yes

1234512345

The ID of the order.

Request example

{
   "action": "CREATE_ORDER",
   "buyerId": 123451234512345,
   "orderId": 1234512345
}

Returned data

Name

Type

Example value

Description

isvOrderStatus

String

DEPLOYED

The status of the license. Possible values:

  • CREATING: The license is being created.

  • Successfully deployed

  • DEPLOY_FAILED: The creation process failed.

licenseInfo

Array

{"effet":true,"licenseUserCount":10}

If the creation is successful, an object that contains license information is returned.

effect

Boolean

true

Specifies whether the license is in effect.

licenseUserCount

Integer

10

The number of users included in the license. This is a sub-parameter of `licenseInfo`.

startTime

Long

1625097600

The time when the license becomes effective. The value is a UNIX timestamp. This is a sub-parameter of `licenseInfo`.

endTime

Long

1656633600

The expiration time of the license. The value is a UNIX timestamp.

errorMessage

String

err msg description

If the creation fails, an error message is returned.

errorCode

String

XXX_YYY

If the creation fails, an error code is returned.

Response examples

  • Creating

    {
        "isvOrderStatus": "CREATING",
        "licenseInfo": null,
        "errorMessage": null,
        "errorCode": null
    }
  • Success

    {
        "isvOrderStatus": "DEPLOYED",
        "licenseInfo": {
            "effect": true,
            "licenseUserCount": 10,
            "startTime": 1625097600,
            "endTime": 1656633600
        },
        "errorMessage": null,
        "errorCode": null
    }
  • Failure

    {
        "isvOrderStatus": "DEPLOY_FAILED",
        "licenseInfo": null,
        "errorMessage": "err msg description",
        "errorCode": "XXX_YYY"
    }