POST api/v2.0/Demographics/AddDemographicCategory

Add a new demographic category. Can only be accessed by an Admin user.

Request Information

URI Parameters

None.

Body Parameters

Name: string, Description: string, IsNetwork: (Optional, Defaults to False) If True, contacts with demographics in this category will be placed into networks associated with those demographics., IsFreeFormAllowed: (Optional, Defaults False) If True, users will be able to supply their own custom values for this demographic category., IsMultiSelect: (Optional, Defaults to False) If True, users will be able to select multiple values for this demographic category., IsPerson: (Optional, Defaults to True) If True, this demographic category can be associated with contacts that have the IsCompany flag set to False. IsCompany: (Optional, Defaults to False) If True, this demographic category can be associated with contacts that have the IsCompany flag set to True. ShowDescriptionOnProfile: (Optional, Defaults to False) If True, the description of this demographic category will appear alongside the demographic on users' profiles.

DemographicTypeRequest
NameDescriptionTypeAdditional information
Name

string

None.

Description

string

None.

IsNetwork

boolean

None.

IsFreeFormAllowed

boolean

None.

IsMultiSelect

boolean

None.

IsPerson

boolean

None.

IsCompany

boolean

None.

ShowDescriptionInProfile

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Description": "sample string 2",
  "IsNetwork": true,
  "IsFreeFormAllowed": true,
  "IsMultiSelect": true,
  "IsPerson": true,
  "IsCompany": true,
  "ShowDescriptionInProfile": true
}

application/xml, text/xml

Sample:
<DemographicTypeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Request">
  <Description>sample string 2</Description>
  <IsCompany>true</IsCompany>
  <IsFreeFormAllowed>true</IsFreeFormAllowed>
  <IsMultiSelect>true</IsMultiSelect>
  <IsNetwork>true</IsNetwork>
  <IsPerson>true</IsPerson>
  <Name>sample string 1</Name>
  <ShowDescriptionInProfile>true</ShowDescriptionInProfile>
</DemographicTypeRequest>

Response Information

Resource Description

DemographicType
NameDescriptionTypeAdditional information
DemographicTypeKey

Unique key for the Demographic Type.

globally unique identifier

None.

Name

Name of the Demographic Type.

string

None.

Description

Description of the Demographic Type.

string

None.

IsNetwork

Is this Demographic Type associated with a Network?

boolean

None.

IsFreeFormAllowed

Can this Demographic Type be used with Free-Form Demographic entries?

boolean

None.

IsMultiSelect

Is this Demographic Type to be used with Multi-select responses.

boolean

None.

IsPerson

Is this Demographic Type related to Contacts?

boolean

None.

ShowDescriptionInProfile

Should this Demographic Type's description be shown in a user's Profile?

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "DemographicTypeKey": "12f09d53-71e5-48dd-9bd0-467fe6d02509",
  "Name": "sample string 2",
  "Description": "sample string 3",
  "IsNetwork": true,
  "IsFreeFormAllowed": true,
  "IsMultiSelect": true,
  "IsPerson": true,
  "ShowDescriptionInProfile": true
}

application/xml, text/xml

Sample:
<DemographicType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Demographics">
  <DemographicTypeKey>12f09d53-71e5-48dd-9bd0-467fe6d02509</DemographicTypeKey>
  <Description>sample string 3</Description>
  <IsFreeFormAllowed>true</IsFreeFormAllowed>
  <IsMultiSelect>true</IsMultiSelect>
  <IsNetwork>true</IsNetwork>
  <IsPerson>true</IsPerson>
  <Name>sample string 2</Name>
  <ShowDescriptionInProfile>true</ShowDescriptionInProfile>
</DemographicType>