POST api/v1/Users/{id}/ReaderAccesses
Adds Reader Access to an existing User. Returns Success/Error code plus primary key of UserReader entry made.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | string |
None. |
Body Parameters
AddReaderAccessViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
Required: Represents the PK of an existing User |
globally unique identifier |
None. |
| ReaderId |
Required: Represents the PK of an existing Reader |
integer |
None. |
| ScheduleId |
Required: Represents the PK of an existing Schedule that will restrict access to this Reader for this User |
integer |
None. |
| AccessRightsGrantedStart |
Optional: The DateTime when the User's Access Rights to this Reader will become active. If null, access will be granted immediately. |
date |
None. |
| AccessRightsGrantedEnd |
Optional: The DateTime when the User's Access Rights to this Reader will become inactive. If null, access will be granted indefinitely. |
date |
None. |
Request Formats
application/json, text/json
{
"UserId": "87c2f61a-ba23-48f8-b29f-4f0caa408135",
"ReaderId": 2,
"ScheduleId": 3,
"AccessRightsGrantedStart": "2025-10-12T03:59:22.6401065+00:00",
"AccessRightsGrantedEnd": "2025-10-12T03:59:22.6401065+00:00"
}
application/xml, text/xml
<AddReaderAccessViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <AccessRightsGrantedEnd>2025-10-12T03:59:22.6401065+00:00</AccessRightsGrantedEnd> <AccessRightsGrantedStart>2025-10-12T03:59:22.6401065+00:00</AccessRightsGrantedStart> <ReaderId>2</ReaderId> <ScheduleId>3</ScheduleId> <UserId>87c2f61a-ba23-48f8-b29f-4f0caa408135</UserId> </AddReaderAccessViewModel>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResultWithInt| Name | Description | Type | Additional information |
|---|---|---|---|
| Value |
Represents the PK value that was created as a result of an add |
integer |
None. |
| ResultCode |
Represents the result code |
integer |
None. |
| Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
{
"Value": 1,
"ResultCode": 2,
"Description": "sample string 3"
}
application/xml, text/xml
<ResultWithInt xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 3</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>2</ResultCode> <Value>1</Value> </ResultWithInt>