POST api/UpdateInterests

Updates the interests associated with a user account. Will return all interests that remain associated after the call completes.

Request Information

URI Parameters

None.

Body Parameters

UpdateInterestsRequest
NameDescriptionTypeAdditional information
SessionKey

string

Required

InterestList

List of interest Id and selection values, true for assigned and false to remove it

Dictionary of integer [key] and boolean [value]

Required

Request Formats

application/json, text/json

Sample:
{
  "SessionKey": "sample string 1",
  "InterestList": {
    "1": true,
    "3": true
  }
}

application/xml, text/xml

Sample:
<UpdateInterestsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Account">
  <InterestList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfintboolean>
      <d2p1:Key>1</d2p1:Key>
      <d2p1:Value>true</d2p1:Value>
    </d2p1:KeyValueOfintboolean>
    <d2p1:KeyValueOfintboolean>
      <d2p1:Key>3</d2p1:Key>
      <d2p1:Value>true</d2p1:Value>
    </d2p1:KeyValueOfintboolean>
  </InterestList>
  <SessionKey>sample string 1</SessionKey>
</UpdateInterestsRequest>

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 'UpdateInterestsRequest'.

Response Information

Resource Description

IEnumerable of Interest object

ApiSuccessOfIEnumerableOfInterest
NameDescriptionTypeAdditional information
Success

boolean
Data

Collection of Interest

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Data": [
    {
      "CustomerNumber": 1,
      "ID": 2,
      "Description": "sample string 3",
      "Selected": "sample string 4",
      "Weight": 5,
      "Category": "sample string 6",
      "CreateDate": "2024-12-28T09:50:31.025834+00:00",
      "CreatedBy": "sample string 8",
      "CreateLocation": "sample string 9",
      "LastUpdatedBy": "sample string 10",
      "LastUpdateDate": "2024-12-28T09:50:31.025834+00:00"
    },
    {
      "CustomerNumber": 1,
      "ID": 2,
      "Description": "sample string 3",
      "Selected": "sample string 4",
      "Weight": 5,
      "Category": "sample string 6",
      "CreateDate": "2024-12-28T09:50:31.025834+00:00",
      "CreatedBy": "sample string 8",
      "CreateLocation": "sample string 9",
      "LastUpdatedBy": "sample string 10",
      "LastUpdateDate": "2024-12-28T09:50:31.025834+00:00"
    }
  ]
}

application/xml, text/xml

Sample:
<ApiSuccessOfArrayOfInterestgLC8bFpX xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Api">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Account">
    <d2p1:Interest>
      <d2p1:Category>sample string 6</d2p1:Category>
      <d2p1:CreateDate>2024-12-28T09:50:31.025834+00:00</d2p1:CreateDate>
      <d2p1:CreateLocation>sample string 9</d2p1:CreateLocation>
      <d2p1:CreatedBy>sample string 8</d2p1:CreatedBy>
      <d2p1:CustomerNumber>1</d2p1:CustomerNumber>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:ID>2</d2p1:ID>
      <d2p1:LastUpdateDate>2024-12-28T09:50:31.025834+00:00</d2p1:LastUpdateDate>
      <d2p1:LastUpdatedBy>sample string 10</d2p1:LastUpdatedBy>
      <d2p1:Selected>sample string 4</d2p1:Selected>
      <d2p1:Weight>5</d2p1:Weight>
    </d2p1:Interest>
    <d2p1:Interest>
      <d2p1:Category>sample string 6</d2p1:Category>
      <d2p1:CreateDate>2024-12-28T09:50:31.025834+00:00</d2p1:CreateDate>
      <d2p1:CreateLocation>sample string 9</d2p1:CreateLocation>
      <d2p1:CreatedBy>sample string 8</d2p1:CreatedBy>
      <d2p1:CustomerNumber>1</d2p1:CustomerNumber>
      <d2p1:Description>sample string 3</d2p1:Description>
      <d2p1:ID>2</d2p1:ID>
      <d2p1:LastUpdateDate>2024-12-28T09:50:31.025834+00:00</d2p1:LastUpdateDate>
      <d2p1:LastUpdatedBy>sample string 10</d2p1:LastUpdatedBy>
      <d2p1:Selected>sample string 4</d2p1:Selected>
      <d2p1:Weight>5</d2p1:Weight>
    </d2p1:Interest>
  </Data>
</ApiSuccessOfArrayOfInterestgLC8bFpX>