SubmitOrder

Overview

SubmitOrder is a method of the Order Service which creates a new order in the ChannelAdvisor system.
Any order submitted to ChannelAdvisor is subject to your normal ChannelAdvisor billing terms.

Request

Field Name

Data Type

Description

accountID

string

A unique identifier representing the ChannelAdvisor account you wish to access.

order

OrderSubmit

An object containing the order data to be entered into ChannelAdvisor.

Response

Field Name

Data Type

Description

SubmitOrderResult

APIResult<int>

This method returns a type named APIResultOfInt32. See more information on APIResult. This method will return an Order ID which is unique to this account.

Notes

  • When submitting a cart that was created with CreateCart, email address and CartID are the only required fields. Other information like shipping address and payment details will be provided by the buyer during the checkout process.

Single-Item Request Example

See Bundles and some Marketplace-Specific SubmitOrder XML examples.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/" xmlns:ord="http://api.channeladvisor.com/datacontracts/orders">
    <soapenv:Header>
       <web:APICredentials>
          <web:DeveloperKey> --- </web:DeveloperKey>
          <web:Password> --- </web:Password>
       </web:APICredentials>
    </soapenv:Header>
    <soapenv:Body>
       <web:SubmitOrder>
          <web:accountID> --- </web:accountID>
          <web:order>
             <ord:OrderTimeGMT>2006-09-06T03:23:00</ord:OrderTimeGMT>
             <ord:ClientOrderIdentifier/>
             <ord:OrderStatus>
                <ord:CheckoutStatus>NoChange</ord:CheckoutStatus>
                <ord:CheckoutDateGMT>2006-09-06T03:23:00</ord:CheckoutDateGMT>
                <ord:PaymentStatus>NoChange</ord:PaymentStatus>
                <ord:PaymentDateGMT>2006-09-06T03:23:00</ord:PaymentDateGMT>
                <ord:ShippingStatus>NoChange</ord:ShippingStatus>
                <ord:ShippingDateGMT>2006-09-06T03:23:00</ord:ShippingDateGMT>
             </ord:OrderStatus>
             <ord:BuyerEmailAddress>address@domain.com</ord:BuyerEmailAddress>
             <ord:EmailOptIn>false</ord:EmailOptIn>
             <ord:ResellerID/>
             <ord:BillingInfo>
                <ord:AddressLine1>186 Example Street</ord:AddressLine1>
                <ord:AddressLine2/>
                <ord:City>Morrisville</ord:City>
                <ord:Region>NC</ord:Region>
                <ord:PostalCode>27560</ord:PostalCode>
                <ord:CountryCode>US</ord:CountryCode>
                <ord:CompanyName/>
                <ord:JobTitle/>
                <ord:Title/>
                <ord:FirstName>First</ord:FirstName>
                <ord:LastName>Last</ord:LastName>
                <ord:Suffix/>
                <ord:PhoneNumberDay/>
                <ord:PhoneNumberEvening/>
             </ord:BillingInfo>
             <ord:PaymentInfo>
                <ord:PaymentType/>
                <ord:CreditCardLast4/>
                <ord:PayPalID/>
                <ord:MerchantReferenceNumber/>
                <ord:PaymentTransactionID/>
                <ord:GoogleTransactionID/>
             </ord:PaymentInfo>
             <ord:ShoppingCart>
                <ord:CartID>0</ord:CartID>
                <ord:CheckoutSource>Demandware_Checkout</ord:CheckoutSource>
                <ord:VATTaxCalculationOption>Unspecified</ord:VATTaxCalculationOption>
                <ord:VATShippingOption>Unspecified</ord:VATShippingOption>
                <ord:LineItemSKUList>
                   <ord:OrderLineItemItem>
                      <ord:LineItemType>SKU</ord:LineItemType>
                      <ord:UnitPrice>6.39</ord:UnitPrice>
                      <ord:LineItemID>0</ord:LineItemID>
                      <ord:AllowNegativeQuantity>false</ord:AllowNegativeQuantity>
                      <ord:Quantity>2</ord:Quantity>
                      <ord:ItemSaleSource>DIRECT_SALE</ord:ItemSaleSource>
                      <ord:SKU>Disco Lights1</ord:SKU>
                      <ord:Title>Test Title</ord:Title>
                      <ord:BuyerUserID>username</ord:BuyerUserID>
                      <ord:BuyerFeedbackRating>0</ord:BuyerFeedbackRating>
                      <ord:SalesSourceID/>
                      <ord:VATRate>0</ord:VATRate>
                   </ord:OrderLineItemItem>
                </ord:LineItemSKUList>
             </ord:ShoppingCart>
             <ord:ShippingInfo>
                <ord:AddressLine1>2701 Shipping Circle</ord:AddressLine1>
                <ord:AddressLine2/>
                <ord:City>Morrisville</ord:City>
                <ord:Region>NC</ord:Region>
                <ord:PostalCode>27560</ord:PostalCode>
                <ord:CountryCode>US</ord:CountryCode>
                <ord:CompanyName/>
                <ord:JobTitle/>
                <ord:Title/>
                <ord:FirstName>John</ord:FirstName>
                <ord:LastName>Doe</ord:LastName>
                <ord:Suffix/>
                <ord:PhoneNumberDay/>
                <ord:PhoneNumberEvening/>
                <ord:ShipmentList>
                </ord:ShipmentList>
                <ord:ShippingInstructions>Fragile</ord:ShippingInstructions>
             </ord:ShippingInfo>
          </web:order>
       </web:SubmitOrder>
    </soapenv:Body>
 </soapenv:Envelope>

Single-Item Response Example

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body>
       <SubmitOrderResponse xmlns="http://api.channeladvisor.com/webservices/">
          <SubmitOrderResult>
             <Status>Success</Status>
             <MessageCode>0</MessageCode>
             <ResultData>9179595</ResultData>
          </SubmitOrderResult>
       </SubmitOrderResponse>
    </soap:Body>
 </soap:Envelope>

Single-Item Response Failed Example

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body>
       <SubmitOrderResponse xmlns="http://api.channeladvisor.com/webservices/">
          <SubmitOrderResult>
             <Status>Failure</Status>
             <MessageCode>118</MessageCode>
             <Message>The Address should be less than 75 characters.</Message>
             <ResultData>0</ResultData>
          </SubmitOrderResult>
       </SubmitOrderResponse>
    </soap:Body>
 </soap:Envelope>

References