For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set stock for product in specified warehouse

The request contains two quantity fields quantity and changeQuantity. Both may not be set in the same entry. Use quantity to set a new total stock for the product. Use changeQuantity to adjust the product's stock by a positive or negative number to increase or decrease stock. Use averageCost to perform new calculation of stock average cost. At least one of these three fields must be set on each entry.

Required permissions: WAREHOUSE

put
/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
storeUidstringRequired

Reference to a Store.

Pattern: ^[A-Za-z0-9-_]+
warehouseUidstringRequired

Reference to a Warehouse.

Pattern: ^[A-Za-z0-9-_]+
productUidstringRequired

Reference to a Product.

Pattern: ^[A-Za-z0-9-_]+
Body
averageCostintegerOptional

set new average cost

quantityintegerOptional

set new stock quantity

changeQuantityintegerOptional

make stock adjustment

reasonstringRequired
serialnumbersstring[]Optional

Array of strings to identify serial numbers for the quantity in stock. Length of array must match the quantity value. This field is required when product has serialNoRequired = "ON_RECEIVE"

Responses
200

Example response

application/json
averageCostintegerRequired
locationLabelstringRequired
maxStockLevelintegerRequired
minStockLevelintegerRequired
productUidstringRequiredPattern: ^[A-Za-z0-9-_]+
productSkustringRequired
quantityReservedintegerRequired
quantityStockintegerRequired
warehouseUidstringRequiredPattern: ^[A-Za-z0-9-_]+
warehouseNamestringRequired
storeUidstringRequiredPattern: ^[A-Za-z0-9-_]+
storeNamestringRequired
put/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}
PUT /v2/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "averageCost": 1,
  "quantity": 1,
  "changeQuantity": 1,
  "reason": "text",
  "serialnumbers": [
    "text"
  ]
}
200

Example response

{
  "averageCost": 1,
  "locationLabel": "text",
  "maxStockLevel": 1,
  "minStockLevel": 1,
  "productUid": "text",
  "productSku": "text",
  "quantityReserved": 1,
  "quantityStock": 1,
  "warehouseUid": "text",
  "warehouseName": "text",
  "storeUid": "text",
  "storeName": "text"
}

Last updated

Was this helpful?