CMS Tool API

CMS Tool API schema

Public API version 1.4.60.

SEO

The search engine side of the website for a user with the SEO permission: the titles, descriptions, keywords, meta tags and SEO filenames (web addresses) of products, categories, pages, blogs and directory listings and classifications, and the URL redirects. Nothing else of those records can be read or changed here: no prices, stock, variants or settings.

Endpoint URL

https://api.cms-tool.net/api/seo

/api/seo

List the SEO record types with the fields that can be read and changed. Needs the seo:read scope.

GET

List the SEO record types with the fields that can be read and changed. Needs the seo:read scope.

/api/seo/products

Read and update the SEO fields of products: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List products with their read-only fields (p_code, page), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Variants and blocked products are never included. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed p_filename changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
p_titletextexampleSet the p title value.
p_subtitletextexampleSet the p subtitle value.
p_detailstextexampleSet the p details value.
p_metatitletextexampleSet the p metatitle value.
p_metadesctextexampleSet the p metadesc value.
p_metakeywordstextexampleSet the p metakeywords value.
p_meta_tagstextexampleSet the p meta tags value.
p_ld_jsontextexampleSet the p ld json value.
p_filenametextblue-widgetSet the p filename value.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/categories

Read and update the SEO fields of categories: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List categories with their read-only fields (group_code, page, group_parent), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed group_filename changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
group_nametextexampleSet the group name value.
group_subtitletextexampleSet the group subtitle value.
group_desctextexampleSet the group desc value.
group_metatitletextexampleSet the group metatitle value.
group_metadesctextexampleSet the group metadesc value.
group_keywordstextexampleSet the group keywords value.
group_filenametextblue-widgetSet the group filename value.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/pages

Read and update the SEO fields of pages: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List pages with their read-only fields (wgt_id, page_parent), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed page_alias changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
page_usertitletextexampleSet the page usertitle value.
page_menunametextexampleSet the page menuname value.
page_metatitletextexampleSet the page metatitle value.
page_summarytextexampleSet the page summary value.
page_submenu_desctextexampleSet the page submenu desc value.
page_keywordstextexampleSet the page keywords value.
page_meta_tagstextexampleSet the page meta tags value.
page_aliastextblue-widgetSet the page alias value.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/blogs

Read and update the SEO fields of blogs: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List blogs with their read-only fields (page), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Only blog items with a title are included. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed info_filename changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
info_titletextexampleSet the info title value.
info_summarytextexampleSet the info summary value.
info_fulltexttextexampleSet the info fulltext value.
info_metatitletextexampleSet the info metatitle value.
info_metadesctextexampleSet the info metadesc value.
info_metakeywordstextexampleSet the info metakeywords value.
info_filenametextblue-widgetSet the info filename value.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/directoryListings

Read and update the SEO fields of directoryListings: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List directoryListings with their read-only fields (page, status), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed alphaid changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
nametextexampleSet the name value.
brieftextexampleShort advert for the listing, shown in lists and search results.
keywordstextexampleSet the keywords value.
metatitletextexampleSet the metatitle value.
alphaidtextbay-cafeUnique SEO filename of the listing, used in its web address. Spaces become dashes.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/directoryClassifications

Read and update the SEO fields of directoryClassifications: titles, descriptions, keywords, meta tags and the SEO filename (the web address).

GET

List directoryClassifications with their read-only fields (page, parentid), SEO fields and web address (path and url), or retrieve one by appending its ID to the path. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
keywordstextexampleFilter results by keywords.
filenametextblue-widgetFilter results by filename.
missingMetaTitlebooleantrueFilter results to records with no meta title. Accepts true or 1.
missingMetaDescriptionbooleantrueFilter results to records with no meta description. Accepts true or 1.
missingFilenamebooleantrueFilter results to records with no SEO filename, whose address is their ID. Accepts true or 1.
unoptimisedbooleantrueFilter results to records that are not optimised at all: nothing in the SEO filename, meta title, meta description or keywords. Accepts true or 1.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Change the SEO fields of an existing record (nothing is created or deleted, and no other field can be changed). A changed classfilename changes the web address: the old address redirects to the new one unless redirectOldUrl is false. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
classnametextexampleName of the classification.
classsummarytextexampleShort description of the classification.
classintrotextexampleSet the classintro value.
classfilenametextcafes-and-restaurantsSEO filename of the classification, used in its web address. Made from the name when not given.
redirectOldUrlbooleantrueWhen the SEO filename changes, redirect the old address to the new one. True unless false is given. Accepts true or 1.

/api/seo/redirects

Read and update the website's URL redirects, which are published into its .htaccess.

GET

List the URL and country redirects, or retrieve one by appending its ID to the path. Needs the seo:read scope.

Query parameters

NameTypeExampleNotes
redirect_typetextexampleFilter results by redirect type: URL or COUNTRY.
keywordstextexampleFilter results by keywords.
fromuritextexampleFilter results to the redirect from this address.
offsetint123Skip this many matching records before returning results.
pageSizeint123Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise.

POST

Add a redirect, or change the one with the same fromuri or id; delete true removes one; publishHtaccess true publishes the .htaccess now, as publishing the website does. Changes take effect on the live website when the .htaccess is published. Needs the seo:write scope and the seo permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
fromuritextexampleThe address to redirect, starting with / (or a two letter country code for a country redirect).
desturltextexampleWhere to send visitors: a full address, or a path on this website.
redirect_typetextexampleURL (the default) or COUNTRY.
deletebooleantrueSet the delete value. Accepts true or 1.
publishHtaccessbooleantruePublish the website's .htaccess now, with every redirect, as publishing the website does. Accepts true or 1.

Data definitions

FieldTypeDescriptionFormatExample
group_metadesctextCategory meta description.
page_aliastextPage SEO filename: its web address is /page/{alias}, or the alias itself when it starts with /.
classsummarytextDirectory classification summary, used as its description.
keywordstextDirectory listing keywords. As a filter: words in the title or meta title.
page_meta_tagstextExtra tags for the head of the page, such as Open Graph tags.
page_parentintParent page ID. Read only.
page_submenu_desctextShort description shown in sub menus.
page_menunametextPage name in the menu.
group_subtitletextCategory sub title.
pathtextThe record's web address on the website, from its SEO filename: /{type}/{filename}, the filename itself when it starts with /, or /{type}/{id} when it has none. Read only.
fromuritextRedirects: the address to redirect, starting with / (for a country redirect, a two letter country code).
metatitletextDirectory listing title for search engines.
p_meta_tagstextExtra tags for the head of the product page, such as Open Graph tags.
idintID of the record (or of the redirect).
group_filenametextCategory SEO filename: its web address is /category/{filename}.
info_metadesctextBlog post meta description.
alphaidtextDirectory listing SEO filename: its web address is /listing/{alphaid}.
redirect_typetextRedirects: URL (a 301 from an old address) or COUNTRY (visitors from a country).
p_titletextProduct title, the product page's main heading.
group_nametextCategory name, its page heading.
p_detailstextProduct details, the main description (HTML).
p_metadesctextProduct meta description for search engines.
p_subtitletextProduct sub title.
p_ld_jsontextThe product's own JSON-LD structured data (an object or array), used instead of the generated one.
page_summarytextPage meta description for search engines.
group_desctextCategory description (HTML).
nametextDirectory listing name.
pageintProducts, categories, blogs and directory records: the page they belong to. Read only. As a filter of pages, the parent page.
group_keywordstextCategory meta keywords.
page_usertitletextPage heading.
statusintDirectory listing status. Read only.
group_codetextCategory code. Read only.
info_titletextBlog post title.
classintrotextDirectory classification introduction (HTML).
page_metatitletextPage title for search engines.
classfilenametextDirectory classification SEO filename: its web address is /directory/{filename}.
p_filenametextProduct SEO filename: its web address is /product/{filename}. Changing it changes the address.
parentidintParent classification ID. Read only.
p_metatitletextProduct page title for search engines.
p_codetextProduct code. Read only.
info_filenametextBlog post SEO filename: its web address is /blog/{filename}.
desturltextRedirects: where visitors are sent, a full address.
brieftextDirectory listing advert, shown in lists and used as its description.
group_parentintParent category ID. Read only.
wgt_idintPage type. Read only.
page_keywordstextPage meta keywords.
urltextThe record's full web address. Read only.
group_metatitletextCategory page title for search engines.
info_metakeywordstextBlog post meta keywords.
info_summarytextBlog post summary.
classnametextDirectory classification name.
p_metakeywordstextProduct meta keywords.
info_fulltexttextBlog post text (HTML).
info_metatitletextBlog post title for search engines.

Usage instructions and examples

GET /api/seo lists the record types and their fields. GET /api/seo/{type} lists the records of a type (products, categories, pages, blogs, directoryListings, directoryClassifications) with their SEO fields and web address; filter with keywords, page, filename, missingMetaTitle, missingMetaDescription or missingFilename, and read one with /api/seo/{type}/{id}. POST /api/seo/{type}/{id} with only the fields to change: records are never created or deleted here, and a field that is not an SEO field is refused. Changing the SEO filename changes the web address, and the old address then redirects to the new one unless redirectOldUrl is false. GET and POST /api/seo/redirects read and change the URL redirects (fromuri starting with /, desturl a full address or a path on the website); delete true removes one. Redirects take effect when the .htaccess is published: POST /api/seo/redirects with publishHtaccess true, or publish the website. Needs the SEO permission.

Sample object

{"id": 1234, "p_code": "ABC-1", "page": 112137, "p_title": "Blue widget", "p_subtitle": null, "p_details": "<p>Our best selling widget.</p>", "p_metatitle": "Blue widgets | Example Store", "p_metadesc": "Strong, light blue widgets, shipped today.", "p_metakeywords": "blue widget", "p_meta_tags": null, "p_ld_json": null, "p_filename": "blue-widget", "path": "/product/blue-widget", "url": "https://www.example.com/product/blue-widget"}

Machine-readable documentation

This documentation is also available as JSON or Markdown at the same URL. Request JSON with Accept: application/json or Markdown with Accept: text/markdown.