Partner API 3.0: Modifying a License Key: Upgrade plan is not applicable to the license key

Created:

2017-01-26 17:04:10 UTC

Modified:

2017-08-08 13:46:06 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Partner API 3.0: Modifying a License Key: Upgrade plan is not applicable to the license key

Issue Symptoms

Unable to add feature identifier for existing license using Partner API 3.0:


code":"400","type":"24712","message":"Upgrade plan is not
applicable to the license key.","details":"Key number =
PLSK.12345678.0000."

Conditions

Incorrect API syntax

Resolution

The request should contain desired state of key. For example, if feature "Developer Pack" should be added, request should be:


[PUT] https://ka.demo.plesk.com:7050/jsonrest/business-partner/30/keys/10255288?return-key-state=yes
Body:
{
  "items": [
    {
      "externalId": null,
      "item": "PLESK-12-WEB-ADMIN-1M"
    },
    {
      "externalId": null,
      "item": "FT-PLESK-DEVELOPER-PACK-1M"
    }
  ]
}
If a new additional key "Developer Pack" should be created and attached to the parent key, use the following request:

REQUEST:
[POST] https://ka.demo.plesk.com:7050/jsonrest/business-partner/30/keys?return-key-state=yes
  {
    "items": [
      {
        "externalId": null,
        "item": "ADD-PLESK-DEVELOPER-PACK-1M"
      }
    ]
  }

RESPONSE:
{
    "ownerId": "1845778",
    "keyIdentifiers": {
        "keyId": 4004058,
        "keyNumber": "EXT.12345678.0000",
        "activationCode": null
    },
    "parentKeyIdentifiers": null,
    "activationInfo": null,
    "ipAddressBinding": null,
    "nickname": "",
    "productConfigurationId": null,
    "items": [
        {
            "externalId": null,
            "item": "ADD-PLESK-DEVELOPER-PACK-1M"
        }
    ],
    "creationDate": "2017-01-26T07:48:17.106Z",
    "lastModificationDate": "2017-01-26T07:48:17.114Z",
    "updateDate": "2017-02-26T00:00:00.000Z",
    "expirationDate": "2017-03-08T00:00:00.000Z",
    "susExpirationDate": null,
    "susStatus": null,
    "supportExpirationDate": null,
    "supportStatus": null,
    "status": "ACTIVE",
    "terminated": false,
    "suspended": false,
    "ownerSuspended": false,
    "autoRenew": true,
    "restrictIPBinding": false,
    "childKeyIdentifiers": [],
    "overridingKeyIdentifiers": null
}
Attach additional key to parent (it is required to send the new key state, returned in the first request and add parentKeyIdentifiers block):

[PUT] https://ka.demo.plesk.com:7050/jsonrest/business-partner/30/keys/4004058?return-key-state=yes
{
  "ownerId": "1845778",
  "keyIdentifiers": {
    "keyId": 4004058,
    "keyNumber": "EXT.12345678.0000",
    "activationCode": null
  },
  "parentKeyIdentifiers": {
        "keyId" : 4004055,
        "keyNumber": "PLSK.12345678.0001",
        "activationCode" : "A00000-A0000-00000-00000-00000"
  },
  "activationInfo": null,
  "ipAddressBinding": null,
  "nickname": "",
  "productConfigurationId": null,
  "items": [
    {
      "externalId": null,
      "item": "ADD-PLESK-DEVELOPER-PACK-1M"
    }
  ],
  "creationDate": "2017-01-26T07:48:17.106Z",
  "lastModificationDate": "2017-01-26T07:48:17.136Z",
  "updateDate": "2017-02-26T00:00:00.000Z",
  "expirationDate": "2017-03-08T00:00:00.000Z",
  "susExpirationDate": null,
  "susStatus": null,
  "supportExpirationDate": null,
  "supportStatus": null,
  "status": "ACTIVE",
  "terminated": false,
  "suspended": false,
  "ownerSuspended": false,
  "autoRenew": true,
  "restrictIPBinding": false,
  "childKeyIdentifiers": [],
  "overridingKeyIdentifiers": null
}

Have more questions? Submit a request
Please sign in to leave a comment.