Developer documentation for Stargest SOAP API

Ressource : Stock Level

Description

Allows you to retrieve stock level information for one or more products in the Stargest backoffice.

Method

stock_level

Arguments

Type Name Description
array stConnexion This is a structure containing authentication credentials
array stStckLvls This is a structure gathering all the products to check (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

stStckLvls

Type Name Description
string sGencod The gencod (barcode) of the product
string sCustomer The customer code (optional) — leave empty to query by customer family only
string sCustomerFamily The customer family code (optional, e.g. VIP) — use 0 for no specific family
integer nQte The quantity to check availability for

Return


stock_levelResult

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 product
string sCustomer The customer code
string sCustomerFamily The customer family code
integer nQte The quantity requested
boolean bAvailable Indicates whether the requested quantity is available in stock

Exemple

Request Example SOAP

		
			

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:API_Stargest">

<soapenv:Header/>

<soapenv:Body>

<urn:stock_level>

<stConnexion>

<sLogin>test</sLogin>

<sKey>000</sKey>

</stConnexion>

<!-- 1 or more repetitions: -->

<stStckLvls>

<sGencod>3700518561082</sGencod>

<sCustomer>01020480</sCustomer>

<sCustomerFamily>0</sCustomerFamily>

<nQte>6</nQte>

</stStckLvls>

<stStckLvls>

<sGencod>3700518561088</sGencod>

<sCustomer>01020477</sCustomer>

<sCustomerFamily>VIP</sCustomerFamily>

<nQte>7</nQte>

</stStckLvls>

<stStckLvls>

<sGencod>3700518561082</sGencod>

<sCustomer></sCustomer>

<sCustomerFamily>VIP</sCustomerFamily>

<nQte>8</nQte>

</stStckLvls>

</urn:stock_level>

</soapenv:Body>

</soapenv:Envelope>

Request Example PHP

		
			

$client = new \SoapClient($wsdl);

$args['stConnexion']['sLogin'] = "test";

$args['stConnexion']['sKey'] = "000";

$args['stStckLvls'][0]['sGencod'] = '3700518561082';

$args['stStckLvls'][0]['sCustomer'] = '01020480';

$args['stStckLvls'][0]['sCustomerFamily'] = '0';

$args['stStckLvls'][0]['nQte'] = '6';

$args['stStckLvls'][1]['sGencod'] = '3700518561088';

$args['stStckLvls'][1]['sCustomer'] = '01020477';

$args['stStckLvls'][1]['sCustomerFamily'] = 'VIP';

$args['stStckLvls'][1]['nQte'] = '7';

$args['stStckLvls'][2]['sGencod'] = '3700518561082';

$args['stStckLvls'][2]['sCustomer'] = '';

$args['stStckLvls'][2]['sCustomerFamily'] = 'VIP';

$args['stStckLvls'][2]['nQte'] = '8';

$return = $client->stock_level($args);


These fields are optional !
These fields are new !