Skip to content

Get Custom Entity Layout

Request

Unlike the Category model — which has a single layout shared by all categories — each Custom Entity type has its own layout, selected by the route's customEntityDenominator.

The layout describes how the Custom Entity edit form is rendered. It is a JSON document with a sections array; each section has a title and a rows array; each row has a fields array and, optionally, a divider (dividerType and dividerTitle). Each field carries an attributeId and a grid size — one of quarter, half, threeQuarters or row. When a row has a divider its dividerType is one of normal, wide or lineBreak. dividerType and dividerTitle are omitted from a row when they have no value, so a row without a divider contains only its fields.

A layout must be configured for the requested Custom Entity; if none exists the request returns 404 Not Found.

Path
customEntityDenominatorstringrequired

Denominator of the Custom Entity type whose layout is requested.

Headers
X-API-KEYstring

Tenant's API key (required)

curl -i -X GET \
  'https://api2.saleslayer.com/catalog/CustomEntities('\''{customEntityDenominator}'\'')/layout' \
  -H 'X-API-KEY: string'

Responses

OK

Bodyapplication/json
@etagstring or null
@contextstring or null
valueany or null
Response
{ "value": { "sections": [ … ] } }