Inventory

Adjust stock by location

Changed on
  • With FIFO/Average costing enabled, SYNC is unsupported and positive ADD requires unitCost per base unit.
  • SKU-location pairs are processed separately. A failed pair does not roll back successful pairs; SKU-level errors can fail all pairs for that SKU. Check failureList for details.

Request example

{
  "externalWarehouseId": "WH-DEMO",
  "adjustType": "ADD",
  "skus": [
    {
      "skuNumber": "SKU-DEMO-1",
      "locations": [
        {
          "locationId": 10001,
          "quantity": 5,
          "unitCost": 1000
        }
      ]
    }
  ]
}
post/api/inventory/stock/location/adjust

Request

  • Base URL
    https://api.desty.app
  • Auth
    none declared. Required headers: Authorization

Headers

Authorizationstring required

Authorization (Only:Bearer <access_token>)

Request body

externalWarehouseIdstring required

External warehouse ID returned by POST /api/warehouse/list. Storage must be activated for this warehouse.

adjustType'SYNC' | 'ADD' | 'MINUS' required

SYNC sets on-hand; ADD increases it; MINUS decreases it. Values are case-sensitive.

Response

successful operation

codestring required

Business result code: "0" on success; otherwise INVALID_PARAMETER, INVALID_TOKEN, LIMIT_REQUEST or SERVER_ERROR. SERVER_ERROR with msg "Previous setting is still in progress" means another request for the same tenant is still running; it is retryable after a few seconds.

msgstring nullable

Result message; normally null on success.

successboolean required

True when code equals "0".

Changes