Skip to main content

updateSitemap

Update the sitemap of the project. 🔐 This method requires authorization.

Description

This method updates the sitemap of the project, regenerating it based on the current page structure. It returns a Promise that resolves to an array of updated ISitemapEntity objects.

Sitemap.updateSitemap(

body*

);

Parameters schema

Schema

body(required): ISitemapEntity[]
Array of sitemap entries to update
example:

[
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
}
]

body[].url(required): string
The full URL of the page.
example: "https://your-project.oneentry-cloud.com/catalog"

body[].lastmod: string
Date when the page was last modified (ISO 8601 format).
example: "2025-06-01T00:00:00.000Z"

body[].changefreq: string
How frequently the page is likely to change.
example: "weekly"

body[].priority: number
The priority of this URL relative to other URLs. Valid values range from 0.0 to 1.0.
example: 0.8

langCode: string
Language code. Default: "en_US"
example: "en_US"

Examples

Minimal example


const body = [
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
}
];

const response = await Sitemap.updateSitemap(body);

Example response

[
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
},
{
"url": "https://your-project.oneentry-cloud.com/catalog",
"lastmod": "2025-05-15T00:00:00.000Z",
"changefreq": "weekly",
"priority": 0.8
}
]

Response schema

Schema: ISitemapEntity[]

url: string
The full URL of the page.
example: "https://your-project.oneentry-cloud.com/catalog"

lastmod: string
Date when the page was last modified (ISO 8601 format).
example: "2025-06-01T00:00:00.000Z"

changefreq: string
How frequently the page is likely to change. Possible values: "always", "hourly", "daily", "weekly", "monthly", "yearly", "never".
example: "weekly"

priority: number
The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0.
example: 0.8