frequently asked questions

All your questions in one place.

Stock

This method returns a piece of information about the stock quantities of an item.

Body - raw:

{

       "Method": "Stock",

       "Parameters": [

             <cMethod>,

             <nItem>[,

             <dDateEnd>][,

             <dDateStart>][,

             <nWarehouse>][,

             <dExpiryEnd>][,

             <dExpiryStart>]

       ]

}

 

Parameters Description
cMethod

Type of information that has to be returned. The possibles values are:

available: stock physically available;

suppliersorders: on suppliers orders or in production;

customersorders: on customers orders confirmations (reserved);

customersdeliveries: delivered to customers (delivery slips);

customersworksheets: on customers worksheets;

salesamount: total sales amount;

salesquantity: total quantity sold;

salesquantityreturned: total quantity returned (debtors credit notes);

saleslastdate: date of the last sale.

nItem ID (ad_numero) of the Item to be returned
dDateEnd The transactions up to this date are selected. This parameter is not mandatory. If the parameter is not specified, all the transactions are considered.
dDateStart The transactions starting from this date are selected. This parameter is not mandatory. If the parameter is not specified, all the transactions are considered.
nWarehouse Warehouse ID. If this parameter is specified, only the transactions for this warehouse are selected. Otherwise all the transactions are considered.
dExpiryEnd Only the transactions concerning line items with an expiry date before the date of the parameters are considered. If the parameter is not specified all the transactions are considered.
dExpiryStart Only the transactions concerning line items with an expiry date after the date of the parameters are considered. If the parameter is not specified all the transactions are considered.

 

Examples:

 

*/ Return the quantity physically in stock for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "available",

             100

       ]

}

*/ Return the quantity physically in stock at the 31.03.2017 for the item with ID = 100 (ad_numero) in the Warehouse with ID = 3.

{

       "Method": "Stock",

       "Parameters": [

             "available",

             100,

             "31.03.2017",

             "",

             3

       ]

}

 

*/ Return the quantity that will be physically in stock at the 31.03.2017 for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "available",

             100,

             "31.03.2017"

       ]

}

*/ Return the quantity already ordered at suppliers (or in production) for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "suppliersorders",

             100

       ]

}

*/ Return the quantity already ordered by customers for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "customersorders",

             100

       ]

}

*/ Return the quantity already delivered to customers for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "customersdeliveries",

             100

       ]

}

*/ Return the quantity already delivered to customers in the period of march 2017 for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "customersdeliveries",

             100,

             "31.03.2017",

             "01.03.2017"

       ]

}

*/ Return the quantity on worksheets for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "customersworksheets",

             100

       ]

}

*/ Return the total sales amount for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "customersdeliveries",

             100

       ]

}

*/ Return the total sales amount for the period of march 2017 for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "salesamount",

             100,

             "31.03.2017",

             "01.03.2017"

       ]

}

*/ Return the total quantity sold for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "salesquantity",

             100

       ]

}

*/ Return the total quantity sold for the period of march 2014 for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "salesquantity",

             100,

             "31.03.2017",

             "01.03.2017"

       ]

}

*/ Return the total quantity returned by customers for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "salesquantityreturned",

             100

       ]

}

*/ Show the total quantity returned by customers for the period of march 2017 for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "salesquantityreturned",

             100,

             "31.03.2017",

             "01.03.2017"

       ]

}

*/ Show the last sale date for the item with ID = 100 (ad_numero).

{

       "Method": "Stock",

       "Parameters": [

             "saleslastdate",

             100

       ]

}

Did you find this article useful?

0 out of 0 found this helpful