TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
PUT /api/v1/sidebar/:idItem endpoint performs a partial update on an existing sidebar navigation item. All three body fields — nameItem, iconItem, and route — are optional, so you can update only the specific field you need without touching the rest. The endpoint first verifies the item exists and returns a 404 if it does not, then applies the changes and returns the full updated record fetched fresh from the database.
Authentication
Requires a valid JWT in theAuthorization header. The authenticated user’s role must also have the permission PUT /api/v1/sidebar/:idItem registered in the permissions table and assigned via permissionXRole.
Request
Method:PUTPath:
/api/v1/sidebar/:idItem
Path Parameters
Numeric ID of the sidebar item to update. Must match the pattern
^\d+$ (digits only). Corresponds to the idItem primary key in the sidebarItems table.Body Parameters
All body fields are optional. Include only the fields you want to change. Sending an empty body{} is valid but results in no changes being applied.
New display label for the navigation item. Must be between 1 and 100 characters if provided.
New icon identifier (e.g. CSS class name like
"bi bi-gear"). Maximum 50 characters if provided.New frontend route path (e.g.
"/settings"). Maximum 100 characters if provided.Example Request Body
Response
200 — Success
Returns the full updated sidebar item record after the changes are applied. The response reflects all current field values fetched viaSELECT * FROM sidebarItems WHERE idItem = ?.
Always
true for successful responses.Human-readable confirmation:
"Sidebar item actualizado exitosamente".The full updated sidebar item object, reflecting all current field values (not just the changed ones).
Numeric ID of the sidebar item.
Current display label after the update.
Current icon identifier after the update, or
null if not set.Current route path after the update, or
null if not set.400 — Bad Request
Returned when theidItem path parameter is not a valid numeric string, or when a provided body field fails its length or type constraint.
401 — Unauthorized
Returned when theAuthorization header is missing or the token is invalid/expired.
403 — Forbidden
Returned when the authenticated user’s role does not have thePUT /api/v1/sidebar/:idItem permission.
404 — Not Found
Returned when no sidebar item with the givenidItem exists in the database. The check is performed by findItemById before the update is applied.
Example
Real-time Events
This endpoint emits Socket.IO events throughout the update lifecycle:| Event | Stage | Description |
|---|---|---|
sidebar:update | start | Update process initiated for the given item ID |
sidebar:update | processing | Checking existence, then persisting changes |
sidebar:update | success | Update complete, payload includes the updated item |