POST api/users/{id}/newsletters

Requires authentication. Updates newsletter subscriptions for specified user. The user is identitfied by GUID id If successful returns "200 OK", with the body of the response containing a representation of the organisation's users. If not found, returns "404 Not Found" If CRM operations fail for an un-recoverable reason, the service returns "502 Bad Gateway" Any other server-side errors return "500 Internal Server Error"

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

globally unique identifier

Required

Body Parameters

Collection of Newsletter
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

None.

IsSubscribed

boolean

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Id": "1e3c2f1a-f693-489e-bbb7-1919963c42a0",
    "Name": "sample string 2",
    "IsSubscribed": true
  },
  {
    "Id": "1e3c2f1a-f693-489e-bbb7-1919963c42a0",
    "Name": "sample string 2",
    "IsSubscribed": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfNewsletter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.Webservices.Domain">
  <Newsletter>
    <Id>1e3c2f1a-f693-489e-bbb7-1919963c42a0</Id>
    <IsSubscribed>true</IsSubscribed>
    <Name>sample string 2</Name>
  </Newsletter>
  <Newsletter>
    <Id>1e3c2f1a-f693-489e-bbb7-1919963c42a0</Id>
    <IsSubscribed>true</IsSubscribed>
    <Name>sample string 2</Name>
  </Newsletter>
</ArrayOfNewsletter>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'List`1'.

Response Information

Resource Description

UserRepresentation

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.