API documentation
Method list
Test your request
Changelog


getInventoryProductLogs
The method allows to retrieve a list of events related to product change (or their variants) in the BaseLinker catalog.


Input parameters
product_idintProduct identifier. In case of retrieving logs for a variant, the variant identifier must be provided as the product identifier.
date_fromint(optional) Date from which logs are to be retrieved. Unix time stamp format.
date_toint(optional) Date up to which logs are to be retrieved. Unix time stamp format.
log_typeint(optional) List of event types you want to retrieve. Available values:
1 - Change in stock
2 - Price change
3 - Product creation
4 - Product deletion
5 - Text fields modifications
6 - Locations modifications
7 - Modifications of links
8 - Gallery modifications
9 - Variant modifications
10 - Modifications of bundle products
sortint(optional) Type of log sorting. Possible "ASC" values ( ascending from date), "DESC" (descending after the date). By default the sorting is done in ascending order.
pageint(optional) Results paging (100 product editions per page).



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
logsarrayAn array of logs grouped by date and the profile executing the change. An array contains the fields listed below.
| - profilestringThe name of the profile performing the change.
| - dateintEvent date
| - entriesarrayAn array of events performed by a given profile at a given time. An array contains the fields listed below.
| - | - typearrayEvent type. Available values:
1 - Change in stock
2 - Price change
3 - Product creation
4 - Product deletion
5 - Text fields modifications
6 - Locations modifications
7 - Modifications of links
8 - Gallery modifications
9 - Variant modifications
10 - Modifications of bundle products
| - | - frommixedPrevious value to be completed for some event types:
Event type 1 - (int) Previous product stock.
Event type 2 - (float) Previous product price
| - | - tomixedNew value completed for some event types:
Event type 1 - (int) New product stock.
Event type 2 - (float) New product price
| - | - infomixedAdditional information, completed for certain types of events:
Event type 1 - (varchar) The identifier of the warehouse where the stock was changed.
Event type 2 - (int) Identifier of the price group where the price has changed.
Event type 3 - (varchar) Identifier of the text field where the value was changed.
Event type 6 - (varchar) Identifier of the warehouse where the location has been changed



Sample
Input data:
Output data:
A sample request in php: