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
Name | Description | Type | Additional Information |
---|---|---|---|
vendorOrderCode |
Identifier of the cart. |
string |
Required |
URI Sample(s)
POST
|
https://unityapi.webrootcloudav.com/service/api/ecom/shop/carts/PSV0022295678/customers
|
Body Parameters
Customer(s) to be added.
AddCustomersToCartRequestServiceModelName | Description | Type | Additional 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": "E000599238", "OptIn": true }, "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": "E000601507", "OptIn": true } }
<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>E000599238</ExternalCustomerKey> <FirstName>John</FirstName> <LastName>Doe</LastName> <OptIn>true</OptIn> <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>E000601507</ExternalCustomerKey> <FirstName>John</FirstName> <LastName>Doe</LastName> <OptIn>true</OptIn> <PostalCode>80021</PostalCode> <State>CO</State> </Shipping> </AddCustomersToCartRequestServiceModel>
Response Information
Resource Description
Information about the item that was added.
AddCustomersToCartResponseServiceModelName | Description | Type | Additional 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": "E000179775", "VatId": "A123456", "CustomerTypeId": 1, "CustomerTypeDescription": "Billing", "OptIn": true }, "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": "E000125163", "VatId": "A123456", "CustomerTypeId": 3, "CustomerTypeDescription": "Reseller", "OptIn": true }, "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": "E000324149", "VatId": "A123456", "CustomerTypeId": 2, "CustomerTypeDescription": "Shipping", "OptIn": true } }
<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>E000179775</ExternalCustomerKey> <FirstName>John</FirstName> <LastName>Doe</LastName> <OptIn>true</OptIn> <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>E000125163</ExternalCustomerKey> <FirstName>John</FirstName> <LastName>Doe</LastName> <OptIn>true</OptIn> <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>E000324149</ExternalCustomerKey> <FirstName>John</FirstName> <LastName>Doe</LastName> <OptIn>true</OptIn> <PostalCode>80021</PostalCode> <State>CO</State> <VatId>A123456</VatId> </Shipping> </AddCustomersToCartResponseServiceModel>