POST api/v1/Users/Photo

Uploads a photo file to the instance that will be used to print the badge later.

Request Information

URI Parameters

None.

Body Parameters

PersonPhotoViewModel
NameDescriptionTypeAdditional information
PersonId

globally unique identifier

None.

ImageData

Collection of byte

None.

FileName

string

None.

ThumbFileName

string

None.

SetAsDefault

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "PersonId": "63d0963d-adcf-4b04-ad87-54c3904c7c1c",
  "ImageData": "QEA=",
  "FileName": "sample string 2",
  "ThumbFileName": "sample string 3",
  "SetAsDefault": true
}

application/xml, text/xml

Sample:
<PersonPhotoViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <FileName>sample string 2</FileName>
  <ImageData>QEA=</ImageData>
  <PersonId>63d0963d-adcf-4b04-ad87-54c3904c7c1c</PersonId>
  <SetAsDefault>true</SetAsDefault>
  <ThumbFileName>sample string 3</ThumbFileName>
</PersonPhotoViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Result
NameDescriptionTypeAdditional information
ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "Description": "sample string 2"
}

application/xml, text/xml

Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 2</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>1</ResultCode>
</Result>