Files
dashback/docs/api/routes/warehouse/create.md
2026-09-27 21:01:20 +02:00

764 B

POST /warehouse

Protected. Requires a valid session cookie (credentials: 'include').

Create warehouse

Creates a new warehouse for the selected company. Sort order will be automatically appended if omitted.

Body (JSON)

{
  "name": "…",
  "sort": 1
}

Response 201

Created warehouse

{
  "warehouse": {
    "id": 1,
    "name": "…",
    "sort": 1
  }
}

Errors

Status Description
400 Invalid input or missing fields — {"error":"…"}
401 Unauthorized — {"error":"…"}
403 Not authorized — {"error":"…"}
409 Warehouse already exists — {"error":"…"}

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.