Backend API
Update an existing page using the ID that was returned when created.
Arguments
Unique identifier for the page.
Slug identifier of the page. Defaults to a slug-formatted version of the title.
Title of the page.
HTML or text content of the page.
Indicates whether the page is published and should be displayed in the storefront.
Date the page was published. May be used to indicate the publish date in the storefront, or to delay publishing until a future date.
Title used for SEO purposes, if different than the page title.
Description used for SEO purposes. Typically the storefront will use a number of characters from the page's content if this is not defined.
Keywords used for SEO purposes.
Template used to render this page in a storefront theme, if applicable.
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.put('/content/pages/{id}', {
id: '60f199509111e70000000022',
title: 'Updated page'
});
Response
{
"id": "60f199509111e70000000022",
"title": "Updated page",
"slug": "example-page",
"content": "<p>Welcome to our store.</p>",
"published": true,
"date_published": "2021-07-16T14:36:00.142Z",
"meta_title": "Example page",
"meta_description": null,
"date_created": "2021-07-16T14:36:00.142Z",
"date_updated": "2021-07-18T09:12:04.481Z"
}