POST /service/api/ecom/shop/orders

Creates an order by processing a cart.

Request Information

URI Parameters

None.

URI Sample(s)

POST
https://unityapi.webrootcloudav.com/service/api/ecom/shop/orders

Body Parameters

Information about the order to process.

CreateOrderRequestServiceModel
NameDescriptionTypeAdditional Information
VendorOrderCode

Identifier of the cart to be converted into an order.

string

Required

PaymentMethod

The payment method for the order.

Possible values are: PurchaseOrder.

string

Required

PurchaseOrder

The purchase order number created by the caller.

string

Required (when PaymentMethod is 'PurchaseOrder').

Sample Request

{
  "VendorOrderCode": "MSP0046543057",
  "PaymentMethod": "PurchaseOrder",
  "PurchaseOrder": "P4713A20"
}                    
<CreateOrderRequestServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <PaymentMethod>PurchaseOrder</PaymentMethod>
  <PurchaseOrder>P4713A20</PurchaseOrder>
  <VendorOrderCode>MSP0046543057</VendorOrderCode>
</CreateOrderRequestServiceModel>                    

Response Information

Resource Description

Details about the newly created order.

CreateOrderResponseServiceModel
NameDescriptionTypeAdditional Information
VendorOrderDate

The Date when the order was created.

date

None.

Locale

The language and territory used as the locale setting for the order (e.g. "en_US").

string

None.

TypeOfOrder

The type of order to be placed. The market for the order.

Possible values are: RESELLER, MSP.

string

None.

VendorOrderCode

Identifier of the order

string

None.

OrderHeaderToken

A randomly generated GUID acting as a pointer to the order. This may be passed in URL as an unguessable order identifier.

string

None.

CurrencyCode

The ISO three-letter curreny code of the order (e.g. "USD").

string

None.

PaymentHeader

The payment header for the order.

CreateOrderResponseServiceModel_PaymentHeader

None.

Items

The list of items included in the order

Collection of CreateOrderResponseServiceModel_OrderItem

None.

Customers

Customer records associated with the order

CreateOrderResponseServiceModel_Customers

None.

Sample Response

{
  "VendorOrderDate": "2024-01-18T02:13:09",
  "Locale": "en_US",
  "TypeOfOrder": "MSP",
  "VendorOrderCode": "MSP0046543057",
  "OrderHeaderToken": "07D07009-2487-4740-AB03-D9FAECCF75F2",
  "CurrencyCode": "USD",
  "PaymentHeader": {
    "PaymentStatusName": "subscribed",
    "PaymentMethodName": "PurchaseOrder"
  },
  "Items": [
    {
      "LicenseCategoryName": "WIFI",
      "LicenseKeycodeTypeId": "1",
      "Seats": 3,
      "Quantity": 1,
      "UnitPrice": 39.99,
      "ItemHierarchyId": 1,
      "ItemBundleId": 1,
      "KeyCode": "BABAD03E04DA4D08926F",
      "ProductDescription": "Webroot WiFi Security 3 Device 1 Year Subscription",
      "ProductTypeDescription": "New",
      "LicenseAttributeValue": 110,
      "LicenseAttributeValueDescription": "Monthly Sold",
      "LicenseAttributeDescription": "MSP Billing",
      "UsagePricingModelId": null,
      "UsagePricingModelName": null,
      "VaultId": null,
      "VaultName": null,
      "ProductPlatformId": null,
      "ProductPlatformName": null,
      "RetentionModelId": null,
      "RetentionModelName": null,
      "ProductPricingLevelId": null,
      "ProductPricingLevelDescription": null
    }
  ],
  "Customers": {
    "Billing": {
      "CustomerId": 90920827,
      "PhoneNumber": "0815 4711",
      "FirstName": "John",
      "LastName": "Doe",
      "Address1": "Webroot Way 21",
      "Address2": null,
      "City": "Eastminster",
      "PostalCode": "09513",
      "State": null,
      "Country": "USA",
      "CustomerEmail": "jdoe@webroot.com",
      "CompanyName": "ACME, Inc.",
      "ExternalCustomerKey": "E000155599",
      "VatId": "A123456",
      "CustomerTypeId": 1,
      "CustomerTypeDescription": "Billing"
    },
    "Shipping": {
      "CustomerId": 84778410,
      "PhoneNumber": "0815 4711",
      "FirstName": "John",
      "LastName": "Doe",
      "Address1": "Webroot Way 21",
      "Address2": null,
      "City": "Eastminster",
      "PostalCode": "09513",
      "State": null,
      "Country": "USA",
      "CustomerEmail": "jdoe@webroot.com",
      "CompanyName": "ACME, Inc.",
      "ExternalCustomerKey": "E000443205",
      "VatId": "A123456",
      "CustomerTypeId": 2,
      "CustomerTypeDescription": "Shipping"
    },
    "Reseller": null
  }
}                    
<CreateOrderResponseServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <CurrencyCode>USD</CurrencyCode>
  <Customers>
    <Billing>
      <Address1>Webroot Way 21</Address1>
      <Address2 i:nil="true" />
      <City>Eastminster</City>
      <CompanyName>ACME, Inc.</CompanyName>
      <Country>USA</Country>
      <CustomerEmail>jdoe@webroot.com</CustomerEmail>
      <CustomerTypeDescription>Billing</CustomerTypeDescription>
      <CustomerTypeId>1</CustomerTypeId>
      <ExternalCustomerKey>E000155599</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>09513</PostalCode>
      <State i:nil="true" />
      <VatId>A123456</VatId>
      <CustomerId>90920827</CustomerId>
      <PhoneNumber>0815 4711</PhoneNumber>
    </Billing>
    <Reseller i:nil="true" />
    <Shipping>
      <Address1>Webroot Way 21</Address1>
      <Address2 i:nil="true" />
      <City>Eastminster</City>
      <CompanyName>ACME, Inc.</CompanyName>
      <Country>USA</Country>
      <CustomerEmail>jdoe@webroot.com</CustomerEmail>
      <CustomerTypeDescription>Shipping</CustomerTypeDescription>
      <CustomerTypeId>2</CustomerTypeId>
      <ExternalCustomerKey>E000443205</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>09513</PostalCode>
      <State i:nil="true" />
      <VatId>A123456</VatId>
      <CustomerId>84778410</CustomerId>
      <PhoneNumber>0815 4711</PhoneNumber>
    </Shipping>
  </Customers>
  <Items>
    <CreateOrderResponseServiceModel.CreateOrderResponseServiceModel_OrderItem>
      <ItemBundleId>1</ItemBundleId>
      <ItemHierarchyId>1</ItemHierarchyId>
      <KeyCode>BABAD03E04DA4D08926F</KeyCode>
      <LicenseAttributeDescription>MSP Billing</LicenseAttributeDescription>
      <LicenseAttributeValue>110</LicenseAttributeValue>
      <LicenseAttributeValueDescription>Monthly Sold</LicenseAttributeValueDescription>
      <LicenseCategoryName>WIFI</LicenseCategoryName>
      <LicenseKeycodeTypeId>1</LicenseKeycodeTypeId>
      <ProductDescription>Webroot WiFi Security 3 Device 1 Year Subscription</ProductDescription>
      <ProductPlatformId i:nil="true" />
      <ProductPlatformName i:nil="true" />
      <ProductPricingLevelDescription i:nil="true" />
      <ProductPricingLevelId i:nil="true" />
      <ProductTypeDescription>New</ProductTypeDescription>
      <Quantity>1</Quantity>
      <RetentionModelId i:nil="true" />
      <RetentionModelName i:nil="true" />
      <Seats>3</Seats>
      <UnitPrice>39.99</UnitPrice>
      <UsagePricingModelId i:nil="true" />
      <UsagePricingModelName i:nil="true" />
      <VaultId i:nil="true" />
      <VaultName i:nil="true" />
    </CreateOrderResponseServiceModel.CreateOrderResponseServiceModel_OrderItem>
  </Items>
  <Locale>en_US</Locale>
  <OrderHeaderToken>07D07009-2487-4740-AB03-D9FAECCF75F2</OrderHeaderToken>
  <PaymentHeader>
    <PaymentMethodName>PurchaseOrder</PaymentMethodName>
    <PaymentStatusName>subscribed</PaymentStatusName>
  </PaymentHeader>
  <TypeOfOrder>MSP</TypeOfOrder>
  <VendorOrderCode>MSP0046543057</VendorOrderCode>
  <VendorOrderDate>2024-01-18T02:13:09</VendorOrderDate>
</CreateOrderResponseServiceModel>