POST {clientId}/ConsentTypes
This method will add new Consent Types which can be used on profiles.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
clientId |
This is your organization’s MyPreferences Account Id. |
string |
Required |
Body Parameters
Name | Description | Type | Additional information |
---|---|---|---|
ConsentTypes |
A collection of Consent Types that can be associated with a Profile. |
Collection of CreateConsentTypeEntry |
Request Formats
application/json, text/json, application/json-patch+json
Sample:
{ "ConsentTypes": [ { "Versions": [ { "ConsentVersion": "sample string 1", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 2, "IsActive": true, "IsAssociatedWithProfiles": true }, { "ConsentVersion": "sample string 1", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 2, "IsActive": true, "IsAssociatedWithProfiles": true } ], "TypeName": "sample string 1", "IsActive": true }, { "Versions": [ { "ConsentVersion": "sample string 1", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 2, "IsActive": true, "IsAssociatedWithProfiles": true }, { "ConsentVersion": "sample string 1", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 2, "IsActive": true, "IsAssociatedWithProfiles": true } ], "TypeName": "sample string 1", "IsActive": true } ] }
application/xml, text/xml
Sample:
<CreateConsentTypeEntryList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ProfileServices.REST.Models"> <ConsentTypes> <CreateConsentTypeEntry> <IsActive>true</IsActive> <TypeName>sample string 1</TypeName> <Versions> <CreateConsentVersion> <ConsentVersion>sample string 1</ConsentVersion> <ExpirationInDays>2</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> </CreateConsentVersion> <CreateConsentVersion> <ConsentVersion>sample string 1</ConsentVersion> <ExpirationInDays>2</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> </CreateConsentVersion> </Versions> </CreateConsentTypeEntry> <CreateConsentTypeEntry> <IsActive>true</IsActive> <TypeName>sample string 1</TypeName> <Versions> <CreateConsentVersion> <ConsentVersion>sample string 1</ConsentVersion> <ExpirationInDays>2</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> </CreateConsentVersion> <CreateConsentVersion> <ConsentVersion>sample string 1</ConsentVersion> <ExpirationInDays>2</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> </CreateConsentVersion> </Versions> </CreateConsentTypeEntry> </ConsentTypes> </CreateConsentTypeEntryList>
Response Information
Response Codes
HTTP Status Code | Text | Description |
---|---|---|
201 | Created | The request was successful and resulted in the creation of a new resource. The newly created resource can be referenced by its specific URI returned in the Location header field. |
400 | Bad Request | The request was invalid and cannot be processed. This may be a result of a malformed request. You must update the request before trying again. |
401 | Unauthorized | Authentication credentials are missing or incorrect. You must verify your ClientId, UserId, and Authorization Scheme before trying again. |
403 | Forbidden | The authentication credentials were insufficient to grant access to the requested resource. In most cases, your user may not have the appropriate permissions to access the requested resource. Verify User Group permissions for your user before trying again. |
409 | Conflict | The request could not be completed due to a conflict with the current state of the target resource. In most cases, an instance with the same already exists on the target resource. You must update the request before trying again. |
500 | Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. Notify PossibleNOW Support if it’s a continuous occurrence. |
Resource Description
ConsentTypeEntryListName | Description | Type | Additional information |
---|---|---|---|
ConsentTypes |
A collection of Consent Types that can be associated with a Profile. |
Collection of ConsentTypeEntry |
Response Formats
application/json, text/json, application/json-patch+json
Sample:
{ "ConsentTypes": [ { "TypeId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "Versions": [ { "ConsentVersionId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "ConsentVersion": "sample string 2", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 3, "IsActive": true, "IsAssociatedWithProfiles": true }, { "ConsentVersionId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "ConsentVersion": "sample string 2", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 3, "IsActive": true, "IsAssociatedWithProfiles": true } ], "TypeName": "sample string 2", "IsActive": true }, { "TypeId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "Versions": [ { "ConsentVersionId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "ConsentVersion": "sample string 2", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 3, "IsActive": true, "IsAssociatedWithProfiles": true }, { "ConsentVersionId": 1, "Edited": { "CreateDate": "sample string 1", "CreatedBy": "sample string 2", "ModifiedDate": "sample string 3", "ModifiedBy": "sample string 4" }, "ConsentVersion": "sample string 2", "LocalizedFields": [ { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" }, { "ConsentLanguage": "sample string 1", "Locale": "sample string 2", "Name": "sample string 3", "Description": "sample string 4" } ], "ExpirationInDays": 3, "IsActive": true, "IsAssociatedWithProfiles": true } ], "TypeName": "sample string 2", "IsActive": true } ] }
application/xml, text/xml
Sample:
<ConsentTypeEntryList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ProfileServices.REST.Models"> <ConsentTypes> <ConsentTypeEntry> <IsActive>true</IsActive> <TypeName>sample string 2</TypeName> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> <TypeId>1</TypeId> <Versions> <ConsentVersion> <ConsentVersion>sample string 2</ConsentVersion> <ExpirationInDays>3</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> <ConsentVersionId>1</ConsentVersionId> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> </ConsentVersion> <ConsentVersion> <ConsentVersion>sample string 2</ConsentVersion> <ExpirationInDays>3</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> <ConsentVersionId>1</ConsentVersionId> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> </ConsentVersion> </Versions> </ConsentTypeEntry> <ConsentTypeEntry> <IsActive>true</IsActive> <TypeName>sample string 2</TypeName> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> <TypeId>1</TypeId> <Versions> <ConsentVersion> <ConsentVersion>sample string 2</ConsentVersion> <ExpirationInDays>3</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> <ConsentVersionId>1</ConsentVersionId> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> </ConsentVersion> <ConsentVersion> <ConsentVersion>sample string 2</ConsentVersion> <ExpirationInDays>3</ExpirationInDays> <IsActive>true</IsActive> <IsAssociatedWithProfiles>true</IsAssociatedWithProfiles> <LocalizedFields> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> <LocalizedConsentField> <Description>sample string 4</Description> <Locale>sample string 2</Locale> <Name>sample string 3</Name> <ConsentLanguage>sample string 1</ConsentLanguage> </LocalizedConsentField> </LocalizedFields> <ConsentVersionId>1</ConsentVersionId> <Edited> <CreateDate>sample string 1</CreateDate> <CreatedBy>sample string 2</CreatedBy> <ModifiedBy>sample string 4</ModifiedBy> <ModifiedDate>sample string 3</ModifiedDate> </Edited> </ConsentVersion> </Versions> </ConsentTypeEntry> </ConsentTypes> </ConsentTypeEntryList>