POST call, passing a JSON body as specified below.POST when the queue has ended. If you wish you can specify a payload that will be returned to you in the callback.POST when the request has ended. In case of success the callback reuqest body is the following JSON: {
"success": true,
"code": 200,
"message": "Insert/Update successful.",
"jobName": COMPANY_WS_INSERT_STOCKS_jobName_Date.now() or COMPANY_WS_INSERT_STOCKS_Date.now(),
"errorObjects": [],
"insertedObjects": [{
"entityCode" : "yyy",
"itemBarcode": "xxx"
}],
"additionalData": {
"additionalField": "Will be returned in response as-is"
}
}
{
"success": false,
"code": 400,
"message": "Error: was not performed, check the error message of the returned records.";
"jobName": COMPANY_WS_INSERT_STOCKS_jobName_Date.now() or COMPANY_WS_INSERT_STOCKS_Date.now(),
"errorObjects": [
{
"entityCode" : "yyy",
"itemBarcode": "xxx",
"errorMessage": "Errore: xxx non valorizzato."
}
],
"insertedObjects": [],
"additionalData": {
"additionalField": "Will be returned in response as-is"
}
}
{
"success": true,
"code": 206,
"message": insertedObjects.length + " record inserted/updated and " + errorObjects.length + " record in error",
"jobName": COMPANY_WS_INSERT_STOCKS_jobName_Date.now() or COMPANY_WS_INSERT_STOCKS_Date.now(),
"errorObjects": [
{
"entityCode" : "yyy",
"itemBarcode": "xxx",
"errorMessage": msgError
}
],
"insertedObjects": [{
"entityCode" : "yyy",
"itemBarcode": "xxx"
}]
}
| Field | Description | Type | Mandatory |
|---|---|---|---|
| callbackUrl | URL to be called with a POST request once the stock creation is termined | String | |
| jobName | Job name returned if callbackUrl is set (if not set default is COMPANY_WS_INSERT_STOCKS_Date.now()) | String | |
| stocks | Array of articles stock object [MAX ALLOWED 50 ITEMS](see below for the complete structure). | Array | ✓ |
| additionalData | An object containing any data, that will be returned as-in in response. Useful to store information required in the callbackUrl | JSON Object |
| Field | Description | Type | Mandatory |
|---|---|---|---|
| entityCode | Shop code | Varchar(250) | ✓ |
| entityLocation | Location code | Varchar(250) | ✓(if you want lease management) |
| itemBarcode | Barcode of the article for insert stock | Varchar(50) | ✓ |
| quantityStock | Quantity in stock | Integer | ✓ |
| quantityGeneric1 | Quantity configurable1 | Integer | |
| quantityGeneric2 | Quantity configurable2 | Integer | |
| quantityGeneric3 | Quantity configurable3 | Integer | |
| quantityGeneric4 | Quantity configurable4 | Integer | |
| quantityGeneric5 | Quantity configurable5 | Integer | |
| quantityArrived | Quantity arrived | Integer | |
| quantityArrivedWarehouse | Quantity arrived from warehouse | Integer | |
| quantityArrivedStore | Quantity arrived from store | Integer | |
| quantityArrivedSupplier | Quantity arrived from supplier | Integer | |
| quantityOnDelivery | Quantity on delivery | Integer | |
| quantityOrder | Quantity order | Integer | |
| quantityRiassort | Quantity restocking | Integer | |
| quantityCommitted | Quantity committed | Integer | |
| quantityDispatched | Quantity dispatched | Integer | |
| quantityInvoiced | Quantity invoiced | Integer | |
| quantityReceipted | Quantity receipted | Integer | |
| quantitySaleB2B | Quantity sales delivery note | Integer | |
| quantityCanceled | Quantity canceled | Integer | |
| quantityReturned | Quantity returned | Integer | |
| quantityAdjusted | Quantity adjusted | Integer | |
| quantityTransfered | Quantity transfered | Integer | |