> For the complete documentation index, see [llms.txt](https://docs.hesh.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hesh.app/manuals/public-api/warehouses.md).

# Warehouses

## List warehouses

> \
> Returns every warehouse on the tenant — across all statuses (active / inactive / archived) — paginated.\
> \
> \### Query\
> \
> \- \`search\` (optional) — substring (ILIKE) match on \`name\` OR \`warehouse\_code\`, case-insensitive.\
> \- \`skip\` / \`take\` (optional) — standard offset pagination; defaults to \`skip = 0\`, \`take = 20\`.\
> \
> The response items intentionally omit the heavyweight inventory-page extras (custom-column values, location detail, creator info). Use \`GET /custom-columns/:id\` to load detail when you need everything.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PaginatedResult":{"type":"object","properties":{"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetadata"}]}},"required":["meta"]},"PaginationMetadata":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"lastPage":{"type":"number","description":"Last page number"},"currentPage":{"type":"number","description":"Current page number"},"perPage":{"type":"number","description":"Items per page"},"prev":{"type":"number","description":"Previous page number","nullable":true},"next":{"type":"number","description":"Next page number","nullable":true}},"required":["total","lastPage","currentPage","perPage","prev","next"]},"WarehouseListItemDto":{"type":"object","properties":{"id":{"type":"string"},"warehouse_code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","inactive","archived"]},"purpose":{"type":"string","enum":["production","logistics","wip"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"]},"division_count":{"type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WarehouseCreatedByDto"}]},"location":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WarehouseLocationListItemDto"}]},"custom_column_values":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseCustomColumnValueListItemDto"}}},"required":["id"]},"WarehouseCreatedByDto":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"avatar_id":{"type":"string","nullable":true}},"required":["id","first_name","last_name"]},"WarehouseLocationListItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"display_name":{"type":"string"}},"required":["id","display_name"]},"WarehouseCustomColumnValueListItemDto":{"type":"object","properties":{"custom_column_id":{"type":"string"},"value":{"description":"Shape mirrors the source CustomColumn.column_type; validated on write. For PEOPLE columns the stored uuid(s) are replaced with { id, name } objects (name is `${first_name} ${last_name}` for USER; entity name for DEPARTMENT / POSITION; empty string when the referenced entity has been deleted).","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/IdNameDto"},{"type":"array","items":{"$ref":"#/components/schemas/IdNameDto"}}]}},"required":["custom_column_id","value"]},"IdNameDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}}},"paths":{"/api/v1/public/warehouses":{"get":{"description":"\nReturns every warehouse on the tenant — across all statuses (active / inactive / archived) — paginated.\n\n### Query\n\n- `search` (optional) — substring (ILIKE) match on `name` OR `warehouse_code`, case-insensitive.\n- `skip` / `take` (optional) — standard offset pagination; defaults to `skip = 0`, `take = 20`.\n\nThe response items intentionally omit the heavyweight inventory-page extras (custom-column values, location detail, creator info). Use `GET /custom-columns/:id` to load detail when you need everything.\n","operationId":"PublicWarehousesController_list_v1","parameters":[{"name":"search","required":false,"in":"query","description":"Substring (ILIKE) match on name OR warehouse_code, case-insensitive.","schema":{"maxLength":255,"type":"string"}},{"name":"skip","required":false,"in":"query","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"take","required":false,"in":"query","schema":{"minimum":1,"default":20,"type":"number"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedResult"},{"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseListItemDto"}}}}]}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"List warehouses","tags":["Warehouses"]}}}}
```

## Create warehouse

> \
> Creates a new warehouse on the tenant.\
> \
> \### Notes\
> \
> \- \`name\` must be unique within the tenant.\
> \- \`warehouse\_code\` is auto-generated when omitted (digits-only sequential id). Custom codes max 18 chars, must be unique.\
> \- \`purpose\` is required and immutable in practice. \`wip\` is reserved for the system-managed in-progress warehouse and cannot be created here.\
> \- \`status\` defaults to \`active\`; \`archived\` is allowed on create but soft-locks the row from non-admin edits in the FE.\
> \- \`storage\_type\` defaults to \`default\` (no divisions). \`divisions\` is ignored unless \`storage\_type\` is overridden.\
> \- \`location\` is a free-form display name (max 500 chars). The server finds-or-creates a \`warehouse\_locations\` row by that name and links the warehouse to it. \`latitude\` / \`longitude\` are left null when the row is created through this endpoint (public API doesn't carry geo coords).\
> \
> \
> \### \`custom\_column\_values\` — what to pass\
> \
> Each entry is \`{ custom\_column\_id: uuid, value: ... }\`. The value's shape must match the referenced column's \`column\_type\` (server validates the combination — bad shapes are rejected with 400):\
> \
> \- \*\*text\*\* — string. Length bounds enforced by the column's \`config.{min\_chars, max\_chars}\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "Free-form note" }\
> &#x20; \`\`\`\
> \
> \- \*\*number\*\* — integer or float. \`config.number\_type = "integer"\` rejects decimals.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": 42 }\
> &#x20; \`\`\`\
> \
> \- \*\*date\_time\*\* — ISO-8601 string. Shape depends on \`config.time\_type\` (\`date\_time\` / \`date\_only\` / \`time\_only\`).\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "2026-06-18T12:00:00Z" }\
> &#x20; \`\`\`\
> \
> \- \*\*people\*\* — entity uuid (user / department / position id, matching \`config.assignee\_type\`), or an array for multi.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "user-uuid" }\
> &#x20; \`\`\`\
> \
> \- \*\*boolean\*\* — \`true\` or \`false\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": true }\
> &#x20; \`\`\`\
> \
> \- \*\*choice\*\* — \`choice\_option\_id\` for \`choice\_type = "single"\`, or an array of ids for \`"multi"\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "choice-option-uuid" }\
> &#x20; \`\`\`\
> \
> On update, full-reconcile semantics apply: listed columns are upserted, columns with stored values that are absent from the request are deleted.\ <br>

````json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicCreateWarehouseDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"warehouse_code":{"type":"string","minLength":1,"maxLength":18,"description":"Optional override of the auto-generated warehouse code. Max 18 chars; must be unique within the tenant."},"description":{"type":"string","maxLength":1000},"status":{"type":"string","enum":["active","inactive","archived"],"default":"active"},"purpose":{"type":"string","enum":["production","logistics","wip"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"],"default":"default"},"divisions":{"maxItems":1000,"description":"Ignored when storage_type = default.","type":"array","items":{"$ref":"#/components/schemas/CreateWarehouseDivisionDto"}},"custom_column_values":{"type":"array","items":{"$ref":"#/components/schemas/CreateWarehouseCustomColumnValueDto"}},"location":{"type":"string","minLength":1,"maxLength":500,"description":"Free-form location name. The server finds-or-creates a warehouse_locations row by display_name; lat/lng default to null when the row is created here."}},"required":["name","purpose"]},"CreateWarehouseDivisionDto":{"type":"object","properties":{"division_code":{"type":"string","minLength":1,"maxLength":18,"description":"\"Bin ID\" per spec — client-provided, required, unique within the warehouse. Max 18 chars, free-form text."},"name":{"type":"string","maxLength":255}},"required":["division_code","name"]},"CreateWarehouseCustomColumnValueDto":{"type":"object","properties":{"custom_column_id":{"type":"string","format":"uuid"},"value":{"description":"Write shape depends on the parent CustomColumn.column_type — validated in the service. TEXT / DATE_TIME / single CHOICE / single PEOPLE → string; NUMBER → number; BOOLEAN → boolean; multi CHOICE / multi PEOPLE → string[] of UUIDs.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["custom_column_id","value"]},"WarehouseDto":{"type":"object","properties":{"id":{"type":"string"},"warehouse_code":{"type":"string","description":"Auto-generated digits-only sequential code by default; admins may set free-form text up to 18 chars."},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","inactive","archived"]},"purpose":{"type":"string","enum":["production","logistics","wip"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"]},"created_at":{"format":"date-time","type":"string"},"divisions":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseDivisionDto"}},"custom_column_values":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseCustomColumnValueDto"}},"location":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WarehouseLocationDto"}]},"inventory_columns":{"description":"Definitions for the INVENTORY custom columns this warehouse has stored values for. FE joins by id ↔ custom_column_values[].custom_column_id.","type":"array","items":{"$ref":"#/components/schemas/WarehouseInventoryColumnDto"}}},"required":["id","warehouse_code","name","description","status","purpose","storage_type","created_at","divisions","custom_column_values","location","inventory_columns"]},"WarehouseDivisionDto":{"type":"object","properties":{"id":{"type":"string"},"division_code":{"type":"string"},"name":{"type":"string"}},"required":["id","division_code","name"]},"WarehouseCustomColumnValueDto":{"type":"object","properties":{"id":{"type":"string"},"custom_column_id":{"type":"string"},"value":{"description":"Read shape mirrors the parent CustomColumn.column_type. Detail / list endpoints additionally expand PEOPLE values from UUID(s) to { id, name } object(s); create / update endpoints return the raw UUID(s).","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/IdNameDto"},{"type":"array","items":{"$ref":"#/components/schemas/IdNameDto"}}]}},"required":["id","custom_column_id","value"]},"IdNameDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"WarehouseLocationDto":{"type":"object","properties":{"id":{"type":"string"},"place_id":{"type":"string"},"display_name":{"type":"string"},"latitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."},"longitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."}},"required":["id","place_id","display_name","latitude","longitude"]},"WarehouseInventoryColumnDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"column_type":{"type":"string","enum":["text","number","date_time","people","boolean","choice"]},"config":{"description":"Type-specific config. Shape depends on column_type.","oneOf":[{"$ref":"#/components/schemas/TextConfigDto"},{"$ref":"#/components/schemas/NumberConfigDto"},{"$ref":"#/components/schemas/DateTimeConfigDto"},{"$ref":"#/components/schemas/PeopleConfigDto"},{"$ref":"#/components/schemas/BooleanConfigDto"},{"$ref":"#/components/schemas/ChoiceConfigDto"}]},"choice_options":{"description":"Present for CHOICE columns.","type":"array","items":{"$ref":"#/components/schemas/ChoiceOptionDto"}},"people_options":{"description":"Present for PEOPLE columns.","type":"array","items":{"$ref":"#/components/schemas/PeopleOptionDto"}}},"required":["id","name","column_type","config"]},"TextConfigDto":{"type":"object","properties":{"min_chars":{"type":"number","nullable":true,"minimum":0,"description":"Minimum character limit (inclusive). Null/undefined = no limit."},"max_chars":{"type":"number","nullable":true,"minimum":1,"description":"Maximum character limit (inclusive). Null/undefined = no limit."}}},"NumberConfigDto":{"type":"object","properties":{"number_type":{"enum":["integer","decimal"],"type":"string"}},"required":["number_type"]},"DateTimeConfigDto":{"type":"object","properties":{"time_type":{"enum":["date_time","date_only","time_only"],"type":"string"}},"required":["time_type"]},"PeopleConfigDto":{"type":"object","properties":{"assignee_type":{"enum":["user","department","position"],"type":"string"}},"required":["assignee_type"]},"BooleanConfigDto":{"type":"object","properties":{"true_label":{"type":"string","minLength":1},"false_label":{"type":"string","minLength":1}},"required":["true_label","false_label"]},"ChoiceConfigDto":{"type":"object","properties":{"choice_type":{"enum":["single","multi"],"type":"string"}},"required":["choice_type"]},"ChoiceOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","minLength":1},"position":{"type":"number","minimum":0}},"required":["id","label","position"]},"PeopleOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entity_id":{"type":"string","format":"uuid","description":"Resolved against user/department/position based on column.config.assignee_type."}},"required":["id","entity_id"]}}},"paths":{"/api/v1/public/warehouses":{"post":{"description":"\nCreates a new warehouse on the tenant.\n\n### Notes\n\n- `name` must be unique within the tenant.\n- `warehouse_code` is auto-generated when omitted (digits-only sequential id). Custom codes max 18 chars, must be unique.\n- `purpose` is required and immutable in practice. `wip` is reserved for the system-managed in-progress warehouse and cannot be created here.\n- `status` defaults to `active`; `archived` is allowed on create but soft-locks the row from non-admin edits in the FE.\n- `storage_type` defaults to `default` (no divisions). `divisions` is ignored unless `storage_type` is overridden.\n- `location` is a free-form display name (max 500 chars). The server finds-or-creates a `warehouse_locations` row by that name and links the warehouse to it. `latitude` / `longitude` are left null when the row is created through this endpoint (public API doesn't carry geo coords).\n\n\n### `custom_column_values` — what to pass\n\nEach entry is `{ custom_column_id: uuid, value: ... }`. The value's shape must match the referenced column's `column_type` (server validates the combination — bad shapes are rejected with 400):\n\n- **text** — string. Length bounds enforced by the column's `config.{min_chars, max_chars}`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"Free-form note\" }\n  ```\n\n- **number** — integer or float. `config.number_type = \"integer\"` rejects decimals.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": 42 }\n  ```\n\n- **date_time** — ISO-8601 string. Shape depends on `config.time_type` (`date_time` / `date_only` / `time_only`).\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"2026-06-18T12:00:00Z\" }\n  ```\n\n- **people** — entity uuid (user / department / position id, matching `config.assignee_type`), or an array for multi.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"user-uuid\" }\n  ```\n\n- **boolean** — `true` or `false`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": true }\n  ```\n\n- **choice** — `choice_option_id` for `choice_type = \"single\"`, or an array of ids for `\"multi\"`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"choice-option-uuid\" }\n  ```\n\nOn update, full-reconcile semantics apply: listed columns are upserted, columns with stored values that are absent from the request are deleted.\n\n","operationId":"PublicWarehousesController_create_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateWarehouseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Create warehouse","tags":["Warehouses"]}}}}
````

## Check whether a warehouse name or warehouse\_code is available

> \
> Returns \`{ is\_available: true }\` when no warehouse already owns the supplied value, \`false\` otherwise.\
> \
> \### Query\
> \
> \- \`field\` — one of \`name\` or \`warehouse\_code\`.\
> \- \`value\` — candidate string to test (max 255 chars; the value is \*\*not\*\* length-validated against the field's create rules — that happens at create / update time).<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"WarehouseUniquenessResponseDto":{"type":"object","properties":{"is_available":{"type":"boolean","description":"true → value is free to use; false → another warehouse already owns it."}},"required":["is_available"]}}},"paths":{"/api/v1/public/warehouses/check-uniqueness":{"get":{"description":"\nReturns `{ is_available: true }` when no warehouse already owns the supplied value, `false` otherwise.\n\n### Query\n\n- `field` — one of `name` or `warehouse_code`.\n- `value` — candidate string to test (max 255 chars; the value is **not** length-validated against the field's create rules — that happens at create / update time).\n","operationId":"PublicWarehousesController_checkUniqueness_v1","parameters":[{"name":"field","required":true,"in":"query","schema":{"type":"string","enum":["name","warehouse_code"]}},{"name":"value","required":true,"in":"query","description":"Candidate value to check; the BE validates availability only — length/character rules are enforced by the regular create/update DTOs at submit time.","schema":{"maxLength":255,"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseUniquenessResponseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Check whether a warehouse name or warehouse_code is available","tags":["Warehouses"]}}}}
```

## Get warehouse by id

> \
> Returns the full warehouse record, including \`divisions\`, \`custom\_column\_values\` (raw stored values), and \`inventory\_columns\` (definitions for every column referenced by this warehouse — join \`inventory\_columns\[].id\` with \`custom\_column\_values\[].custom\_column\_id\` on the client).\
> \
> \`location\` is currently always \`null\` for warehouses created through the public API.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"WarehouseDto":{"type":"object","properties":{"id":{"type":"string"},"warehouse_code":{"type":"string","description":"Auto-generated digits-only sequential code by default; admins may set free-form text up to 18 chars."},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","inactive","archived"]},"purpose":{"type":"string","enum":["production","logistics","wip"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"]},"created_at":{"format":"date-time","type":"string"},"divisions":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseDivisionDto"}},"custom_column_values":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseCustomColumnValueDto"}},"location":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WarehouseLocationDto"}]},"inventory_columns":{"description":"Definitions for the INVENTORY custom columns this warehouse has stored values for. FE joins by id ↔ custom_column_values[].custom_column_id.","type":"array","items":{"$ref":"#/components/schemas/WarehouseInventoryColumnDto"}}},"required":["id","warehouse_code","name","description","status","purpose","storage_type","created_at","divisions","custom_column_values","location","inventory_columns"]},"WarehouseDivisionDto":{"type":"object","properties":{"id":{"type":"string"},"division_code":{"type":"string"},"name":{"type":"string"}},"required":["id","division_code","name"]},"WarehouseCustomColumnValueDto":{"type":"object","properties":{"id":{"type":"string"},"custom_column_id":{"type":"string"},"value":{"description":"Read shape mirrors the parent CustomColumn.column_type. Detail / list endpoints additionally expand PEOPLE values from UUID(s) to { id, name } object(s); create / update endpoints return the raw UUID(s).","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/IdNameDto"},{"type":"array","items":{"$ref":"#/components/schemas/IdNameDto"}}]}},"required":["id","custom_column_id","value"]},"IdNameDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"WarehouseLocationDto":{"type":"object","properties":{"id":{"type":"string"},"place_id":{"type":"string"},"display_name":{"type":"string"},"latitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."},"longitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."}},"required":["id","place_id","display_name","latitude","longitude"]},"WarehouseInventoryColumnDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"column_type":{"type":"string","enum":["text","number","date_time","people","boolean","choice"]},"config":{"description":"Type-specific config. Shape depends on column_type.","oneOf":[{"$ref":"#/components/schemas/TextConfigDto"},{"$ref":"#/components/schemas/NumberConfigDto"},{"$ref":"#/components/schemas/DateTimeConfigDto"},{"$ref":"#/components/schemas/PeopleConfigDto"},{"$ref":"#/components/schemas/BooleanConfigDto"},{"$ref":"#/components/schemas/ChoiceConfigDto"}]},"choice_options":{"description":"Present for CHOICE columns.","type":"array","items":{"$ref":"#/components/schemas/ChoiceOptionDto"}},"people_options":{"description":"Present for PEOPLE columns.","type":"array","items":{"$ref":"#/components/schemas/PeopleOptionDto"}}},"required":["id","name","column_type","config"]},"TextConfigDto":{"type":"object","properties":{"min_chars":{"type":"number","nullable":true,"minimum":0,"description":"Minimum character limit (inclusive). Null/undefined = no limit."},"max_chars":{"type":"number","nullable":true,"minimum":1,"description":"Maximum character limit (inclusive). Null/undefined = no limit."}}},"NumberConfigDto":{"type":"object","properties":{"number_type":{"enum":["integer","decimal"],"type":"string"}},"required":["number_type"]},"DateTimeConfigDto":{"type":"object","properties":{"time_type":{"enum":["date_time","date_only","time_only"],"type":"string"}},"required":["time_type"]},"PeopleConfigDto":{"type":"object","properties":{"assignee_type":{"enum":["user","department","position"],"type":"string"}},"required":["assignee_type"]},"BooleanConfigDto":{"type":"object","properties":{"true_label":{"type":"string","minLength":1},"false_label":{"type":"string","minLength":1}},"required":["true_label","false_label"]},"ChoiceConfigDto":{"type":"object","properties":{"choice_type":{"enum":["single","multi"],"type":"string"}},"required":["choice_type"]},"ChoiceOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","minLength":1},"position":{"type":"number","minimum":0}},"required":["id","label","position"]},"PeopleOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entity_id":{"type":"string","format":"uuid","description":"Resolved against user/department/position based on column.config.assignee_type."}},"required":["id","entity_id"]}}},"paths":{"/api/v1/public/warehouses/{id}":{"get":{"description":"\nReturns the full warehouse record, including `divisions`, `custom_column_values` (raw stored values), and `inventory_columns` (definitions for every column referenced by this warehouse — join `inventory_columns[].id` with `custom_column_values[].custom_column_id` on the client).\n\n`location` is currently always `null` for warehouses created through the public API.\n","operationId":"PublicWarehousesController_getById_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Get warehouse by id","tags":["Warehouses"]}}}}
```

## Hard-delete warehouse

> \
> Hard-deletes the warehouse. Rejected if the warehouse has any related operations (production workflows). The \`wip\` warehouse cannot be deleted.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/v1/public/warehouses/{id}":{"delete":{"description":"\nHard-deletes the warehouse. Rejected if the warehouse has any related operations (production workflows). The `wip` warehouse cannot be deleted.\n","operationId":"PublicWarehousesController_delete_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Hard-delete warehouse","tags":["Warehouses"]}}}}
```

## Update warehouse

> \
> Updates a warehouse. Any field not provided is left unchanged.\
> \
> \### Notes\
> \
> \- \`warehouse\_code\` and \`storage\_type\` are locked once the warehouse has related operations (production workflows, etc.).\
> \- \`description\` accepts \`null\` to clear an existing value.\
> \- \`divisions\` and \`custom\_column\_values\` use full-reconcile semantics — listed rows are upserted, existing rows absent from the request are deleted. Pass an empty array to clear everything.\
> \- \`location\` (string) finds-or-creates a \`warehouse\_locations\` row by display name and links it. Pass \`null\` to clear the existing link; omit the field to leave it unchanged.\
> \
> \
> \### \`custom\_column\_values\` — what to pass\
> \
> Each entry is \`{ custom\_column\_id: uuid, value: ... }\`. The value's shape must match the referenced column's \`column\_type\` (server validates the combination — bad shapes are rejected with 400):\
> \
> \- \*\*text\*\* — string. Length bounds enforced by the column's \`config.{min\_chars, max\_chars}\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "Free-form note" }\
> &#x20; \`\`\`\
> \
> \- \*\*number\*\* — integer or float. \`config.number\_type = "integer"\` rejects decimals.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": 42 }\
> &#x20; \`\`\`\
> \
> \- \*\*date\_time\*\* — ISO-8601 string. Shape depends on \`config.time\_type\` (\`date\_time\` / \`date\_only\` / \`time\_only\`).\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "2026-06-18T12:00:00Z" }\
> &#x20; \`\`\`\
> \
> \- \*\*people\*\* — entity uuid (user / department / position id, matching \`config.assignee\_type\`), or an array for multi.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "user-uuid" }\
> &#x20; \`\`\`\
> \
> \- \*\*boolean\*\* — \`true\` or \`false\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": true }\
> &#x20; \`\`\`\
> \
> \- \*\*choice\*\* — \`choice\_option\_id\` for \`choice\_type = "single"\`, or an array of ids for \`"multi"\`.\
> \
> &#x20; \`\`\`json\
> &#x20; { "custom\_column\_id": "uuid", "value": "choice-option-uuid" }\
> &#x20; \`\`\`\
> \
> On update, full-reconcile semantics apply: listed columns are upserted, columns with stored values that are absent from the request are deleted.\ <br>

````json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Warehouses"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicUpdateWarehouseDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"warehouse_code":{"type":"string","minLength":1,"maxLength":18,"description":"Locked once the warehouse has related operations."},"description":{"type":"string","nullable":true,"maxLength":1000,"description":"Send null to clear the existing description."},"status":{"type":"string","enum":["active","inactive","archived"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"],"description":"Locked once the warehouse has related operations."},"divisions":{"maxItems":1000,"description":"Full-reconcile semantics: rows with id are updated, rows without id are inserted, existing rows absent from this list are deleted.","type":"array","items":{"$ref":"#/components/schemas/UpdateWarehouseDivisionDto"}},"custom_column_values":{"description":"Full-reconcile semantics: listed columns are upserted, existing values for unlisted columns are deleted.","type":"array","items":{"$ref":"#/components/schemas/CreateWarehouseCustomColumnValueDto"}},"location":{"type":"string","nullable":true,"minLength":1,"maxLength":500,"description":"Pass a non-empty string to find-or-create and link, null to clear the existing link, omit to leave unchanged."}}},"UpdateWarehouseDivisionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Present → update the matching bin. Absent → insert a new bin."},"division_code":{"type":"string","minLength":1,"maxLength":18,"description":"\"Bin ID\" per spec; max 18 chars, must remain globally unique across warehouse_divisions."},"name":{"type":"string","maxLength":255}},"required":["division_code","name"]},"CreateWarehouseCustomColumnValueDto":{"type":"object","properties":{"custom_column_id":{"type":"string","format":"uuid"},"value":{"description":"Write shape depends on the parent CustomColumn.column_type — validated in the service. TEXT / DATE_TIME / single CHOICE / single PEOPLE → string; NUMBER → number; BOOLEAN → boolean; multi CHOICE / multi PEOPLE → string[] of UUIDs.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["custom_column_id","value"]},"WarehouseDto":{"type":"object","properties":{"id":{"type":"string"},"warehouse_code":{"type":"string","description":"Auto-generated digits-only sequential code by default; admins may set free-form text up to 18 chars."},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","inactive","archived"]},"purpose":{"type":"string","enum":["production","logistics","wip"]},"storage_type":{"type":"string","enum":["default","bin","zone","rack","floor"]},"created_at":{"format":"date-time","type":"string"},"divisions":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseDivisionDto"}},"custom_column_values":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseCustomColumnValueDto"}},"location":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WarehouseLocationDto"}]},"inventory_columns":{"description":"Definitions for the INVENTORY custom columns this warehouse has stored values for. FE joins by id ↔ custom_column_values[].custom_column_id.","type":"array","items":{"$ref":"#/components/schemas/WarehouseInventoryColumnDto"}}},"required":["id","warehouse_code","name","description","status","purpose","storage_type","created_at","divisions","custom_column_values","location","inventory_columns"]},"WarehouseDivisionDto":{"type":"object","properties":{"id":{"type":"string"},"division_code":{"type":"string"},"name":{"type":"string"}},"required":["id","division_code","name"]},"WarehouseCustomColumnValueDto":{"type":"object","properties":{"id":{"type":"string"},"custom_column_id":{"type":"string"},"value":{"description":"Read shape mirrors the parent CustomColumn.column_type. Detail / list endpoints additionally expand PEOPLE values from UUID(s) to { id, name } object(s); create / update endpoints return the raw UUID(s).","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/IdNameDto"},{"type":"array","items":{"$ref":"#/components/schemas/IdNameDto"}}]}},"required":["id","custom_column_id","value"]},"IdNameDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"WarehouseLocationDto":{"type":"object","properties":{"id":{"type":"string"},"place_id":{"type":"string"},"display_name":{"type":"string"},"latitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."},"longitude":{"type":"number","nullable":true,"description":"Null for rows seeded through the public API (free-form name only)."}},"required":["id","place_id","display_name","latitude","longitude"]},"WarehouseInventoryColumnDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"column_type":{"type":"string","enum":["text","number","date_time","people","boolean","choice"]},"config":{"description":"Type-specific config. Shape depends on column_type.","oneOf":[{"$ref":"#/components/schemas/TextConfigDto"},{"$ref":"#/components/schemas/NumberConfigDto"},{"$ref":"#/components/schemas/DateTimeConfigDto"},{"$ref":"#/components/schemas/PeopleConfigDto"},{"$ref":"#/components/schemas/BooleanConfigDto"},{"$ref":"#/components/schemas/ChoiceConfigDto"}]},"choice_options":{"description":"Present for CHOICE columns.","type":"array","items":{"$ref":"#/components/schemas/ChoiceOptionDto"}},"people_options":{"description":"Present for PEOPLE columns.","type":"array","items":{"$ref":"#/components/schemas/PeopleOptionDto"}}},"required":["id","name","column_type","config"]},"TextConfigDto":{"type":"object","properties":{"min_chars":{"type":"number","nullable":true,"minimum":0,"description":"Minimum character limit (inclusive). Null/undefined = no limit."},"max_chars":{"type":"number","nullable":true,"minimum":1,"description":"Maximum character limit (inclusive). Null/undefined = no limit."}}},"NumberConfigDto":{"type":"object","properties":{"number_type":{"enum":["integer","decimal"],"type":"string"}},"required":["number_type"]},"DateTimeConfigDto":{"type":"object","properties":{"time_type":{"enum":["date_time","date_only","time_only"],"type":"string"}},"required":["time_type"]},"PeopleConfigDto":{"type":"object","properties":{"assignee_type":{"enum":["user","department","position"],"type":"string"}},"required":["assignee_type"]},"BooleanConfigDto":{"type":"object","properties":{"true_label":{"type":"string","minLength":1},"false_label":{"type":"string","minLength":1}},"required":["true_label","false_label"]},"ChoiceConfigDto":{"type":"object","properties":{"choice_type":{"enum":["single","multi"],"type":"string"}},"required":["choice_type"]},"ChoiceOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","minLength":1},"position":{"type":"number","minimum":0}},"required":["id","label","position"]},"PeopleOptionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entity_id":{"type":"string","format":"uuid","description":"Resolved against user/department/position based on column.config.assignee_type."}},"required":["id","entity_id"]}}},"paths":{"/api/v1/public/warehouses/{id}":{"patch":{"description":"\nUpdates a warehouse. Any field not provided is left unchanged.\n\n### Notes\n\n- `warehouse_code` and `storage_type` are locked once the warehouse has related operations (production workflows, etc.).\n- `description` accepts `null` to clear an existing value.\n- `divisions` and `custom_column_values` use full-reconcile semantics — listed rows are upserted, existing rows absent from the request are deleted. Pass an empty array to clear everything.\n- `location` (string) finds-or-creates a `warehouse_locations` row by display name and links it. Pass `null` to clear the existing link; omit the field to leave it unchanged.\n\n\n### `custom_column_values` — what to pass\n\nEach entry is `{ custom_column_id: uuid, value: ... }`. The value's shape must match the referenced column's `column_type` (server validates the combination — bad shapes are rejected with 400):\n\n- **text** — string. Length bounds enforced by the column's `config.{min_chars, max_chars}`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"Free-form note\" }\n  ```\n\n- **number** — integer or float. `config.number_type = \"integer\"` rejects decimals.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": 42 }\n  ```\n\n- **date_time** — ISO-8601 string. Shape depends on `config.time_type` (`date_time` / `date_only` / `time_only`).\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"2026-06-18T12:00:00Z\" }\n  ```\n\n- **people** — entity uuid (user / department / position id, matching `config.assignee_type`), or an array for multi.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"user-uuid\" }\n  ```\n\n- **boolean** — `true` or `false`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": true }\n  ```\n\n- **choice** — `choice_option_id` for `choice_type = \"single\"`, or an array of ids for `\"multi\"`.\n\n  ```json\n  { \"custom_column_id\": \"uuid\", \"value\": \"choice-option-uuid\" }\n  ```\n\nOn update, full-reconcile semantics apply: listed columns are upserted, columns with stored values that are absent from the request are deleted.\n\n","operationId":"PublicWarehousesController_update_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateWarehouseDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Update warehouse","tags":["Warehouses"]}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hesh.app/manuals/public-api/warehouses.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
