POST api/UserAccount/AddPositions
Assigns positions to a user
Request Information
URI Parameters
None.
Body Parameters
PositionsForUser| Name | Description | Type | Mandatory when |
|---|---|---|---|
| Username |
Username that will be assigned to positions. |
string |
Always Required |
| Positions |
IDs of Positions |
Collection of integer |
Always Required |
Request Formats
application/json, text/json
Sample:
{
"Username": "ceo@example.com",
"Positions": [
1,
2
]
}
text/xml
Sample:
<PositionsForUser xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QAP.API.ModelsForClient">
<Positions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>1</d2p1:int>
<d2p1:int>2</d2p1:int>
</Positions>
<Username>ceo@example.com</Username>
</PositionsForUser>
Response Information
Resource Description
JsonResponseModelOfPositionsForUser| Name | Description | Type | Mandatory when |
|---|---|---|---|
| ResponseCode | integer | ||
| ResponseMessage | string | ||
| Data | PositionsForUser |
Response Formats
application/json, text/json
Sample:
{
"ResponseCode": 200,
"ResponseMessage": "Positions for user are added.",
"Data": {
"Username": "ceo@example.com",
"Positions": [
1,
2
]
}
}
text/xml
Sample:
<JsonResponseModelOfPositionsForUserCyyWUdKo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RGS.API.Models">
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/QAP.API.ModelsForClient">
<d2p1:Positions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>1</d3p1:int>
<d3p1:int>2</d3p1:int>
</d2p1:Positions>
<d2p1:Username>ceo@example.com</d2p1:Username>
</Data>
<ResponseCode>200</ResponseCode>
<ResponseMessage>Positions for user are added.</ResponseMessage>
</JsonResponseModelOfPositionsForUserCyyWUdKo>
Error Response Causes
- Invalid API credentials
- No user exists with the given username
- No position exists with the given Position id