Developer documentation for Stargest SOAP API

Ressource : Stock

Description

Allow you to make a stargest mouvement between retail store and warehouse from an order .

Method

create_stock_movement

Arguments

Type Name Description
array stConnexion Structure containing login and access key information
string sOrderReference Order reference or description
string sOrderID Order identification number
string sDepositCode Warehouse code (either sDepositCode or sShopCode is required)
string sShopCode Retail store code (either sShopCode or sDepositCode is required)
int nTypeDeMouvement Movement type code for transfer (currently, only code 28 is available)
string sSeasonCode Collection code for the document
string sUserCode User code associated with the document
int nIdCategory ID of the expected category. (0 for none)
string sSupplierCode Supplier code to be associated with the document. If left empty, no supplier is assigned. Use 00 for the default supplier.
array taOrderLine Structure that contains all products in the order

taOrderLine Details:

Type Name Description
string sGencod Product barcode
string rQty Quantity of the product ordered
string moPriceBrut Unit price of the product
string xDiscount Discount rate on the product
string dDeliveryDate Optional delivery date for the product, if specified

stConnexion Structure:

Type Name Description
string sLogin Login for authentication
string sKey Access key for authentication

Return

create_stock_movementResult Structure:

Type Name Description
array stProcessing Structure with process status (success or error)
string sDocumentNumber The number of the successfully generated document

stProcessing

Type Name Description
string sErrorMessage This is a structure
boolean bProcessed This is the result of the request traitement processing

Example Request: SOAP and PHP


    $client = new \SoapClient($wsdl);
    $args['stConnexion']['sLogin'] = "testUser";
    $args['stConnexion']['sKey'] = "000";

    $args['stOrder']['sOrderReference']  = 'This is a test transfert';
    $args['stOrder']['sOrderID']  = 'MV00005';
    $args['stOrder']['sDepositCode']  = '0000';
    $args['stOrder']['sShopCode']  = "";
    $args['stOrder']['nTypeDeMouvement']  = '28';
    $args['stOrder']['sSeasonCode']  = 'H24';
    $args['stOrder']['sUserCode']  = 'SV';
    $args['stOrder']['nIdCategory']  = '2';
    $args['stOrder']['sSupplierCode']  = 'AV';

    $args['stOrder']['taOrderLine'][0]['sGencod'] = '9007000963558';
    $args['stOrder']['taOrderLine'][0]['rQty'] = '2';
    $args['stOrder']['taOrderLine'][0]['moPriceBrut'] = '50';
    $args['stOrder']['taOrderLine'][0]['xDiscount'] = '5';

    $response = $client->create_stock_movement($args);
    

These fields are optional !
These fields are new !