PATCH {clientId}/ConsentType/{typeId}
This method allows you to update a single ConsentType specified by the TypeId.
Request Information
The HTTP PATCH request method applies partial modifications to a resource. Click here to learn about using PATCH.
The MyPreferences API supports add, replace, remove, and test PATCH operations. The API does not support move and copy PATCH operations.
In the JSON body of your request, send the op, path, and value parameters.
- op denotes the type of operation to execute such as add, replace, remove or test
- path denotes the path of the target location on the resource to update
- value denotes the value to apply.
Note: When removing multiple elements from an array object, send the remove operations in descending order to keep the indices intact.
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
clientId |
This is your organization’s MyPreferences Account Id. |
string |
Required |
typeId |
Id of the ConsentType to update |
integer |
Required |
Body Parameters
Name | Description | Type | Additional information |
---|---|---|---|
Operations |
A collection of PATCH operations that you want to perform on the object. |
Collection of OperationOfConsentTypeEntry |
Request Formats
application/json, text/json, application/json-patch+json
[ { "path": "sample string 2", "op": "sample string 3" }, { "path": "sample string 2", "op": "sample string 3" } ]
application/xml, text/xml
<JsonPatchDocumentOfConsentTypeEntry5B0F46o8 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNetCore.JsonPatch"> <ContractResolver i:nil="true" /> </JsonPatchDocumentOfConsentTypeEntry5B0F46o8>
Response Information
Response Codes
HTTP Status Code | Text | Description |
---|---|---|
200 | OK | The request was successfully processed. |
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. |
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
ConsentTypeEntryName | Description | Type | Additional information |
---|---|---|---|
TypeId |
A read-only field that uniquely identifies the Type |
integer |
Read-Only |
Edited |
Read-only system fields returned as part of an API response. These are updated automatically when a profile is created or modified. |
EditInfo |
Read-Only |
Versions |
List of consent versions |
Collection of ConsentVersion | |
TypeName |
Name of the type |
string |
Required Max length: 100 Min length: 1 |
IsActive |
Defines whether the item is Active or Inactive |
boolean |
Response Formats
application/json, text/json, application/json-patch+json
{ "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
<ConsentTypeEntry xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ProfileServices.REST.Models"> <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>