POST /service/api/ecom/shop/carts/{vendorOrderCode}/customers

Creates end customer (shipping) and/or reseller customer records to associate to a given cart. Note that a billing customer is associated when the cart is created and cannot be modified.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
vendorOrderCode

Identifier of the cart.

string

Required

URI Sample(s)

POST
https://unityapi.webrootcloudav.com/service/api/ecom/shop/carts/PSV0092395048/customers

Body Parameters

Customer(s) to be added.

AddCustomersToCartRequestServiceModel
NameDescriptionTypeAdditional Information
Reseller

Customer record for the reseller (required only for 'reseller' type cart, ignored otherwise)

AddCustomersToCartRequestServiceModel_Customer

None.

Shipping

Customer record to be added

AddCustomersToCartRequestServiceModel_Customer

Required

Sample Request

{
  "Reseller": {
    "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.",
    "CompanyTypeId": 11,
    "ExternalCustomerKey": "E000503079"
  },
  "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.",
    "CompanyTypeId": 11,
    "ExternalCustomerKey": "E000234567"
  }
}                    
<AddCustomersToCartRequestServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <Reseller>
    <Address1>Webroot Way 21</Address1>
    <Address2 i:nil="true" />
    <City>Broomfield</City>
    <CompanyName>ACME, Inc.</CompanyName>
    <CompanyTypeId>11</CompanyTypeId>
    <Country>US</Country>
    <CustomerEmail>jdoe@webroot.com</CustomerEmail>
    <ExternalCustomerKey>E000503079</ExternalCustomerKey>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <PostalCode>80021</PostalCode>
    <State>CO</State>
  </Reseller>
  <Shipping>
    <Address1>Webroot Way 21</Address1>
    <Address2 i:nil="true" />
    <City>Broomfield</City>
    <CompanyName>ACME, Inc.</CompanyName>
    <CompanyTypeId>11</CompanyTypeId>
    <Country>US</Country>
    <CustomerEmail>jdoe@webroot.com</CustomerEmail>
    <ExternalCustomerKey>E000234567</ExternalCustomerKey>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <PostalCode>80021</PostalCode>
    <State>CO</State>
  </Shipping>
</AddCustomersToCartRequestServiceModel>                    

Response Information

Resource Description

Information about the item that was added.

AddCustomersToCartResponseServiceModel
NameDescriptionTypeAdditional Information
Billing

Customer record for the billing entity

AddCustomersToCartResponseServiceModel_Customer

None.

Reseller

Customer record for the reseller (if any)

AddCustomersToCartResponseServiceModel_Customer

None.

Shipping

Customer record designating the shipping entity

AddCustomersToCartResponseServiceModel_Customer

None.

Sample Response

{
  "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": "E000679256",
    "VatId": "A123456",
    "CustomerTypeId": 1,
    "CustomerTypeDescription": "Billing"
  },
  "Reseller": {
    "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": "E000907184",
    "VatId": "A123456",
    "CustomerTypeId": 3,
    "CustomerTypeDescription": "Reseller"
  },
  "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": "E000502064",
    "VatId": "A123456",
    "CustomerTypeId": 2,
    "CustomerTypeDescription": "Shipping"
  }
}                    
<AddCustomersToCartResponseServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.ECom.Models">
  <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>E000679256</ExternalCustomerKey>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <PostalCode>80021</PostalCode>
    <State>CO</State>
    <VatId>A123456</VatId>
  </Billing>
  <Reseller>
    <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>Reseller</CustomerTypeDescription>
    <CustomerTypeId>3</CustomerTypeId>
    <ExternalCustomerKey>E000907184</ExternalCustomerKey>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <PostalCode>80021</PostalCode>
    <State>CO</State>
    <VatId>A123456</VatId>
  </Reseller>
  <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>E000502064</ExternalCustomerKey>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <PostalCode>80021</PostalCode>
    <State>CO</State>
    <VatId>A123456</VatId>
  </Shipping>
</AddCustomersToCartResponseServiceModel>