POST api/Users
Signs up a new user. Required fields in user object: Id, Firstname, Lastname, e-mail-address, Gender.
Request Information
Parameters
| Name | Description | Additional information |
|---|---|---|
| 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-11-16T11:20:07.9952111+01:00",
"2025-11-16T11:20:07.9952111+01:00",
"2025-11-16T11:20:07.9952111+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-11-16T11:20:07.9952111+01:00</d2p1:dateTime>
<d2p1:dateTime>2025-11-16T11:20:07.9952111+01:00</d2p1:dateTime>
<d2p1:dateTime>2025-11-16T11:20:07.9952111+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