POST
Storage.Update
Alias of Storage.Edit. Update a warehouse in the storage table.
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
- Updates the requested Storage record after validating permissions and input fields.
Push Service
Pushes event storage.updated to users who should see this change.
Automation
No automation is run for this function.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
storage_idpost | int | 3 | Warehouse id. Aliases: id, update_id, data_id. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
namepost | string | Main warehouse | Updated name. Aliases: storage_name, title. |
team_memberpost | array | ["14","47"] | Updated shared team member ids. Aliases: team_members, team_member[]. |
father_storage_idpost | int | 0 | Updated parent warehouse id. Aliases: father, parent. |
notepost | string | Back room | Updated notes. Alias: notes. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Storage.Update",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"storage_id": "3",
"name": "Main warehouse updated"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Storage.Update",
"url_domain": "https:\/\/{domain}\/app\/Storage.Update"
}Endpoint
POST /app/Storage.Update
POST https://{user}.bull36.com/app/Storage.Update
POST https://{domain}/app/Storage.UpdateSample Output
{
"success": 1,
"id": 3,
"storage_id": 3,
"message": "Storage updated successfully.",
"socket_event": "storage.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ storage_id: '3', name: 'Main warehouse updated' });
const res = await fetch('/app/Storage.Update', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": 0,
"message": "Storage was not found."
}