Developer documentation for Stargest SOAP API
Ressource : Restocking Activation
Description
Allows you to activate or deactivate restocking for one or more products per shop in the Stargest backoffice.
Method
restocking_activation
Arguments
| Type | Name | Description |
|---|---|---|
| array | stConnexion | This is a structure containing authentication credentials |
| array | stActivations | This is a structure gathering all the activation entries to process (1 or more repetitions) |
stConnexion
| Type | Name | Description |
|---|---|---|
| string | sLogin | The login provided — see the Get Started Configuration |
| string | sKey | The Key provided — see the Get Started Configuration |
stActivations
| Type | Name | Description |
|---|---|---|
| string | sGencod | The gencod (barcode) of the product |
| string | sShopCode | The shop code for which the restocking activation applies |
| boolean | bActivation | Activation flag — 1 to activate restocking, 0 to deactivate |
Return
restocking_activationResult
| Type | Name | Description |
|---|---|---|
| array | stProcessing | This is a structure of the success/error process |
| array | stDatas | This is a structure that contains the data resulting from the query |
stProcessing
| Type | Name | Description |
|---|---|---|
| string | sErrorMessage | The error message if the request failed, empty otherwise |
| boolean | bProcessed | This is the result of the request treatment processing |
stDatas
| Type | Name | Description |
|---|---|---|
| string | sGencod | The gencod of the processed product |
| string | sShopCode | The shop code for which the activation was applied |
| boolean | bActivation | The activation status recorded — 1 activated, 0 deactivated |
| boolean | bProcessed | Indicates whether this specific line was successfully processed |
Exemple
Request Example SOAP
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:API_Stargest">
<soapenv:Header/>
<soapenv:Body>
<urn:restocking_activation>
<stConnexion>
<sLogin>test</sLogin>
<sKey>000</sKey>
</stConnexion>
<!-- 1 or more repetitions: -->
<stActivations>
<sGencod>3700518561088</sGencod>
<sShopCode>0199</sShopCode>
<bActivation>0</bActivation>
</stActivations>
<stActivations>
<sGencod>3700518561082</sGencod>
<sShopCode>014</sShopCode>
<bActivation>1</bActivation>
</stActivations>
</urn:restocking_activation>
</soapenv:Body>
</soapenv:Envelope>
Request Example PHP
$client = new \SoapClient($wsdl);
$args['stConnexion']['sLogin'] = "test";
$args['stConnexion']['sKey'] = "000";
$args['stActivations'][0]['sGencod'] = '3700518561088';
$args['stActivations'][0]['sShopCode'] = '0199';
$args['stActivations'][0]['bActivation'] = '0';
$args['stActivations'][1]['sGencod'] = '3700518561082';
$args['stActivations'][1]['sShopCode'] = '014';
$args['stActivations'][1]['bActivation'] = '1';
$return = $client->restocking_activation($args);