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

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

put
/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/batch
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-_]+
Body
Responses
200

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/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/batch
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?