Update an order

Webservice URL : https://sws.spartoo.co.uk/mp/xml_maj_orders.php

This webservice updates the status of an order.

Order in status 2 ( Order in preparation ) : The order is considered as accepted. The order information (name, delivery address, transporter, etc ...) can no longer be changed.
Order in status 3 ( Order shipped ) : The stock is considered as removed from the flux. The order has been given to the transporter. A tracking code is available.
Order in status 41 ( Order cancelled ) : Order cancelled, the customer will not receive the order. The customer will be refunded soon afterwards.
Order in status 45 ( Order lost ) : Order was lost during delivery
Order in status 47 (Failed delivery) : Order couldn't reach the customer (undeliverable mail, customer didn't withdraw the package)

It is possible to put an order in status 2, but only when the order is in status 11.
It is possible to put an order in status 3, but only when the order is in status 2.
It is possible to put an order in status 41, but only when the order is not in status 3 or 41.
It is possible to put an order in status 45, but only when the order is in status 3.
It is possible to put an order in status 47, but only when the order is in status 3.

The order tracking is available once the order goes into status 3. You should specify this in the parameter tracking_number.
An email containing the tracking link will then be sent to the customer to inform them that the order has been shipped.

> See the list of order statuses

List of parameters



Parameter Description
partner Must contain your unique identifier code:
oID ID of order to be updated
statut New order status (2, 3 or 41)
tracking_number Transporter tracking number (to indicate when the order goes into status 3)


Instead of the parametersstatut and tracking_number, it is also possible to provide a xmlif you have access to multi-package shipping.
When you call this webservice in multi-pass mode, the status of the order is automatically set to 2 (order accepted)
Once all the products in the order are in the package, the order automatically goes to status 3 (order sent)

Below is the format of the XML to be sent in the parameter xml and an example and an example :


<root>
	<parcel>
		<tracking>string</tracking>
		<products>
			<product>
				<products_reference>string</products_reference>
				<products_size>string</products_size>
			</product>
		</products>
	</parcel>
</root>

Exemple :

<root>
	<parcel>
		<tracking>12563AF256</tracking>
		<products>
			<product>
				<products_reference>basket_model_7</products_reference>
				<products_size>36</products_size>
			</product>
			<product>
				<products_reference>basket_model_7</products_reference>
				<products_size>37</products_size>
			</product>
		</products>
	</parcel>
	<parcel>
		<tracking>12563AF257</tracking>
		<products>
			<product>
				<products_reference>tshirt_blue_268</products_reference>
				<products_size>M</products_size>
			</product>
		</products>
	</parcel>
</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
-5 The rID/oID parameter or the status parameter is missing
-6 The order or return were not found, verify the OID / RID parameter or the partner parameter.
-8 Tracking number data entry error
-9 The new status is identical to the current status
-10 The new status does not exist
-11 The parameter xml has not been set up or it is empty
-14 Cannot find product in our database
-17 Crossdock order: parcel number required
-19 Problem with the chronology of the order
  • The status 2 only applies if the order is in status 11
  • The status 3 only applies if the order is in status 2
  • The status 41 only applies if the order is not in status 3
-26 The order has a return and therefore cannot be declared a lost parcel / NPAI
-27 The order has already been cancelled
-28 Order not found
-29 Unknown error (loss / NPAI)
-30 The order is too old to go on status 3. Contact Marketplace department.
-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.