Skip to content

AdjustInventory

API for updating inventory by adjusting the inventory amount from the current inventory on hand.

POST /openapi/warehouse-inventory/v1/product/stock/update

Request Parameters

Parameter Type Required Description
warehouseId string true Warehouse id
stockList Array(StockList) true Length should be between 1 to 20

StockList

Parameter Type Required Description
masterSku string true Master product sku
quantity int true Stock quantity,It should be greater than or equal to 0 and less than 999999.
remark string false Remark

Response Parameters

Name Type Description
warehouseId long Warehouse id
stockList array[]

StockList

Name Type Description
masterSku string Master product sku
masterProductName string Master product name
masterVariationId string Master variation id
transportStock Long Transport stock
warehouseStock Long Warehouse stock
spareStock Long Spare stock
promotionStock Long Promotion stock
lockedStock Long Locked stock
availableStock Long Available stock
safetyStock Long Safety stock
outStock Long Out stock
updateDatetime datetime Update date and time

Request Example

Example

curl --location --request POST '{Ginee Host}/openapi/warehouse-inventory/v1/product/stock/update' \
    --header 'Content-Type: application/json' \
    --header 'X-Advai-Country: ID' \
    --header 'Authorization: {Your Access Key} + ':' + signature' \
    --data-raw '{
        "warehouseId":"WW64BE1DB61890960001D39C7D",
        "stockList":[{
            "masterSku":"test0803001-sku",
            "quantity":30,
            "remark":"manual adjustment"
        }]
    }'

Success

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "warehouseId": "WW64BE1DB61890960001D39C7D",
        "stockList": [
            {
                "masterSku": "test0803001-sku",
                "quantity": null,
                "masterProductName": "test0803001",
                "masterVariationId": "MV64CB49065F15030001BD8920",
                "warehouseId": "WW64BE1DB61890960001D39C7D",
                "transportStock": 0,
                "warehouseStock": 30,
                "spareStock": 0,
                "promotionStock": 0,
                "lockedStock": 0,
                "availableStock": 30,
                "outStock": 0,
                "safetyStock": 0,
                "updateDatetime": "2023-08-03T07:48:28Z"
            }
        ]
    },
    "extra": null,
    "pricingStrategy": "PAY"
}

Parameter error

{
    "code": "PARAMETER_ERROR",
    "message": "data does not exist, please check the parameters",
    "data": null,
    "extra": null,
    "pricingStrategy": "FREE"
}