CustomProperties
Entity - Custom property
Verb | Request | Notes | Permissions required |
---|---|---|---|
GET - for property type by id | /Consumer/CustomProperties/TypeId/{typeId} | Gets list of all available custom properties for a type by its id | Following product pack related permissions
Following custom property related permission
Returns Unauthorized (401) if user does not have the required permissions. |
GET - for property type by name | /Consumer/CustomProperties/TypeName/{typeName} | Gets list of all available custom properties for a type by its name | Following product pack related permissions
Following custom property related permission
Returns Unauthorized (401) if user does not have the required permissions. |
GET - individual property by its id | /Consumer/CustomProperties/Id/{Id} | Gets an individual custom property by id | Following product pack related permissions
Following custom property related permission
Returns Unauthorized (401) if user does not have the required permissions. |
POST | /Consumer/CustomProperties/Search | Minimum API version 4.0 Returns custom properties that fulfil parameters passed in the request body:
Allowed filter columns:
Allowed sort columns:
| Following custom property related permission
|
POST | /Consumer/CustomProperties | Creates a custom property. Payload should include custom property type id or name. Using both causes ambiguity in the Consumer API which will not try to set any priority over which one to use and return a Bad Request (400) HTTP status. Example Request - custom property type id { "Name":"Business Unit", "TypeId":1 } Example Request - custom property type name { "Name":"Business Unit", "TypeName":"ScopableTag" } From API version 4.0 onwards, you can add a collection of values that should be added for the property being created: Example Request - custom property type name { "Name":"Business Unit", "TypeName":"ScopableTag", "Values":[{ "Value":"First" }, { "Value":"Second" }] } |
Returns Unauthorized (401) if user does not have the required permissions. |
PUT | /Consumer/CustomProperties | Updates a custom property. Only name can be updated. Update Payload { "Id":7, "Name": "Building" } From API version 4.0 you can provide values that should replace any values the custom property had before the update. This is done via "Values" property in the payload as seen below: Example Request - custom property type name { "Id":"1", "Name":"Business Unit", "TypeName":"ScopableTag", "Values":[{ "Value":"First" }, { "Value":"Second" }] }
|
Returns Unauthorized (401) if user does not have the required permissions. |
DELETE | /Consumer/CustomProperties/{id} | Deletes a custom property by id |
Returns Unauthorized (401) if user does not have the required permissions. |
DELETE | /Consumer/CustomProperties | Minimum API version 4.0 Deletes multiple custom properties. Body of the request should contain an array of custom property Ids for properties that should be deleted. |
Returns Unauthorized (401) if user does not have the required permissions. |