Moderated Orders XML - Integration Guide for Moderated Orders

RSS
Modified on 2013/08/28 15:44 by trushwin Categorized as Uncategorized

MODERATED ORDERS XML - INTEGRATION GUIDE FOR MODERATED ORDERS

THE FOLLOWING INFORMATION DESCRIBES A FUTURE FEATURE IN DEVELOPMENT. THE FINAL SPECIFICATION IS SUBJECT TO CHANGE.

Overview

Cafepress Services (CP) supports moderating, or reviewing, an order's images prior to fulfillment.

Moderation Integration Tasks

1. Indicate which items to moderate within your submitted orders.

The orders utilize our standard XML order specification with values in specific elements and attributes. This document highlights the relevant required/optional values and provides sample XML for the moderated order scenarios.

The following moderation levels are supported:

  • Partner - moderate all orders' images sent. To setup or change this moderation level, please contact your account manager.
  • Partner/Product - moderate all orderlines which contain a specific product. To setup or change this moderation level, please contact your account manager.
  • Order - moderate all of a single order's images.
  • Orderline - moderate all images associated with a single orderline in a single order.
  • Image/Asset - moderate a single image, which is associated with one or more orderlines in a single order.
  • Builder Project - for Builder integrations, moderate one or more images located in the Project XML.

2. Receive events notifications regarding the moderation process for orders.

The following events are available to help monitor the moderation process, and determine when your input is necessary to complete the moderation process:

  • ModerationStarted - Indicates that a moderated order has started the moderation process.
  • ModerationPending - Indicates that a moderated order's image has been marked as pending for review purposes.
  • ModerationComplete - Indicates that a moderated order has completed the moderation process. Contains orderline-level status information regarding if associated images have been 'Passed' or 'Rejected' in the moderation process. 'Rejected' orderlines indicate a reason code.
  • Canceled - As a result of moderation, the entire order or part of an order may be cancelled.

For more details, please see the events notifications documentation.



Moderation Level 'Order' Sample XML

Moderate all of a single order's images. The sample below is a partial listing of the standard order XML.

<?xml version="1.0" encoding="UTF-8"?>
<orders partnerid="xxxxx" version="1">
...
	<ordersession>
		<order>
			<orderid>1234</orderid>
			...
			<orderline productid = "10050" imageid = "5">
				<description>5x7 Glossy Print</description>
				<productprice>1.95</productprice>
				<quantity>1</quantity>
				<position>fit</position>
			</orderline>
			...
			<moderate>true</moderate>
		</order>
	</ordersession>
...
</orders>

Moderation Level 'Orderline' Sample XML

Moderate all images associated with a single orderline in a single order. The sample below is a partial listing of the standard order XML.

<?xml version="1.0" encoding="UTF-8"?>
<orders partnerid="xxxxx" version="1">
...
	<ordersession>
		<order>
			<orderid>1234</orderid>
			...
			<orderline productid = "10050" imageid = "5">
				<description>5x7 Glossy Print</description>
				<productprice>1.95</productprice>
				<quantity>1</quantity>
				<position>fit</position>
				<moderate>true</moderate>  
			</orderline>
			...
		</order>
	</ordersession>
...
</orders>

Moderation Level 'Image/Asset' Sample XML

Moderate a single image, which is associated with one or more orderlines in a single order. The sample below is a partial listing of the standard order XML.

<?xml version="1.0" encoding="UTF-8"?>
<orders partnerid="xxxxx" version="1">
	<images>
		<uri id="3" title="Logo" moderate="true">http://www.ezprints.com/images/logo.jpg</uri>  
		<uri id="5" title="My Photo" moderate="true">http://www.ezprints.com/images/0/0_5.jpg</uri>  <!--Multiple single images per order may be marked for moderation-->
		<uri id="6" title="A  Photo">http://www.ezprints.com/images/0/123.jpg</uri>
	</images>
	...
</orders>

Moderation Level 'Builder Project' Sample XML

For Builder integrations, moderate one or more images located in the orderline Project XML. The sample below is a partial listing of the standard order XML.

<?xml version="1.0" encoding="UTF-8"?>
<orders partnerid="xxxxx" version="1">
...
	<ordersession>
		<order>
			<orderid>1234</orderid>
			...
			<orderline ProjectId="bea39605-3437-55ca-9999-2223qrt330a30">
				<description>5x7 Glossy Print</description>
				<productprice>1.95</productprice>
				<quantity>1</quantity>
				<position>fit</position>
				<ModerateContent>
				     <Content Id="bb5297b9-434a-048f-ba2a-a3a87a39e3d4" />
				     <Content Id="12345" />
				     <Content Id="c529a7c0-0e40-7e38-fa70-21acdf5ab4c1" />
				</ModerateContent>
			</orderline>
			...
		</order>
	</ordersession>
...
</orders>

Moderated Order-Related XML Nodes and Content

Listed below is a description of moderation order-related XML nodes and associated content.

Element NameChild NameElement or Attribute?RequiredElement CardinalityDescription
ordermoderateElementOptional Only 1Indicates whether to moderate all of a single order's images. Valid values are 'true' or 'false'. Default is 'false'.
orderlinemoderateElementOptional Only 1Indicates whether to moderate all of a single orderline's images. Valid values are 'true' or 'false'. Default is 'false'. If an image is shared across multiple orderlines, the image will only be moderated once.
imagemoderateAttributeOptional Only 1Indicates whether to moderate a single image. Valid values are 'true' or 'false'. Default is 'false'.
orderlineModerateContentElementOptional Only 1Indicates to moderate specific images within the Builder project XML for a single orderline. If orderline/@moderate='true', this value is ignored and all images for an orderline are moderated. If no child nodes are present, this element is ignored. Applies only to the project corresponding to the orderline (i.e., orderline/@ProjectId).
ModerateContentContentElementRequiredOne or moreIndicates a single Builder project XML content image to moderate. If orderline/@moderate='true', this value is ignored and all images for an orderline are moderated.
ModerateContent/ContentIdElementRequiredOnly 1Indicates a single Builder project XML image's content ID to moderate. Corresponds to a Content/@Id attribute within the project XML, which is also returned by the Project web service operation 'GetContentForProject'. If orderline/@moderate='true', this value is ignored and all images for an orderline are moderated. If an invalid ID is specified, the image will not be moderated.