Appearance
POST
/web-pages/draft/drafts/{draftId}/products/{productId}Required scope:
viskan:draft:createConnects a product to a layout.
Parameters
Path parameters
draftId string Format:
uuidIdentifier of the draft. A draft is a workspace that holds unpublished changes to web store content.
productId string Format:
uuidIdentifier of the product to connect to a layout.
Request body
JSON
{
"layoutId": "a1f4e3b2-7c89-4d56-b123-9e8f7a6b5c4d",
"variables": [
{
"layoutSectionId": "be0111c5-a24b-47bd-86f7-77c12d632bdc",
"contentLocaleId": "136ec43d-6983-4f1c-a6a1-c39147656b23",
"variableId": "e7f65f98-e2a6-4ffd-a985-6e6a4180f5e0",
"variableValue": "Welcome to start page!"
}
]
}
Response
The product was successfully connected to the layout.
| Error code | Description |
|---|---|
web-pages.connect-product.content-locale-id-required | Content locale ID is required. |
web-pages.connect-product.draft-not-found | Draft not found. |
web-pages.connect-product.layout-id-required | Layout ID is required. |
web-pages.connect-product.layout-not-found | Could not find the layout by ID. |
web-pages.connect-product.layout-section-id-required | Layout section ID is required. |
web-pages.connect-product.locale-not-found | Could not find the content locale in this web-store. |
web-pages.connect-product.product-already-connected | Product is already connected to a layout. |
web-pages.connect-product.section-is-not-part-of-the-layout | The layout section was not found in the specified layout. |
web-pages.connect-product.variable-id-required | Variable ID is required. |
web-pages.connect-product.variable-is-not-part-of-the-section-variables | The variable was not found in the requested layout section. |
web-pages.connect-product.variable-value-required | Variable value is required. |