PATCH Users
Update a user. User Authorization Required.
Request Information
URI Parameters
None.
Body Parameters
The user to update with user id and any fields to update. (FirstName, LastName, PostalCode, Password are available for update)
UserName | Description | Type | Additional information |
---|---|---|---|
UserId |
The user's BibleTrivia Id. |
integer |
None. |
AllPassId |
The user's AllPass Id. |
integer |
None. |
UserName |
The user name. |
string |
None. |
The user's email address. |
string |
None. |
|
FirstName |
The user's first name. |
string |
None. |
LastName |
The user's last name. |
string |
None. |
PostalCode |
Zip/Postal code |
string |
None. |
FacebookId |
The user's optional Facebook Id. |
integer |
None. |
UserScore |
The user's score. |
UserStats |
None. |
AccessToken |
The AccessToken used when authenticating to Facebook. The FacebookId must be set also. |
string |
None. |
Password |
The password used when authenticating to AllPass. |
string |
None. |
UserKey |
The user's key. |
string |
None. |
ApiUrl | Link |
None. |
|
ResourceObjectType | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "userId": 1, "allPassId": 1, "userName": "sample string 1", "email": "sample string 2", "firstName": "sample string 3", "lastName": "sample string 4", "postalCode": "sample string 5", "facebookId": 1, "userScore": { "userId": 1, "questions": 2, "correct": 3, "percentCorrect": 4.0, "userName": "sample string 5", "apiUrl": { "href": "sample string 10/userstats/sample string 7" }, "resourceObjectType": "userStats" }, "userKey": "MNzK7OlAv6+4qYaZLtd/8g==", "apiUrl": { "href": "sample string 10/users/sample string 12" }, "resourceObjectType": "user" }
application/xml, text/xml
Sample:
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <ApiUrl> <href>sample string 10/users/sample string 12</href> </ApiUrl> <ResourceObjectType>user</ResourceObjectType> <AccessToken i:nil="true" /> <AllPassId>1</AllPassId> <Email>sample string 2</Email> <FacebookId>1</FacebookId> <FirstName>sample string 3</FirstName> <LastName>sample string 4</LastName> <Password i:nil="true" /> <PostalCode>sample string 5</PostalCode> <UserId>1</UserId> <UserKey>MNzK7OlAv6+4qYaZLtd/8g==</UserKey> <UserName>sample string 1</UserName> <UserScore> <ApiUrl> <href>sample string 10/userstats/sample string 7</href> </ApiUrl> <ResourceObjectType>userStats</ResourceObjectType> <Correct>3</Correct> <PercentCorrect>4</PercentCorrect> <Questions>2</Questions> <UserId>1</UserId> <UserName>sample string 5</UserName> </UserScore> </User>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
The created user.
ResponseInstanceOfUserName | Description | Type | Additional information |
---|---|---|---|
Data | User |
None. |
|
ResultType | ResultType |
None. |
|
Messages | Collection of string |
None. |
|
Links | Links |
None. |
|
ApiBaseUrl | string |
None. |
|
responseObjectType | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "data": { "userId": 1, "allPassId": 1, "userName": "sample string 1", "email": "sample string 2", "firstName": "sample string 3", "lastName": "sample string 4", "postalCode": "sample string 5", "facebookId": 1, "userScore": { "userId": 1, "questions": 2, "correct": 3, "percentCorrect": 4.0, "userName": "sample string 5", "apiUrl": { "href": "/userstats/sample string 7" }, "resourceObjectType": "userStats" }, "userKey": "MNzK7OlAv6+4qYaZLtd/8g==", "apiUrl": { "href": "/users/sample string 12" }, "resourceObjectType": "user" }, "resultType": { "code": 0, "message": "Success" }, "messages": [ "sample string 1", "sample string 2" ], "links": {}, "apiBaseUrl": "sample string 1", "responseObjectType": "responseInstance<user>" }
application/xml, text/xml
Sample:
<ResponseInstance xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <ApiBaseUrl>sample string 1</ApiBaseUrl> <Links> <First i:nil="true" /> <Last i:nil="true" /> <Next i:nil="true" /> <Previous i:nil="true" /> <Self i:nil="true" /> </Links> <Messages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </Messages> <ResultType> <Code>Success</Code> <Message>Success</Message> </ResultType> <responseObjectType>responseInstance<user></responseObjectType> <Data> <ApiUrl> <href>/users/sample string 12</href> </ApiUrl> <ResourceObjectType>user</ResourceObjectType> <AccessToken i:nil="true" /> <AllPassId>1</AllPassId> <Email>sample string 2</Email> <FacebookId>1</FacebookId> <FirstName>sample string 3</FirstName> <LastName>sample string 4</LastName> <Password i:nil="true" /> <PostalCode>sample string 5</PostalCode> <UserId>1</UserId> <UserKey>MNzK7OlAv6+4qYaZLtd/8g==</UserKey> <UserName>sample string 1</UserName> <UserScore> <ApiUrl> <href>/userstats/sample string 7</href> </ApiUrl> <ResourceObjectType>userStats</ResourceObjectType> <Correct>3</Correct> <PercentCorrect>4</PercentCorrect> <Questions>2</Questions> <UserId>1</UserId> <UserName>sample string 5</UserName> </UserScore> </Data> </ResponseInstance>