Storage.List
Return warehouses from the product-report Storage List (dashboard request_storage_list → table storage). Visibility matches the dashboard: user_id = owner/user OR team_members contains the user. Use returned id as default_storage_id on Products.Add / Products.Update, and as item_storageid on Documents.Add line items. Page size is capped at 25. Default order is id DESC. Does not list stock quantities (storage_products) or move requests.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Returns Storage rows as JSON.
- Supports the documented filters and paging fields.
- List responses are capped at 25 rows per call.
Push Service
No push is sent because this function only reads data or returns helper information.
Automation
No automation is run for this function.
Special Instructions
- This is the warehouse CRUD list (Storage List UI), not the product stock Storage grid.
- Use data[].id as default_storage_id on products and as item_storageid on document lines.
- Do not confuse storage.id with storage_products.id (those appear inside ec_product.storage_detail).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
searchpost | string | Main | Search warehouse name. Aliases: storage_name, name, filter_data, search[value]. |
fatherpost | int | 0 | Filter by parent warehouse id (father column). Aliases: father_storage_id, parent. |
top_levelpost | int | 1 | When 1, return only top-level warehouses (father=0). Alias: parents_only=1. |
default_onlypost | int | 1 | When 1, return only the default warehouse (default_storage=1). Alias: default_storage=1. |
startpost | int | 0 | First row offset for paging. Alias: offset. |
limitpost | int | 25 | Maximum rows to return. Values above 25 are capped. Aliases: length, per_page. |
order_bypost | string | id | Order column: id, name, default_storage, father. Default id. |
order_dirpost | string | desc | Order direction: asc or desc. Default desc. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Storage.List",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"limit": "25"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Storage.List",
"url_domain": "https:\/\/{domain}\/app\/Storage.List"
}Endpoint
POST /app/Storage.List
POST https://{user}.bull36.com/app/Storage.List
POST https://{domain}/app/Storage.ListSample Output
{
"success": 1,
"count": 2,
"recordsTotal": 2,
"recordsFiltered": 2,
"total_record": 2,
"start": 0,
"limit": 25,
"data": [
{
"id": 3,
"storage_id": 3,
"data_id": 3,
"user_id": 14,
"name": "Main warehouse",
"storage_name": "Main warehouse",
"notes": "",
"note": "",
"father": 0,
"father_storage_id": 0,
"team_members": [
"14",
"47"
],
"team_member_ids": [
14,
47
],
"default_storage": 1,
"is_default": true
}
]
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Storage.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Storage.Count",
"url_domain": "https:\/\/{domain}\/app\/Storage.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"route": "Storage.Count",
"max_limit": 25
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
const res = await fetch('https://{domain}/app/Storage.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ limit: '25' });
const res = await fetch('/app/Storage.List', {
method: 'POST',
headers: { Authorization: 'Bearer ' + token },
body
});
const data = await res.json();
console.log(data.count, data.data);
// Use data.data[i].id as default_storage_id / item_storageidError Example
{
"success": "0",
"error": "bearer_token_required",
"message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}