CMS Tool API

CMS Tool API schema

Public API version 1.4.51.

Directory Classification

Manage the classifications for the directory, for which listings can be attached and categorised

Endpoint URL

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

/api/directoryClassification

Read and update the classifications that directory listings are filed under.

GET

List classifications, or retrieve one by appending its ID to the path. Needs the directoryClassification:read scope.

Query parameters

NameTypeExampleNotes
idint123Filter results by id.
pageint123Filter results by page.
parentidint123Filter results by parentid.
keywordstextexampleFilter results by keywords.
classnametextexampleFilter results by classification name.
classfilenametextcafes-and-restaurantsFilter results to the classification with this SEO filename.
listokbooleantrueFilter results by whether listings may be filed under the classification. 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

Create or update a classification from a JSON object. Needs the directoryClassification:write scope and the configuration permission.

Request content type: application/json

Request body fields

NameTypeExampleNotes
idint123Set the id value.
pageint123Set the page value.
classnametextexampleName of the classification.
classsummarytextexampleShort description of the classification.
classfilenametextcafes-and-restaurantsSEO filename of the classification, used in its web address. Made from the name when not given.
parentidint123Set the parentid value.
listokbooleantrueTrue when listings may be filed under the classification. It can be off for the upper levels of a tree, so that only the lower branches hold listings. Accepts true or 1.
dirclassorderint123Sort position of the classification. 0 hides it and 999 is the default.

Data definitions

FieldTypeDescriptionFormatExample
classmapzoomintZoom level of the classification's map, from 0 to 30.
classmapcenterlatitudedecimalLatitude of the centre of the classification's map.
classsummarytextShort description of the classification.
classintrotextIntroduction text shown above the classification's listings.
classfilenametextSEO filename of the classification, used in its web address.
classmapcenterlongitudedecimalLongitude of the centre of the classification's map.
parentidintID of the parent classification. 0 for a top level classification.
classimgtextImage for the classification.
listokboolTrue when listings may be filed under this classification. In a tree of classifications it can be off for the upper levels, so that only the lower branches hold listings. Filing a listing under a classification where it is off is allowed, but the response says so.
classnametextName of the classification.
dirclassorderintSort position of the classification. 0 hides it from the directory and 999 is the default.
cntlistingsintNumber of listings with a status of 0 or more that are filed under the classification. Kept up to date by the system.
pageintDirectory page that the classification belongs to.123456
classfootertextFooter text shown below the classification's listings.
classmapcenteraddresstextAddress the map of the classification is centred on.

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.