PUT api/admin/users/{userId}/todos/{todoId}

This method will update an existing to-do item for user and id

Request Information

URI Parameters

NameDescriptionTypeAdditional information
userId

User Id

integer

Required

todoId

To-do item Id

integer

Required

Body Parameters

Instance of

ToDoItemBindingModel
NameDescriptionTypeAdditional information
Content

string

None.

HighPriority

boolean

None.

DateCompleted

string

None.

Request Formats

application/json, text/json

Sample:
{
  "content": "sample string 1",
  "highPriority": true,
  "dateCompleted": "sample string 3"
}

text/html

Sample:
{"content":"sample string 1","highPriority":true,"dateCompleted":"sample string 3"}

application/xml, text/xml

Sample:
<ToDoItemBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.UserTasks">
  <Content>sample string 1</Content>
  <DateCompleted>sample string 3</DateCompleted>
  <HighPriority>true</HighPriority>
</ToDoItemBindingModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ToDoItemBindingModel'.

Response Information

Resource Description

Instance of

ToDoItem
NameDescriptionTypeAdditional information
Id

integer

None.

HighPriority

boolean

None.

Content

string

None.

AddedDate

date

None.

CompletedDate

date

None.

UserId

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "highPriority": true,
  "content": "sample string 3",
  "addedDate": "2025-05-20T15:06:45.0182507-05:00",
  "completedDate": "2025-05-20T15:06:45.0182507-05:00",
  "userId": 5
}

text/html

Sample:
{"id":1,"highPriority":true,"content":"sample string 3","addedDate":"2025-05-20T15:06:45.0182507-05:00","completedDate":"2025-05-20T15:06:45.0182507-05:00","userId":5}

application/xml, text/xml

Sample:
<ToDoItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities">
  <Id xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities.Core">1</Id>
  <AddedDate>2025-05-20T15:06:45.0182507-05:00</AddedDate>
  <CompletedDate>2025-05-20T15:06:45.0182507-05:00</CompletedDate>
  <Content>sample string 3</Content>
  <HighPriority>true</HighPriority>
  <UserId>5</UserId>
</ToDoItem>