PUT /service/api/ecom/licenses/{licenseId}

Updates (renew license, increase seats etc.) a license, child license, or trial license by its license id.

When renewing a license, pass the appropriate PartnerProductId in the request.

Note: If only the "Seats" field is specified under the "Item" element and the number being specified is less than the present seat number of the license, the request is interpreted as a license downgrade (decrease seats). Downgrading a license does not create a new order and thus the order element of the response will be null and the response body will look like { "Order": null }.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
licenseId

The id of the license.

integer

Required

Body Parameters

UpdateLicenseRequestServiceModel
NameDescriptionTypeAdditional Information
Order

Order element.

UpdateLicenseRequestServiceModel_Order

None.

Sample Request

{
  "Order": {
    "PartnerOrderCode": null,
    "PartnerOrderDate": null,
    "LanguageCode": "EN",
    "LocationCode": "USA",
    "PurchaseOrder": null,
    "Item": {
      "Modules": [
        {
          "Code": "DNS",
          "Seats": 50
        },
        {
          "Code": "WSAT",
          "Seats": 50
        }
      ],
      "PartnerProductId": "113400101",
      "Seats": 50,
      "ListPrice": null,
      "UnitPrice": null,
      "StartDate": null,
      "ExpirationDate": null
    },
    "Customers": [
      {
        "ExternalAccountId": "MyAccountRef1347",
        "FirstName": "John",
        "LastName": "Doe",
        "CompanyName": "Incorporated Inc.",
        "CustomerEmail": "jdoe@incorporated.com",
        "PhoneNumber": "07285411",
        "Address1": "Samplestreet 5",
        "Address2": null,
        "City": "Denver",
        "State": "CO",
        "Country": "USA",
        "PostalCode": "80123",
        "OrderCompanyTypeId": 1
      }
    ]
  }
}                    
<UpdateLicenseRequestServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <Order>
    <Customers>
      <UpdateLicenseRequestServiceModel_Customer>
        <Address1>Samplestreet 5</Address1>
        <Address2 i:nil="true" />
        <City>Denver</City>
        <CompanyName>Incorporated Inc.</CompanyName>
        <Country>USA</Country>
        <CustomerEmail>jdoe@incorporated.com</CustomerEmail>
        <ExternalAccountId>MyAccountRef1347</ExternalAccountId>
        <FirstName>John</FirstName>
        <LastName>Doe</LastName>
        <OrderCompanyTypeId>1</OrderCompanyTypeId>
        <PhoneNumber>07285411</PhoneNumber>
        <PostalCode>80123</PostalCode>
        <State>CO</State>
      </UpdateLicenseRequestServiceModel_Customer>
    </Customers>
    <Item>
      <ExpirationDate i:nil="true" />
      <ListPrice i:nil="true" />
      <Modules>
        <UpdateLicenseRequestServiceModel_Module>
          <Code>DNS</Code>
          <Seats>50</Seats>
        </UpdateLicenseRequestServiceModel_Module>
        <UpdateLicenseRequestServiceModel_Module>
          <Code>WSAT</Code>
          <Seats>50</Seats>
        </UpdateLicenseRequestServiceModel_Module>
      </Modules>
      <PartnerProductId>113400101</PartnerProductId>
      <Seats>50</Seats>
      <StartDate i:nil="true" />
      <UnitPrice i:nil="true" />
    </Item>
    <LanguageCode>EN</LanguageCode>
    <LocationCode>USA</LocationCode>
    <PartnerOrderCode i:nil="true" />
    <PartnerOrderDate i:nil="true" />
    <PurchaseOrder i:nil="true" />
  </Order>
</UpdateLicenseRequestServiceModel>                    

Response Information

Resource Description

Details about updated license.

UpdateLicenseResponseServiceModel
NameDescriptionTypeAdditional Information
Order

Order element.

UpdateLicenseResponseServiceModel_Order

None.

Sample Response

{
  "Order": {
    "VendorOrderCode": "PSV0061602653",
    "VendorOrderDate": "2019-07-18T15:45:36.287304Z",
    "CurrencyCode": "USD",
    "TotalAmount": 5000.0,
    "SubTotalAmount": 5000.0,
    "TaxTotal": 0.0,
    "Items": [
      {
        "ProductId": "113400101",
        "Quantity": 1,
        "Seats": 50,
        "Years": 1,
        "ListPrice": 100.0,
        "UnitPrice": 100.0,
        "LicenseId": 198110748,
        "Keycode": "C3E2CBBD034E475BB502",
        "Modules": [
          {
            "ProductId": "113400101",
            "Quantity": 1,
            "Seats": 50,
            "Years": 2,
            "ListPrice": 200.0,
            "UnitPrice": 250.0
          }
        ]
      }
    ],
    "Customer": {
      "FirstName": "John",
      "LastName": "Doe",
      "CompanyName": "Incorporated Inc.",
      "CustomerEmail": "jdoe@incorporated.com",
      "PhoneNumber": "07275768",
      "Address1": "Samplestreet 5",
      "Address2": null,
      "City": "Denver",
      "State": "CO",
      "PostalCode": "80123",
      "Country": "USA"
    }
  }
}                    
<UpdateLicenseResponseServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <Order>
    <CurrencyCode>USD</CurrencyCode>
    <Customer>
      <Address1>Samplestreet 5</Address1>
      <Address2 i:nil="true" />
      <City>Denver</City>
      <CompanyName>Incorporated Inc.</CompanyName>
      <Country>USA</Country>
      <CustomerEmail>jdoe@incorporated.com</CustomerEmail>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PhoneNumber>07275768</PhoneNumber>
      <PostalCode>80123</PostalCode>
      <State>CO</State>
    </Customer>
    <Items>
      <UpdateLicenseResponseServiceModel_Item>
        <Keycode>C3E2CBBD034E475BB502</Keycode>
        <LicenseId>198110748</LicenseId>
        <ListPrice>100</ListPrice>
        <Modules>
          <UpdateLicenseResponseServiceModel_Module>
            <ListPrice>200</ListPrice>
            <ProductId>113400101</ProductId>
            <Quantity>1</Quantity>
            <Seats>50</Seats>
            <UnitPrice>250</UnitPrice>
            <Years>2</Years>
          </UpdateLicenseResponseServiceModel_Module>
        </Modules>
        <ProductId>113400101</ProductId>
        <Quantity>1</Quantity>
        <Seats>50</Seats>
        <UnitPrice>100</UnitPrice>
        <Years>1</Years>
      </UpdateLicenseResponseServiceModel_Item>
    </Items>
    <SubTotalAmount>5000</SubTotalAmount>
    <TaxTotal>0</TaxTotal>
    <TotalAmount>5000</TotalAmount>
    <VendorOrderCode>PSV0061602653</VendorOrderCode>
    <VendorOrderDate>2019-07-18T15:45:36.287304Z</VendorOrderDate>
  </Order>
</UpdateLicenseResponseServiceModel>