POST api/account/customer/preference

Request Information

URI Parameters

None.

Body Parameters

CustomerPrefModel
NameDescriptionTypeAdditional information
PrefList

Collection of ItemPreference

None.

ProductPrefList

Collection of ItemProductPreference

None.

Request Formats

application/json, text/json

Sample:
{
  "PrefList": [
    {
      "ID": 1,
      "PreferenceID": 2
    },
    {
      "ID": 1,
      "PreferenceID": 2
    }
  ],
  "ProductPrefList": [
    {
      "ProductID": 1,
      "PreferenceID": 2
    },
    {
      "ProductID": 1,
      "PreferenceID": 2
    }
  ]
}

application/xml, text/xml

Sample:
<CustomerPrefModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/cag.Web.API.Areas.Account.Models">
  <PrefList>
    <ItemPreference>
      <ID>1</ID>
      <PreferenceID>2</PreferenceID>
    </ItemPreference>
    <ItemPreference>
      <ID>1</ID>
      <PreferenceID>2</PreferenceID>
    </ItemPreference>
  </PrefList>
  <ProductPrefList>
    <ItemProductPreference>
      <PreferenceID>2</PreferenceID>
      <ProductID>1</ProductID>
    </ItemProductPreference>
    <ItemProductPreference>
      <PreferenceID>2</PreferenceID>
      <ProductID>1</ProductID>
    </ItemProductPreference>
  </ProductPrefList>
</CustomerPrefModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

BaseJsonResult
NameDescriptionTypeAdditional information
Success

boolean

None.

Message

string

None.

Errors

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Message": "sample string 2",
  "Errors": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<BaseJsonResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/cag.Web.API.Models">
  <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Errors>
  <Message>sample string 2</Message>
  <Success>true</Success>
</BaseJsonResult>