curl --request PUT \
--url https://api.example.com/api/tasks/reorder \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{}
],
"items[].id": 123,
"items[].position": 123
}
'Update the position/order of multiple tasks
curl --request PUT \
--url https://api.example.com/api/tasks/reorder \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{}
],
"items[].id": 123,
"items[].position": 123
}
'curl -X PUT https://api.dailytracker.com/api/tasks/reorder \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '[
{
"id": 1,
"position": 3
},
{
"id": 2,
"position": 1
},
{
"id": 3,
"position": 2
}
]'
204 No Content
{
"error": "Bad Request",
"message": "Invalid request format"
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
{
"error": "Not Found",
"message": "One or more tasks not found"
}