BATCH Set stock for a list of products in a warehouse
Change stock for a list of products in a warehouse (max 1000 entries).
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.
If an error is returned, no changes have been made, all changes are rolled back. The error is a description of the first error met.
Required permissions: WAREHOUSE
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+Reference to a Store.
^[A-Za-z0-9-_]+Reference to a Warehouse.
^[A-Za-z0-9-_]+The success field indicate how many of the products that where successfully updated. The errors field will contain the products that failed to update.
The success field indicate how many of the products that where successfully updated. The errors field will contain the products that failed to update.
PUT /v2/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/batch HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"upsert": [
{
"productUid": "text",
"averageCost": 1,
"quantity": 1,
"changeQuantity": 1,
"reason": "text",
"serialnumbers": [
"text"
]
}
]
}{
"upsert": [
{
"errors": [
{
"errorCode": "text",
"message": "text",
"productUid": "text"
}
],
"success": 1
}
]
}Last updated
Was this helpful?

