POST /service/api/ecom/shop/orders

Creates an order by processing a cart.

Request Information

URI Parameters

None.

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": "2019-07-18T14:12:05.3816495+00:00",
  "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,
      "KeyCode": "D45C6A109DFF4EA0AAE2",
      "ProductDescription": "Webroot WiFi Security 3 Device 1 Year Subscription",
      "ProductTypeDescription": "New"
    }
  ],
  "Customers": {
    "Billing": {
      "CustomerId": 39332741,
      "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": "E000986367",
      "VatId": "A123456",
      "CustomerTypeId": 1,
      "CustomerTypeDescription": "Billing"
    },
    "Shipping": {
      "CustomerId": 85110528,
      "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": "E000220198",
      "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>E000986367</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>09513</PostalCode>
      <State i:nil="true" />
      <VatId>A123456</VatId>
      <CustomerId>39332741</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>E000220198</ExternalCustomerKey>
      <FirstName>John</FirstName>
      <LastName>Doe</LastName>
      <PostalCode>09513</PostalCode>
      <State i:nil="true" />
      <VatId>A123456</VatId>
      <CustomerId>85110528</CustomerId>
      <PhoneNumber>0815 4711</PhoneNumber>
    </Shipping>
  </Customers>
  <Items>
    <CreateOrderResponseServiceModel.CreateOrderResponseServiceModel_OrderItem>
      <KeyCode>D45C6A109DFF4EA0AAE2</KeyCode>
      <LicenseCategoryName>WIFI</LicenseCategoryName>
      <LicenseKeycodeTypeId>1</LicenseKeycodeTypeId>
      <ProductDescription>Webroot WiFi Security 3 Device 1 Year Subscription</ProductDescription>
      <ProductTypeDescription>New</ProductTypeDescription>
      <Quantity>1</Quantity>
      <Seats>3</Seats>
      <UnitPrice>39.99</UnitPrice>
    </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>2019-07-18T14:12:05.3816495+00:00</VendorOrderDate>
</CreateOrderResponseServiceModel>