ComponentController
Overview
Description
Path /v2/components
Handles all request regarding component: creating, updating, deleting.
Component Object
An example for a component JSON object.
Responses are usually wrapped in a meta object, which contains additional information about the response and may contain a single component or a list of components.
JSON Fields
externalIndentifier
catalog
id
type
detailType
configuration
restrictionsForCore
active - deprecated - superseded by visibilityStatus
visibilityStatus : possible values
0 : SHOWN (visible everywhere)
1 : SHOWN_IN_CMS (visible only in cms context)
2 : ARCHIVED (hidden everywhere)
updated
created
prespectiveImage
labels
orderable
label
layer
priceScript
translations
neededComponents
elementType
language
links
version
CSV Fields
id: identifier of a component (deprecated)
component_id : identifier of the component
Translations can be multiple, we always return all the available translations in the form of multiple column pairs. If no translations are available, we insert in the CSV reference columns label_en and description_en.
label_{languageCode}: languageCode in ISO standard can be "en" or "de" for example and will be the current value of this language in the ComponentTranslation.
description_{languageCode}: languageCode in ISO standard can be "en" or "de" for example and will be the current value of this language in the ComponentTranslation.
active: boolean (1 or 0) which indicates if the component is active or inactive.
perspectiveImage: an url to the perspective image
type: for example "seating" or "table"
detailType: for example "sofa", "chair" or "table"
layer: can be an integer or null, if there is no value for this field
sort: can be an integer or null, if there is no value for this field
tag_ids: all tag ids separated by ' ' (whitespace)
API Reference
GET /:id
Generates: json
Returns a specific component.
Response:
Component objects are described in section Component JSON Object
POST /
Creates a new component.
Accepts: application/json Generates: application/json
Response: Component object as described in section Component JSON Object
PUT /:id
Updates an existing component.
Accepts: application/json Generates: application/json
Response: Component object as described in section Component JSON Object
PUT /:id (multipart)
updates assets on an item
Accepts: multipart-formdata
Generates: application/json
parameters:
file : datafile to be uploaded
type: type of the asset
possible types are images: "perspectiveImage"
Response: Component object as described in section Component JSON Object
GET /:id/tags
Generates: json
Returns all tags which have are assigned to this component.
Response:
Tag objects are described in section Tag JSON Object
Component restrictions
Path /v2/components/:id
Restrictions are used to restrict views from showing parameters, parameter-values or addons. A Restriction contains
embedId or tenantId : defines where this restriction applies. Either the given tenant in roomle, or the embedding ( configurator). if none is given the restriction is global.
fromOwner : defines if this restriction is managed by the owner of the catalog, if false, the owner of the target tenant/embed manages it.
active : if this restriction is currently active
restrictionTarget : "parameter", "valueIn:" or "addOn" what to apply this restriction on
restrictionType : EXCLUDE(1) or RESTRICT_TO(2) : exclude means this value should not be shown, restrict_to means only these values should be shown.
restrictionValue : the value of the restriction
GET /restrictions
Generates: json
returns the restrictions of this component manageable by the current tenant (fromOwner if tenant is owner, matching tenantId or embedds where this tenant is the owner)
POST /restrictions
Accepts: json
Generates: json
creates a new restriction with the given values
PUT /restrictions/:id
Accepts: json
Generates: json
updates the given restriction with the given values
DELETE /restrictions/:id
deletes the given restriction
GET /:id/perspectiveImage
returns a temporary redirect (307) to the URL of the perspectiveImage for this component
Last updated