Appearance
GET
/web-pages/draft/drafts/{draftId}Required scope:
viskan:draft:readRetrieves a draft by ID alongside any changes that were made in this draft compared to the current publishment. If a variable is changed, then it is reflected as a section change. If a variable value is changed, then it is reflected as a change of page.
Parameters
Path parameters
draftId string Format:
uuidIdentifier of the draft. A draft is a workspace that holds unpublished changes to web store content.
Response
The draft details and any changes compared to the current publishment.
JSON
{
"draftId": "3e6cce60-79ee-4a40-b6f4-c7ef640418b7",
"draftName": "Black Week",
"modifiedAt": "2025-02-13T10:10:00.000Z",
"createdAt": "2025-02-01T19:00:00.000Z",
"pages": [
{
"pageId": "5cf50fd6-5ab3-43bc-8291-e74665d1f8ab",
"contentLocaleId": "774ab227-18fe-4541-ba3b-06ad3e95ae75",
"title": "Start Page",
"languageCode": "en",
"countryCode": "US",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"layouts": [
{
"layoutId": "31166915-7c44-46a8-b035-988f860043e1",
"layoutName": "Standard sale page layout",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"sections": [
{
"sectionId": "5a331c07-b203-444e-88ed-d5ddeb2212ff",
"sectionName": "Start Page Hero",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"categories": [
{
"categoryId": "8c03d0fd-e15e-494b-b3f9-c3584e64de01",
"categoryName": "Start Page Category",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"storeSettings": [
{
"storeSettingId": "e7f65f98-e2a6-4ffd-a985-6e6a4180f5e0",
"storeSettingKey": "searchUrlPrefix",
"storeSettingValue": "search",
"countryCode": "SE",
"languageCode": "sv",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"locales": [
{
"contentLocaleId": "774ab227-18fe-4541-ba3b-06ad3e95ae75",
"languageCode": "en",
"countries": [
{
"countryCode": "SE",
"enabled": true
}
],
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"products": [
{
"productLayoutId": "3e6cce60-79ee-4a40-b6f4-c7ef640418b7",
"productId": "3e6cce60-79ee-4a40-b6f4-c7ef640418b7",
"layoutId": "a1f4e3b2-7c89-4d56-b123-9e8f7a6b5c4d",
"draftedAt": "2025-02-01T19:00:00.000Z",
"publishedAt": "2025-01-11T19:00:00.000Z",
"status": "MODIFIED"
}
],
"warnings": [
{
"id": "5da0525d-01da-427f-859f-947fa3c33aa2",
"type": "PAGE",
"code": "page-missing-variable-value",
"message": "'Startpage' is missing a value for the variable 'Hero - Title'"
}
]
}
| Error code | Description |
|---|---|
web-pages.category-tree.cyclic-dependency | Cyclic dependency detected in category tree. |
web-pages.retrieve-draft.draft-not-found | The specified draft could not be found. |
web-pages.retrieve-draft.layout-not-found | Layout not found. |
web-pages.retrieve-draft.section-not-found | Section not found. |
web-pages.retrieve-draft.start-page-category-not-found | Start page category for the web store was not found. |
web-pages.retrieve-draft.web-store-not-found | Web store specified on draft was not found. |