DELETE /stocks/warehouses/{warehouseId}

Delete a warehouse

Deletes a specific Warehouse and its associated stock. Before deleting, ensure any related operators and ongoing purchases are handled using the 'associations' parameter. If 'associations' is not provided and the warehouse has linked operators or purchases, the deletion will fail to prevent data loss. Important: To avoid deleting the stock, you must transfer it to another warehouse before deleting this one.

Operation ID: deleteStockWarehouse
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
warehouseId required
path
string

The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.

Example: 1

Query Parameters

Name Type Description
associations
query
string

A comma-separated list of dependencies (related resources).

operators purchases
destinationWarehouseId
query
integer

The ID of the target warehouse to which associated resources (operators or purchases) should be moved when deleting the current warehouse.

Example: 1

Responses

status string
error
error object
http_code integer
400
message string
more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
404
message string

Example: Resource not found

more_info string | null
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string