Deprecated

Announced Jun 1, 2020: APIs under the ECom.Licenses scope are scheduled for End of Life effective December 1, 2020. At that time this API will no longer be available. Please see ECom.Shop (e.g. Create Cart) for the next generation Ecommerce API functionality.

POST /service/api/ecom/licenses

Creates one or multiple licenses. Returns order details along with the license id and keycode created for each item in the order.

Request Information

URI Parameters

None.

URI Sample(s)

POST
https://unityapi.webrootcloudav.com/service/api/ecom/licenses

Body Parameters

CreateLicensesRequestServiceModel
NameDescriptionTypeAdditional Information
Order

Order element.

CreateLicensesRequestServiceModel_Order

None.

Sample Request

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

Response Information

Resource Description

Details about created license.

CreateLicensesResponseServiceModel
NameDescriptionTypeAdditional Information
Order

Order element.

CreateLicensesResponseServiceModel_Order

None.

Sample Response

{
  "Order": {
    "VendorOrderCode": "PSV0054516909",
    "VendorOrderDate": "2024-12-02T11:01:24.6946179Z",
    "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": 158483341,
        "Keycode": "C2EF29D1A07743DDA9AF",
        "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": "07407171",
      "Address1": "Samplestreet 5",
      "Address2": null,
      "City": "Denver",
      "State": "CO",
      "PostalCode": "80123",
      "Country": "USA"
    }
  }
}                    
<CreateLicensesResponseServiceModel 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>07407171</PhoneNumber>
      <PostalCode>80123</PostalCode>
      <State>CO</State>
    </Customer>
    <Items>
      <CreateLicensesResponseServiceModel_Item>
        <Keycode>C2EF29D1A07743DDA9AF</Keycode>
        <LicenseId>158483341</LicenseId>
        <ListPrice>100</ListPrice>
        <Modules>
          <CreateLicensesResponseServiceModel_Module>
            <ListPrice>200</ListPrice>
            <ProductId>113400101</ProductId>
            <Quantity>1</Quantity>
            <Seats>50</Seats>
            <UnitPrice>250</UnitPrice>
            <Years>2</Years>
          </CreateLicensesResponseServiceModel_Module>
        </Modules>
        <ProductId>113400101</ProductId>
        <Quantity>1</Quantity>
        <Seats>50</Seats>
        <UnitPrice>100</UnitPrice>
        <Years>1</Years>
      </CreateLicensesResponseServiceModel_Item>
    </Items>
    <SubTotalAmount>5000</SubTotalAmount>
    <TaxTotal>0</TaxTotal>
    <TotalAmount>5000</TotalAmount>
    <VendorOrderCode>PSV0054516909</VendorOrderCode>
    <VendorOrderDate>2024-12-02T11:01:24.6946179Z</VendorOrderDate>
  </Order>
</CreateLicensesResponseServiceModel>