Exporting returns

Webservice URL : https://sws.spartoo.com/mp/xml_export_returns.php

This webservice allows you to get information about returns created after a specific date, whether from a return ID or via an order ID.
The returns can be filtered by status.

Each return contains only one product.

List of Parameters



Parameter Description
partner Must contain your unique code :
date The start date from which you would like to select orders. Format: timestamp
oID Order code
rID Return code
statut Status of returns to download. If the parameter is not specified, it will select all returns.
> See the list of statuses

The partner parameter is required, as well as one of the following three parameters: date, oID or rID. The statut parameter is optional.

XML format returned


<root>
	<returns>
		<return>
			<return_id>string</return_id>
			<return_date>[DATE]</return_date>
			<return_status_name>string</return_status_name>
			<return_status>int</return_status>
			<return_reason>string</return_reason>
			<order>string</order>
			<product>
				<products_reference>string</products_reference>
				<products_name>string</products_name>
				<products_spartoo>int</products_spartoo>
				<products_manufacturers>string</products_manufacturers>
				<products_size>string</products_size>
				<products_color>string</products_color>
			</product>
			<errors>
				<error>
					<id>int</id>
					<description>string</description>
				</error>
			</errors>
		</return>
		<!-- ... Multiple "return" tags possible ... -->
	</returns>
	<statut>
		<id>int</id>
		<description>string</description>
	</statut>
</root>


List of webservice error codes


Code Description
1 No error with parameters
-1 The parameter partenaire has not been set up or it is empty
-2 The parameter partenaire does not exist
-3 A required parameter is missing (date or oID/rID )
-428 Your account has been deactivated. You will no longer have access to our online services.
-429 You have made too many online requests during this 1-hour time period.

XML response field description


Tag Description
return_id Return ID
return_date Date return registered
return_status_name Name of current return status
return_status ID of current return status
return_reason Return reason
order Order ID
product Product returned
products_reference Merchant's product reference
products_spartoo Spartoo's product reference
products_name Style name
products_manufacturers Brand name
products_size Size ordered
size_reference Reference of product size
products_color Product colour


XML return examples




Example of a response to a web service request KO :

<root>
	<returns>
		<return>
			<return_id>EAJBCC</return_id>
			<return_date>	</return_date>
			<return_status_name><![CDATA[Waiting to be received]]></return_status_name>
			<return_status>2</return_status>
			<return_reason><![CDATA[Problem with the size]]></return_reason>
			<order>90D813EA1A2365A8</order>
			<product>
				<products_reference><![CDATA[ABCD]]></products_reference>
				<products_name><![CDATA[ALL STAR HI]]></products_name>
				<products_spartoo><![CDATA[123456]]></products_spartoo>
				<products_manufacturers><![CDATA[Converse]]></products_manufacturers>
				<products_size>42</products_size>
				<products_color><![CDATA[Blanc]]></products_color>
			</product>
			<errors>
				<error>
					<id>-3</id>
					<description>Il manque un paramètre obligatoire ( date ou oID/rID )</description>
				</error>
			</errors>
		</return>
	</returns>
	<statut>
		<id>3</id>
		<description>Refusé</description>
	</statut>
</root>

Example of a response to a web service request OK :

<root>
	<returns>
		<return>
			<return_id>EEAJBCC</return_id>
			<return_date>2013-04-22 17:56:36</return_date>
			<return_status_name><![CDATA[Waiting to be received]]></return_status_name>
			<return_status>2</return_status>
			<return_reason><![CDATA[Problem with the size]]></return_reason>
			<order>90D813EA1A2365A8</order>
			<product>
				<products_reference><![CDATA[ABCD]]></products_reference>
				<products_name><![CDATA[ALL STAR HI]]></products_name>
				<products_spartoo>123456</products_spartoo>
				<products_manufacturers><![CDATA[Converse]]></products_manufacturers>
				<products_size>42</products_size>
				<products_color><![CDATA[Blanc]]></products_color>
			</product>
		</return>
	</returns>
	<errors>
		<error>
			<id>1</id>
			<description>Pas d'erreur de paramètres</description>
		</error>
	</errors>
	<statut>
		<id>4</id>
		<description>Colis reçu, retour accepté</description>
	</statut>
</root>