Warehouse Management
Manage warehouses including creation and retrieval operations.
Overview
The Warehouse Management endpoints allow you to create and retrieve warehouse information. Warehouses serve as the primary containers for organizing inventory and storage locations.
Create Warehouse
Creates a new warehouse with the specified properties.
Request Body
{
"ms_trace": [
{
"ms_signature": "warehouse-create-req-123",
"warning_count": 0
}
],
"data": {
"name": "Main Distribution Center",
"type": "INTERNAL",
"partner_id": 123,
"description": "Primary warehouse for distribution operations"
}
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ms_trace | array | Required | Request tracing information |
| data.name | string | Required | Name of the warehouse |
| data.type | string | Required | Warehouse type (see WarehouseTypeEnum) |
| data.partner_id | integer | Required | ID of the associated partner |
| data.description | string | Optional | Description of the warehouse |
Warehouse Types
The following warehouse types are supported (from WarehouseTypeEnum):
INTERNAL- Internal warehouse managed by the organizationEXTERNAL- External warehouse managed by third parties
Response
Returns success status with created warehouse data. Exact response structure not verified from controller.
Get Warehouses
Retrieves a list of warehouses based on the specified filters.
Request Body
{
"ms_trace": [
{
"ms_signature": "warehouse-get-req-456",
"warning_count": 0
}
],
"data": {
"warehouse_id": 123
}
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ms_trace | array | Required | Request tracing information |
| data.warehouse_id | integer | Optional | Filter by specific warehouse ID |
Response
Returns array of warehouses matching the filter criteria. Exact response structure not verified from controller.
Service Implementation
Both warehouse operations are handled by dedicated service classes:
CreateWarehouse- Handles warehouse creation logicGetWarehouses- Handles warehouse retrieval with filtering
Both services implement the ServiceInterface and are automatically resolved through the ServiceMethodsEnum.
Error Responses
Validation Errors
Standard Laravel validation error responses may be returned for missing or invalid required fields. Exact formats not verified from controller code.
Business Logic Errors
Additional error responses may be returned for business rule violations such as invalid warehouse types or duplicate names. Exact error formats not verified from controller code.