Ship - To - Store Order XML

RSS
Modified on 2013/03/11 15:53 by trushwin Categorized as Uncategorized

Ship-To-Store Order XML - Integration Guide for Ship-To-Store Orders

Overview

Cafepress Services (CP) supports multi-order consolidation and shipment to a single destination point, such as a brick-and-mortar store. The orders utilize our standard XML order format with required values in specific elements and attributes. This document highlights the relevant required/optional values and provides sample XML for the Ship-To-Store (STS) order scenario.

Sample XML Set

Listed below is an example of an XML STS order.

<?xml version="1.0" encoding="UTF-8"?>
<orders partnerid = "xxxxx" version = "1">
	<images>
		<uri id="3" title="Logo">http://www.ezprints.com/images/logo.jpg</uri>
		<uri id="5" title="My Photo">http://www.ezprints.com/images/0/0_5.jpg</uri>
		<uri id="6" title="A Photo">http://www.ezprints.com/images/0/123.jpg</uri>
	</images>
	<ordersession>
		<sessionid>1234</sessionid>
		<customer>
			<title>Ms</title>
			<firstname>Jane</firstname>
			<lastname>Doe</lastname>
			<address1>123 Any St.</address1>
			<address2>Apartment 3</address2>
			<city>Anytown</city>
			<state>PA</state>
			<zip>12345</zip>
			<countrycode>USA</countrycode>
			<phone>303-555-1212</phone>
			<email>jane@host.com</email>
		</customer>
		<order>
			<orderid>1234</orderid>
			<shippingaddress LocationId=”MyStoreId”>
				<title>Ms</title>
				<firstname>Jane</firstname>
				<lastname>Doe</lastname>
				<address1>123 MyStore Street</address1>
				<address2>Suite 100</address2>
				<city>MyStoreTown</city>
				<state>ON</state>
				<zip>30010</zip>
				<countrycode>USA</countrycode>
				<phone>301-555-1212</phone>
				<email>jo@hots.com</email>
				<companyname>User Friendly Store Name</companyname>
			</shippingaddress>
			<shippingmethod>SS</shippingmethod>
			<orderline productid="10050" imageid="5">
				<description>5x7 Glossy Print</description>
				<productprice>1.95</productprice>
				<quantity>1</quantity>
				<position>fit</position>
			</orderline>
			<producttotal>1.95</producttotal>
			<shippingprice>5.95</shippingprice>
			<tax>0.00</tax>
			<ordertotal>1.95</ordertotal>
		</order>
		<producttotal>1.95</producttotal>
		<shippingtotal>5.95</shippingtotal>
		<taxtotal>0.00</taxtotal>
		<total>7.90</total>
	</ordersession>
</orders>

STS Order-Related XML Elements and Content

Listed below is a description of STS-related XML elements and associated content.

Element NameChild NameElement or Attribute?RequiredElement CardinalityDescription
shippingaddress ElementRequired Only 15 children of Shippingaddress are required: address1, city, state (US and Canada only), countrycode, & zip.
shippingaddressfirstnameElementOptional, Required for STS Orders Only 1For STS orders - First name of customer receiving order at the destination store.
shippingaddresslastnameElementOptional, Required for STS Orders Only 1For STS orders - Last name of customer receiving order at the destination store.
shippingaddressaddress1ElementRequiredOnly 1Address1 and Address2 print on shipping labels and have a 30 character limit. For STS orders – Address line 1 of the store’s shipping address.
shippingaddressaddress2ElementOptionalOnly 1Address1 and Address2 print on shipping labels and have a 30 character limit. For STS orders – Address line 2 of the store’s shipping address.
shippingaddresscityElementRequiredOnly 1For STS orders – City of the store’s shipping address.
shippingaddressstateElementRequiredOnly 1Valid state and country codes can be found in the Shipping section of the Partner Web Service Integration Overview packet. For STS orders – State of the store’s shipping address.
shippingaddresszipElementRequiredOnly 1For STS orders – Zip code of the store’s shipping address.
shippingaddresscountrycodeElementRequiredOnly 1Valid state and country codes can be found in the Shipping section of the Partner Web Service Integration Overview packet. For STS orders – Country of the store’s shipping address.
shippingaddressphoneElementOptionalOnly 1For STS orders – phone number of customer receiving order at the destination store.
shippingaddressemailElementOptionalOnly 1For STS orders – email address of customer receiving order at the destination store.
shippingaddressLocationIdAttributeOptional, Required for STS OrdersOnly 1For STS orders - Alphanumeric code which represents a unique identifier for a store. 10 character limit, only ASCII letters and numbers supported.
ordershippingmethodElementRequired Code of shipping method. Valid shipping codes are provided by ezprints. Current codes are FC, PM, SD, ON, SS. For STS orders, the order must be submitted with code SS.

Note on shipping address usage:

The required fields of the shipping address - address1, city, state (US and Canada only), countrycode, & zip – must correspond to the store’s shipping address. To ensure appropriate shipping and handling, please ensure these fields’ strings match exactly for each store across order submissions. Of course, please feel free to change the address submitted with the order if the store’s address changes – e.g., if a store with LocationId of “1234” moves to a different location, but retains the same LocationId.