Skip to content
P
API for partners
Connecting your application β€” access, authentication and endpoints
API for partners / Overview

API for partners#

The CoolCMS REST interface. It serves mobile apps, partner systems and custom clients.

Where to start#

  1. Getting started β€” your first request in five minutes.
  2. Authentication β€” how to get a token.
  3. Response format β€” πŸ”΄ read this before writing a parser.
  4. CRUD pattern β€” reading and writing.
  5. Error codes.

Address shape#

https://<your-site>/api/<module>/<resource>/<action>

Optionally with a language prefix: /en/api/…. The default language is Czech.

Modules and their resources are in the reference.

πŸ”΄ Three things that surprise everybody#

Read them now rather than finding them in a debugger.

1. Parameters go in the URL, not in the request body

Writes included. A POST with a JSON body reads as "missing data". The only exception is the authentication endpoints, which conversely read a form body. See the CRUD pattern.

2. Reads and writes return different shapes

A read returns items and _references without a success field. A write returns an envelope with success. A single parser keyed on success is not possible. See Response format.

3. Errors arrive with HTTP 200

Validation, "not found" and conflicts alike. Only 401, 403, 429 and 204 are distinguished by status code. See Error codes.

What the API offers#

Group Actions
Reading get, get-by, get-all
Writing save, update-columns
Deleting delete, delete-all
Trees move-up, move-down, move-subtree, delete-node
Events register-event

The specification#

The machine-readable specification is at /api-docs.json, the browser at /api-docs/.

The specification currently covers only the auth endpoints

Six paths out of several hundred. The rest is described by this manual. Do not rely on a generated client.