POST /service/api/ecom/shop/carts

Creates a new shopping cart. Carts act as a container for pending orders.

Request Information

URI Parameters

None.

Body Parameters

Information about the cart to be created.

Note: At least one item must be specified in either the ItemsByLicenseKey or the ItemsByAttributes collection.

CreateCartRequestServiceModel
NameDescriptionTypeAdditional Information
TypeOfOrder

The type of order to be placed ("RESELLER", "MSP").

string

Required

Locale

The language and territory to use as the locale setting for the order. The format of the locale must be the ISO two-letter language code (lowercase) and the ISO two-letter country code (UPPERCASE), concatenated with an underscore ('_') character. E.g. en_US, ja_JP.

The locales that can be used are defined by the partner account configuration. Please reach out to your Webroot e-commerce business partner to identify valid locales for your orders.

string

Required

ItemsByLicenseKey

Items to be added to the cart based on license keys.

Collection of CreateCartRequestServiceModel_ItemByLicenseKey

None.

ItemsByAttributes

Items to be added to the cart based on attributes.

Collection of CreateCartRequestServiceModel_ItemByAttributes

None.

Sample Request

{
  "TypeOfOrder": "MSP",
  "Locale": "en_US",
  "ItemsByLicenseKey": null,
  "ItemsByAttributes": [
    {
      "LicenseSeats": 1,
      "LicenseCategoryName": "WIFI",
      "StorageGb": null,
      "Years": "1",
      "LicenseKeycodeTypeId": 1,
      "ItemHierarchyId": null,
      "ExpirationDate": "2020-05-21T21:08:43.1669647+00:00",
      "VendorOrderItemCode": "WIFI Order #1",
      "CartItemBundleId": null,
      "LicenseAttributeValue": 110
    }
  ]
}                    
<CreateCartRequestServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <ItemsByAttributes>
    <CreateCartRequestServiceModel_ItemByAttributes>
      <CartItemBundleId i:nil="true" />
      <ExpirationDate>2020-05-21T21:08:43.1669647+00:00</ExpirationDate>
      <ItemHierarchyId i:nil="true" />
      <LicenseAttributeValue>110</LicenseAttributeValue>
      <LicenseKeycodeTypeId>1</LicenseKeycodeTypeId>
      <StorageGb i:nil="true" />
      <VendorOrderItemCode>WIFI Order #1</VendorOrderItemCode>
      <Years>1</Years>
      <LicenseCategoryName>WIFI</LicenseCategoryName>
      <LicenseSeats>1</LicenseSeats>
    </CreateCartRequestServiceModel_ItemByAttributes>
  </ItemsByAttributes>
  <ItemsByLicenseKey i:nil="true" />
  <Locale>en_US</Locale>
  <TypeOfOrder>MSP</TypeOfOrder>
</CreateCartRequestServiceModel>                    

Response Information

Resource Description

Information about the created cart.

CreateCartResponseServiceModel
NameDescriptionTypeAdditional Information
VendorOrderCode

An identifier of the order.

string

None.

CartOrderStatusId

The status identifier of the cart order (1,2,3).

integer

None.

TypeOfOrder

The type of cart order placed ("RESELLER", "MSP").

string

None.

TotalAmount

The total amount of the cart order.

decimal number

None.

TotalAmountFmt

The format of the 'TotalAmount' field (e.g. "$0.00").

string

None.

SubTotalAmount

The sub total amount of the cart order.

decimal number

None.

SubTotalAmountFmt

The format of the 'SubTotalAmount' field (e.g. "$0.00").

string

None.

TaxAmount

The tax amount of the cart order.

decimal number

None.

TaxAmountFmt

The format of the 'TaxAmount' field (e.g. "$0.00").

string

None.

Locale

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

string

None.

SalesOrderDate

The date when the sale was processed.

date

None.

CurrencyCode

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

string

None.

Items

The items contained in this cart.

Collection of Collection of CartResponseServiceModel_CartItem

None.

Customers

The customers associated to this cart.

CartResponseServiceModel_CartCustomers

None.

Sample Response

{
  "VendorOrderCode": "MSP0046543056",
  "CartOrderStatusId": 1,
  "TypeOfOrder": "MSP",
  "TotalAmount": 39.99,
  "TotalAmountFmt": "$39.99",
  "SubTotalAmount": 39.99,
  "SubTotalAmountFmt": "$39.99",
  "TaxAmount": 0.0,
  "TaxAmountFmt": "$0.00",
  "Locale": "en_US",
  "SalesOrderDate": "2019-05-22T21:08:43.1894263+00:00",
  "CurrencyCode": "USD",
  "Items": [
    [
      {
        "CartOrderItemId": 0,
        "LineItem": 1,
        "Quantity": 1,
        "Years": "1",
        "ListPrice": 59.99,
        "ListPriceFmt": "$59.99",
        "UnitPrice": 39.99,
        "UnitPriceFmt": "$39.99",
        "SubTotalAmount": 39.99,
        "SubTotalAmountFmt": "$39.99",
        "SubTotalListAmount": 59.99,
        "SubTotalListAmountFmt": "$59.99",
        "ProductId": 15131101,
        "ProductDescription": "Webroot WiFi Security 3 Device 1 Year Subscription",
        "ProductTypeId": 1,
        "ProductTypeDescription": "New",
        "LicenseKeycodeTypeId": 1,
        "LicenseCategoryName": "WIFI",
        "LicenseCategoryDescription": "Webroot WiFi Security",
        "ProductFamilyDescription": "Webroot Secure Anywhere",
        "StartDate": "2019-05-22T21:08:43.1982149+00:00",
        "ExpirationDate": "2020-05-21T21:08:43.1982149+00:00",
        "CartItemBundleId": 1,
        "ItemHierarchyId": 1,
        "DependentCartOrderItemId": null,
        "Keycode": null,
        "LicenseAttributeValue": 110,
        "LicenseAttributeValueDescription": "Monthly Sold",
        "VendorOrderItemCode": null,
        "OrderItemUpdateTypeId": null,
        "LicenseProfile": {},
        "LicenseSeats": 3
      }
    ]
  ],
  "Customers": {
    "Billing": {
      "FirstName": "John",
      "LastName": "Doe",
      "Address1": "Webroot Way 21",
      "Address2": null,
      "City": "Broomfield",
      "PostalCode": "80021",
      "State": "CO",
      "Country": "US",
      "CustomerEmail": "jdoe@webroot.com",
      "CompanyName": "ACME, Inc.",
      "ExternalCustomerKey": "E000899032",
      "VatId": "A123456",
      "CustomerTypeId": 1,
      "CustomerTypeDescription": "Billing"
    },
    "Shipping": {
      "FirstName": "John",
      "LastName": "Doe",
      "Address1": "Webroot Way 21",
      "Address2": null,
      "City": "Broomfield",
      "PostalCode": "80021",
      "State": "CO",
      "Country": "US",
      "CustomerEmail": "jdoe@webroot.com",
      "CompanyName": "ACME, Inc.",
      "ExternalCustomerKey": "E000417268",
      "VatId": "A123456",
      "CustomerTypeId": 2,
      "CustomerTypeDescription": "Shipping"
    },
    "Reseller": null
  }
}                    
<CreateCartResponseServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <CartOrderStatusId>1</CartOrderStatusId>
  <CurrencyCode>USD</CurrencyCode>
  <Customers>
    <Billing>
      <Address1>Webroot Way 21</Address1>
      <Address2 i:nil="true" />
      <City>Broomfield</City>
      <CompanyName>ACME, Inc.</CompanyName>
      <Country>US</Country>
      <CustomerEmail>jdoe@webroot.com</CustomerEmail>
      <CustomerTypeDescription>Billing</CustomerTypeDescription>
      <CustomerTypeId>1</CustomerTypeId>
      <ExternalCustomerKey>E000899032</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>80021</PostalCode>
      <State>CO</State>
      <VatId>A123456</VatId>
    </Billing>
    <Reseller i:nil="true" />
    <Shipping>
      <Address1>Webroot Way 21</Address1>
      <Address2 i:nil="true" />
      <City>Broomfield</City>
      <CompanyName>ACME, Inc.</CompanyName>
      <Country>US</Country>
      <CustomerEmail>jdoe@webroot.com</CustomerEmail>
      <CustomerTypeDescription>Shipping</CustomerTypeDescription>
      <CustomerTypeId>2</CustomerTypeId>
      <ExternalCustomerKey>E000417268</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>80021</PostalCode>
      <State>CO</State>
      <VatId>A123456</VatId>
    </Shipping>
  </Customers>
  <Items>
    <ArrayOfCartResponseServiceModel_CartItem>
      <CartResponseServiceModel_CartItem>
        <CartItemBundleId>1</CartItemBundleId>
        <CartOrderItemId>0</CartOrderItemId>
        <DependentCartOrderItemId i:nil="true" />
        <ExpirationDate>2020-05-21T21:08:43.1982149+00:00</ExpirationDate>
        <ItemHierarchyId>1</ItemHierarchyId>
        <Keycode i:nil="true" />
        <LicenseAttributeValue>110</LicenseAttributeValue>
        <LicenseAttributeValueDescription>Monthly Sold</LicenseAttributeValueDescription>
        <LicenseCategoryDescription>Webroot WiFi Security</LicenseCategoryDescription>
        <LicenseCategoryName>WIFI</LicenseCategoryName>
        <LicenseKeycodeTypeId>1</LicenseKeycodeTypeId>
        <LicenseProfile xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
        <LicenseSeats>3</LicenseSeats>
        <LineItem>1</LineItem>
        <ListPrice>59.99</ListPrice>
        <ListPriceFmt>$59.99</ListPriceFmt>
        <OrderItemUpdateTypeId i:nil="true" />
        <ProductDescription>Webroot WiFi Security 3 Device 1 Year Subscription</ProductDescription>
        <ProductFamilyDescription>Webroot Secure Anywhere</ProductFamilyDescription>
        <ProductId>15131101</ProductId>
        <ProductTypeDescription>New</ProductTypeDescription>
        <ProductTypeId>1</ProductTypeId>
        <Quantity>1</Quantity>
        <StartDate>2019-05-22T21:08:43.1982149+00:00</StartDate>
        <SubTotalAmount>39.99</SubTotalAmount>
        <SubTotalAmountFmt>$39.99</SubTotalAmountFmt>
        <SubTotalListAmount>59.99</SubTotalListAmount>
        <SubTotalListAmountFmt>$59.99</SubTotalListAmountFmt>
        <UnitPrice>39.99</UnitPrice>
        <UnitPriceFmt>$39.99</UnitPriceFmt>
        <VendorOrderItemCode i:nil="true" />
        <Years>1</Years>
      </CartResponseServiceModel_CartItem>
    </ArrayOfCartResponseServiceModel_CartItem>
  </Items>
  <Locale>en_US</Locale>
  <SalesOrderDate>2019-05-22T21:08:43.1894263+00:00</SalesOrderDate>
  <SubTotalAmount>39.99</SubTotalAmount>
  <SubTotalAmountFmt>$39.99</SubTotalAmountFmt>
  <TaxAmount>0</TaxAmount>
  <TaxAmountFmt>$0.00</TaxAmountFmt>
  <TotalAmount>39.99</TotalAmount>
  <TotalAmountFmt>$39.99</TotalAmountFmt>
  <TypeOfOrder>MSP</TypeOfOrder>
  <VendorOrderCode>MSP0046543056</VendorOrderCode>
</CreateCartResponseServiceModel>