Warehouse

Create locations in batch

Changed on
  • The selected level determines STORAGE or ORGANIZATIONAL; individual locations cannot override it.
  • Limits include existing locations: 150 direct children per parent, 149 normal warehouse-root locations, and 5,000 locations per warehouse including Default Storage.
  • The first successful creation activates storage. The entire creation request is atomic. Name validation failures return INVALID_PARAMETER with all errors in data.errors[], each containing index, locationName and reason. The index is zero-based and locationName preserves the original input. Capacity failures return INVALID_PARAMETER with current, limit and requested counts in msg and data=null. If both limits are exceeded, both reasons are returned.

Request example

{
  "externalWarehouseId": "WH-DEMO",
  "parentLocationId": 10000,
  "level": 7,
  "locationNames": [
    "Bin A",
    "Bin B"
  ]
}

Deleting a location is not available via OpenAPI. Use Desty Omni (WMS > Manajemen Penyimpanan) to delete it.

post/api/warehouse/location/add

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. The warehouse must belong to the authenticated tenant.

levelinteger required

Target level NUMBER from /api/warehouse/location/level/list, not levelId. Must be deeper than the parent's level.

locationNamesstring[] required

Final names under the same warehouse, parent and level. Trimmed names must be nonblank, at most 20 characters, and unique within the batch and warehouse.

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