ApiAsset
Sort assets
Reorders all direct children of a parent asset. The request must include every existing child ID exactly once.
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
Path Parameters
parentId*string
The unique identifier of the parent asset
Format
uuidRequest Body
application/json
Ordered list of child asset IDs (UUID) representing the desired sibling order under the given parent.
sortedChildIds*array<string>
Array of child asset UUIDs in the desired order.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://test.sweetconnect.io/api/asset/v1/assets/497f6eca-6276-4993-bfeb-53cbbbba6f08/sort" \ -H "Content-Type: application/json" \ -d '{ "sortedChildIds": [ "f3c1a8d5-72b9-4a64-84e9-2f7b1cb9f44a", "0b6a9d4c-3f12-471d-8e77-4cbac1ff15fb", "9e21d72b-6c77-41f3-9d15-8ac3df9a763e" ] }'Empty
{
"errors": [
{
"errorCode": "BadRequest",
"message": "The request payload is invalid.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "Unauthorized",
"message": "Authentication is required to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NoPermission",
"message": "You do not have permission to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "InternalServerError",
"message": "An unexpected internal server error occurred.",
"extension": {}
}
]
}