PUT api/Users/{id}
Updates the user identified by the given id. Required fields in user object: Firstname, Lastname, e-mail-address, Gender.
Request Information
Parameters
Name | Description | Additional information |
---|---|---|
id | Id of the user |
Define this parameter in the request URI. |
user | Object with firstname, lastname, e-mail-address, choosen company and lunchroom |
Define this parameter in the request body. |
Request body formats
application/json, text/json
Sample:
{ "Id": 1, "Firstname": "sample string 2", "Lastname": "sample string 3", "EMailAddress": "sample string 4", "Gender": "sample string 5", "Company": 6, "Lunchroom": 7, "Dates": [ "2025-01-18T06:13:48.7131348+01:00", "2025-01-18T06:13:48.7131348+01:00", "2025-01-18T06:13:48.7131348+01:00" ] }
application/xml, text/xml
Sample:
<UserDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LunchConnection.Models.DTOs"> <Company>6</Company> <Dates xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:dateTime>2025-01-18T06:13:48.7131348+01:00</d2p1:dateTime> <d2p1:dateTime>2025-01-18T06:13:48.7131348+01:00</d2p1:dateTime> <d2p1:dateTime>2025-01-18T06:13:48.7131348+01:00</d2p1:dateTime> </Dates> <EMailAddress>sample string 4</EMailAddress> <Firstname>sample string 2</Firstname> <Gender>sample string 5</Gender> <Id>1</Id> <Lastname>sample string 3</Lastname> <Lunchroom>7</Lunchroom> </UserDTO>
application/x-www-form-urlencoded
Sample:
firstname=string1&lastname=string2&emailaddress=string3