API reference: Content properties documents the function signatures, parameters, return values, and error behavior of the Elaine HTTP API.
Note
Function availability depends on the Elaine release and enabled features. Authenticate HTTP requests with an Elaine-issued Bearer JWT.
Function overview
| boolean|integer | api_deleteContentProperties ( string $object_type , int $object_id , string $type ) |
| Deletes the content attributes of the type $type from the content object $object_id of the object type $object_type. | |
| boolean|integer | api_deleteContentProperty ( string $object_type , int $object_id , string $name ) |
| Deletes the content attribute with the name $name from the content object of the type $object_type with the ID $object_id. | |
| array|integer | api_getContentProperties ( string $object_type , int $object_id , string $attribute_type = 'all' ) |
| Delivers content attributes of the transferred content object with the $object_id of the type $object_type. | |
| boolean | api_setContentProperties ( string $object_type , int $object_id , array $array_properties ) |
| Sets individual attributes of a content object with the type $object_type and the content ID $object_id. |
Functions
api_deleteContentProperties
boolean|integer api_deleteContentProperties ( string $object_type , int $object_id , string $type )
Deletes the content attributes of the type $type from the content object $object_id of the object type $object_type. For valid attribute types, see in the description of api_setContentProperties().
Parameters
| string | $object_type | ContentPropertyManager::PROPERTY_OBJECTTYPES |
| int | $object_id | id of object |
| string | $type | 'all' OR ContentPropertyManager::PROPERTY_ATTRIBUTETYPES OR ContentPropertyManager::PROPERTY_DATATYPES |
Return Value
| boolean|integer | Success or error code |
api_deleteContentProperty
boolean|integer api_deleteContentProperty ( string $object_type , int $object_id , string $name )
Deletes the content attribute with the name $name from the content object of the type $object_type with the ID $object_id.
Parameters
| string | $object_type | ContentPropertyManager::PROPERTY_OBJECTTYPES |
| int | $object_id | ID of object |
| string | $name | Name of object to delete |
Return Value
| boolean|integer | Success or error code |
api_getContentProperties
array|integer api_getContentProperties ( string $object_type , int $object_id , string $attribute_type = 'all' )
Delivers content attributes of the transferred content object with the $object_id of the type $object_type. With $attribute_type only certain content attributes can be returned. Possible attribute types can be found in the description of api_setContentProperties().
Parameters
| string | $object_type | ContentPropertyManager::PROPERTY_OBJECTTYPES |
| int | $object_id | ID of object |
| string | $attribute_type = 'all' | 'all' OR ContentPropertyManager::PROPERTY_ATTRIBUTETYPES |
Return Value
| array|integer | Properties of the object |
api_setContentProperties
boolean api_setContentProperties ( string $object_type , int $object_id , array $array_properties )
Sets individual attributes of a content object with the type $object_type and the content ID $object_id. The following content objects are supported: articles ($object_type='part'), messages ($object_type='mailing'), recipient groups ($object_type='group') and segments ($object_type='segment').
Example for $array_properties: [ 'name' => 'myAttribute', 'value' => 'This is my value', 'type' => 'text' ]
Possible types of data fields are: 'text', 'checkbox', 'int', 'date', 'category', 'condition'
Parameters
| string | $object_type | ContentPropertyManager::PROPERTY_OBJECTTYPES |
| int | $object_id | ID of object |
| array | $array_properties | Data array with properties like this ( 'name' => [name], 'value' => [value], 'type' => [type] ) |
Return Value
| boolean | Success |