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
| Name | Type | Example | Notes |
|---|---|---|---|
id | int | 123 | Filter results by id. |
page | int | 123 | Filter results by page. |
parentid | int | 123 | Filter results by parentid. |
keywords | text | example | Filter results by keywords. |
classname | text | example | Filter results by classification name. |
classfilename | text | cafes-and-restaurants | Filter results to the classification with this SEO filename. |
listok | boolean | true | Filter results by whether listings may be filed under the classification. Accepts true or 1. |
offset | int | 123 | Skip this many matching records before returning results. |
pageSize | int | 123 | Limit 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
| Name | Type | Example | Notes |
|---|---|---|---|
id | int | 123 | Set the id value. |
page | int | 123 | Set the page value. |
classname | text | example | Name of the classification. |
classsummary | text | example | Short description of the classification. |
classfilename | text | cafes-and-restaurants | SEO filename of the classification, used in its web address. Made from the name when not given. |
parentid | int | 123 | Set the parentid value. |
listok | boolean | true | True 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. |
dirclassorder | int | 123 | Sort position of the classification. 0 hides it and 999 is the default. |
Data definitions
| Field | Type | Description | Format | Example |
|---|---|---|---|---|
classmapzoom | int | Zoom level of the classification's map, from 0 to 30. | ||
classmapcenterlatitude | decimal | Latitude of the centre of the classification's map. | ||
classsummary | text | Short description of the classification. | ||
classintro | text | Introduction text shown above the classification's listings. | ||
classfilename | text | SEO filename of the classification, used in its web address. | ||
classmapcenterlongitude | decimal | Longitude of the centre of the classification's map. | ||
parentid | int | ID of the parent classification. 0 for a top level classification. | ||
classimg | text | Image for the classification. | ||
listok | bool | True 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. | ||
classname | text | Name of the classification. | ||
dirclassorder | int | Sort position of the classification. 0 hides it from the directory and 999 is the default. | ||
cntlistings | int | Number of listings with a status of 0 or more that are filed under the classification. Kept up to date by the system. | ||
page | int | Directory page that the classification belongs to. | 123456 | |
classfooter | text | Footer text shown below the classification's listings. | ||
classmapcenteraddress | text | Address 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.