Entity
An Entity Object contains the state of an entity. The following properties are present:
Name |
Type |
Description |
---|---|---|
|
Number |
The ID of the entity. |
|
String |
The unique identifier of the entity. |
|
A link to the resource of this entity. | |
|
A link to the Entity Definition Resource that defines this entity. | |
|
Object |
A dictionary object containing the properties and values. The contents are highly dependent on the entity definition associated with this entity. |
|
Object |
A dictionary object containing for each relation a property named after the relation and as value either an Entity Relation object or a Link object depending on whether the specific relation is configured as 'nested or not. |
|
Object |
An object containing details about the page (URL, page ID, page name) where the comment is made. This is optional for linking the comment to a product, but required for email notifications and redirecting to the comment's page. |
The values of the properties in the properties dictionary are formatted according to the type of property that is defined in the entity definition associated with this entity. The following table describes the different property types and supported value formats:
Type |
Supported value formats |
---|---|
Integer |
Number containing a valid 32-bit integer, String containing a valid 32-bit integer, Boolean (converting true and false to 1 and 0, respectively) |
Decimal |
Number, String containing a valid decimal, Boolean (converting true and false to 1 and 0, respectively) |
String |
Number (converting to string), String, Boolean (converting to string) |
DateTime |
String containing an ISO 8601 formatted date and time |
Boolean |
Number containing either 1 or 0, String containing either "true" or "false", Boolean |
Multilanguage properties (marked with is_multilanguage
in the entity definition) store values as an object. Each culture is represented by a property named after its RFC 4647 language code, similar to the Labels object.
In addition, properties that can have multiple values (their property definition in the entity definition indicates this through the is_multivalue property
) contain an array of values of the respective type.
Multilanguage, multivalue properties contain their values in arrays inside the aforementioned culture object.