4WS Suite
Home
API Reference
  • Data mangement API
  • Documents API
Home
API Reference
  • Data mangement API
  • Documents API
Fourwayshop
  1. Stock
  • Document Manager
    • Orders
      • Save Sale Order
      • Save Return Order
    • Orchestrated Orders
      • Orchestrated Order
      • Orchestrated Return order
      • Orchestrated Update order
    • Cart
      • Cart Validation
      • Cart Full Validation
    • Sales
      • Save receipt
      • Salve only Order
      • Replace or update sale
      • Get last digital order
    • Warehouse
      • Save Entry from supplier
      • Save Transfer document
      • Save Free Entry
    • Purchase
      • Save Purchase
    • Get Document
      GET
    • Update Document external references
      POST
  • Customer
    • Get Customer
      GET
    • Set Customer Opt-in
      POST
  • Loyalty vouchers
    • Get customer loyalty vouchers
      GET
    • Get loyalty vouchers at a time interval
      GET
    • Get last loyalty vouchers
      GET
  • Giftcard
    • Get Giftcard
      GET
    • Update Giftcard
      POST
    • Generate Gift Card Barcode
      POST
    • Gift Card PDF Generation
      POST
  • Stock
    • Get Stock
      POST
    • Get last stock
      GET
    • Insert Stock
      POST
  1. Stock

Get last stock

GET
/api
Last modified:2025-04-24 08:59:05
The web service response will be composed of:
success : Boolean that indicated wether the request was successful or not
valueObjectList : is an array of objects, in which every element is an istance found after the specified date, in the specified shop (if the respective param is present)
moreRows: Boolean that indicated wether the are more rows to be retrieved or not

Pagination#

The request returns a maximum of 20 elements in the valueObjectList array. If moreRows is true, then you can request the next 20 elements by appending the query parameter &start=X on the request URL, where X is the first element to be retrieved.

Example#

Response example#

  {
    "success": true,
    "valueObjectList": [
        {
            "entityCode": "1150",
            "entityDescription": "Negozio Mobile shop (Michele)",
            "entityType": "",
            "entityCity": "",
            "entityCountry": "",
            "entityProvince": "",
            "entityRegion": "",
            "entityZipCode": "",
            "parentEntityCode": 440,
            "itemCode": "191MP2311",
            "itemDescription": "GIACCA MY",
            "dimensionType1": "TAGLIA",
            "dimensionLevel1": "4",
            "dimensionDescription1": "L",
            "dimensionType2": "COLORE",
            "dimensionLevel2": "2138",
            "dimensionDescription2": "NERO/WHITE 03459",
            "dimensionType3": null,
            "dimensionLevel3": null,
            "dimensionType4": null,
            "dimensionLevel4": null,
            "dimensionType5": null,
            "dimensionLevel5": null,
            "quantityStock": 3,
            "quantityAvailable": 2,
            "quantityReservated": 1
        },
        {
            "entityCode": "1150",
            "entityDescription": "Negozio Mobile shop (Michele)",
            "entityType": "",
            "entityCity": "",
            "entityCountry": "",
            "entityProvince": "",
            "entityRegion": "",
            "entityZipCode": "",
            "parentEntityCode": 440,
            "itemCode": "AB70791",
            "itemDescription": "VESTITO ELISABETTA",
            "dimensionType1": "TAGLIA",
            "dimensionLevel1": "3",
            "dimensionDescription1": "40",
            "dimensionType2": "COLORE",
            "dimensionLevel2": "441",
            "dimensionDescription2": "Nero",
            "dimensionType3": null,
            "dimensionLevel3": null,
            "dimensionType4": null,
            "dimensionLevel4": null,
            "dimensionType5": null,
            "dimensionLevel5": null,
            "quantityStock": 2,
            "quantityAvailable": 2,
            "quantityReservated": 1
        },
        {
            "entityCode": "10",
            "entityDescription": "Negozio 10",
            "entityType": "SHOP",
            "entityCity": "MILANO",
            "entityCountry": "IT",
            "entityProvince": "MI",
            "entityRegion": "LOMBARDIA",
            "entityZipCode": "20124",
            "parentEntityCode": 440,
            "itemCode": "011 N",
            "itemDescription": "SCARPA DONNA REBECCA WHITE",
            "dimensionType1": "TAGLIA",
            "dimensionLevel1": "24",
            "dimensionDescription1": "46½",
            "dimensionType2": "COLORE",
            "dimensionLevel2": "125",
            "dimensionDescription2": "Black",
            "dimensionType3": null,
            "dimensionLevel3": null,
            "dimensionType4": null,
            "dimensionLevel4": null,
            "dimensionType5": null,
            "dimensionLevel5": null,
            "quantityStock": 5,
            "quantityAvailable": -1,
            "quantityReservated": 1
        }
    ],
    "moreRows": false
}

Fields#

Request fields#

FieldDescriptionTypeMandatory
fromDateTimeDatetime starting point (max 24h ago)Date✓
entityCodeEntity for which the stock is requestedVarchar(250)
channelExtracts the stock only for the specified channel (e.g. ECOMMERCE)Varchar(250)

Response items#

FieldDescriptionType
entityCodeentity code intended as shop or warehouseVarchar(250)
entityDescriptiondescription of the entity intended as shop or warehouseVarchar(250)
entityTypetype of entityVarchar(250)
entityCitystore or warehouse cityVarchar(250)
entityProvincestore or warehouse province (ISO2)Varchar(250)
entityRegionstore or warehouse regionVarchar(250)
entityZipCodestore or warehouse zip codeVarchar(250)
itemCodeitem code of the searched articleVarchar(250)
itemDescriptionarticle descriptionVarchar(250)
dimensionType1Type 1 of the dimensional group that specialize the product (ex. size plan for the dimensional group related to sizesVarchar(250)
dimensionLevel1code of 1st dimension (ex. 1)Varchar(250)
dimensionDescription1description of 1st dimension (ex. UN)Varchar(250)
dimensionType2Type 2 of the dimensional group that specialize the product (ex. color palette for the dimensional group related to colors)Varchar(250)
dimensionLevel2code of 2nd dimension (ex. 00000)Varchar(250)
dimensionDescription2description of 2nd dimension (ex. Neutral)Varchar(250)
dimensionType3Type 3 of the dimensional group that specialize the product( ex. drop for the dimensional group related to the drop)Varchar(250)
dimensionLevel3code of 3rd dimensionVarchar(250)
dimensionDescription3description of 3rd dimensionVarchar(250)
dimensionalType4Type 4 of the dimensional group that specialize the productVarchar(250)
dimensionLevel4code of 4th dimensionVarchar(250)
dimensionDescription4description of 4th dimensionVarchar(250)
dimensionalType5Type 5 of the dimensional group that specialize the productVarchar(250)
dimensionLevel5code of 5th dimensionVarchar(250)
dimensionDescription5description of 5th dimensionVarchar(250)
quantityStockquantity in the warehouse/shopInteger
quantityAvailablequanty available (stock - committed)Integer
quantityReservatedquantity reserved for the storeInteger

Request

Query Params

Header Params

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET '/api?cmd=getLastStocks_v1&applicationId={{APPLICATION_ID}}&appId={{APPLICATION_ID}}&loadRoles=Y&fromDateTime=2022-05-03 10:10:00&channel=ECOMMERCE&entityCode=99' \
--header 'applicationId: {{APPLICATION_ID}}' \
--header 'appId: {{APPLICATION_ID}}' \
--header 'namespace: {{NAMESPACE}}' \
--header 'languageId: {{LANGUAGE}}' \
--header 'username: {{USERNAME}}' \
--header 'password: {{PASSWORD}}' \
--header 'companyId: {{COMPANY_ID}}' \
--header 'siteId: {{SITE_ID}}' \
--header 'loadRoles: Y' \
--header 'Content-Type: application/json'

Responses

🟢200Get last stock - success
application/json
Body

Example
{
    "success": true,
    "valueObjectList": [
        {
            "entityCode": "10",
            "entityDescription": "Negozio 10",
            "entityType": "SHOP",
            "entityCity": "MILANO",
            "entityCountry": "IT",
            "entityProvince": "MI",
            "entityRegion": "LOMBARDIA",
            "entityZipCode": "20124",
            "parentEntityCode": 440,
            "itemCode": "011 N",
            "itemDescription": "SCARPA DONNA REBECCA WHITE",
            "dimensionType1": "TAGLIA",
            "dimensionLevel1": "24",
            "dimensionDescription1": "46½",
            "dimensionType2": "COLORE",
            "dimensionLevel2": "125",
            "dimensionDescription2": "Black",
            "dimensionType3": null,
            "dimensionLevel3": null,
            "dimensionType4": null,
            "dimensionLevel4": null,
            "dimensionType5": null,
            "dimensionLevel5": null,
            "quantityStock": 2,
            "quantityAvailable": 1
        }
    ],
    "code": 200,
    "moreRows": false
}
🟢200Get last stock - fail
🟠422Unique constraint error
Modified at 2025-04-24 08:59:05
Previous
Get Stock
Next
Insert Stock
Built with