Updating a return
Webservice URL : https://sws.spartoo.eu/mp/xml_maj_returns.phpThis webservice allows you to update a return status.
If you need to provide a return label for the customer, there are two ways possible:
- The label is hosted on your homepage: Specify the variable label_link containing the link to the label
- You want us to host the label on our servers: Specify the variable label_file containing the label file
- either accept the return ( status 4 )
- or refuse the return ( status 3 )
> See the list of return status possible
> See the list of return statuses
List of parameters
The parameters of this webservice must be saved in POSTParameter | Description |
---|---|
partner | Must contain your unique identifier code: |
rID | Return ID to be updated |
status | (optional) New return status ( 3 or 4 ) |
XML format returned
<root> <returns> <return> <partenaire>string</partenaire> <rID>int</rID> <label_link>url</label_link> <label_file>url</label_file> <errors> <error> <id>int</id> <description>string</description> </error> </errors> <return> </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 |
-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. |
-7 | Problem in the return chronology
|
-9 | The new status is identical to the current status |
-22 | Error receiving file |
-23 | Unknown error when receiving file |
-24 | The label link is too long |
-25 | The link provided is identical to the current link |
-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 return examples
Example of a response to a web service request KO :
<root> <returns> <return> <partenaire>1EC51BF31B486658</partenaire> <rID> </rID> <label_link>http://www.spartoo.fr/pj.php?file_id_crypt=...</label_link> <errors> <error> <id>-6</id> <description> La commande ou le retour n’ont pas été trouvés, vérifiez le paramètre oID / rID ou le paramètre partenaire. </description> </error> </errors> </return> </returns> <statut> <id>6</id> <description>retour refusé</description> </statut> </root>
Example of a response to a web service request OK :
<root> <returns> <return> <partenaire>1EC51BF31B486658</partenaire> <rID>8883777</rID> <label_link>http://www.spartoo.fr/pj.php?file_id_crypt=...</label_link> <errors> <error> <id>1</id> <description>Pas d'erreur de paramètres</description> </error> </errors> </return> </returns> <statut> <id>4</id> <description>retour accepté</description> </statut> </root>