POST request sending a JSON body with the filters for extracting the stock and the callback URL that the web service will call (with a POST request) once the CSV file is ready.getStocksCSV_v2 will respond with a JSON object containing the success property valued to true, and this means the stock retrieval has been taken in charge by KeepIT.POST the URL specified in callbackUrl. The body of the request will contain an URL to download the CSV file.{
"succes" : true,
"code" : 200,
}
| Field | Description | Type | Mandatory |
|---|---|---|---|
| callbackUrl | URL to be called with a POST request once the CSV file is ready | String | ā |
| onlyEcommerce | 'T' to only extract stock for the eCommerce, 'F' to extract the stock for all the entities. Defaults to 'F' | Char(1) | |
| onlyLastStocks | 'T' only retrieves the last, unprocessed stock records, 'F' retrieves all the stock records. Defaults to 'F'. | Char(1) | |
| system | System code to retrieve last stocks. | Varchar(250 | Only with onlyLastStocks = 'T' |
| startDate | Only extract stocks from this date on (Must be at most 31 days before current date. If specified, onlyLastStocks is ignored.) | Date | |
| hierarchyLevel1 | 1st hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel2 | 2nd hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel3 | 3rd hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel4 | 4th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel5 | 5th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel6 | 6th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel7 | 7th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel8 | 8th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel9 | 9th hierarchic level to filter the articles | Varchar(250) | |
| hierarchyLevel10 | 10th hierarchic level to filter the articles | Varchar(250) | |
| seasonCode | Season code to filter the articles | Varchar(250) | |
| entityCode | Shop code to filter the articles | Varchar(250) |
POST the service specified in the callbackUrl parameter, passing a JSON object composed as follows:{
"message" : "10 rows extracted.",
"csvTemporaryLink" : "https://download-file-path",
}
csvTemporaryLink will allow the download of a ZIP file containing the stock.csv file, with all the requested stocks inside it. The link will expire in 1 minute.CSV will contain the following columns, ordered as they appear below, and separated by ; :