Skip to content

API – Company pages

Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() helper is in API.

Writing a page needs the write permission. Reading needs a signed-in token.

GET /api/pages

Parameter Type Required Description
limit integer no default 20
offset integer no default 0
status string no active or inactive
$res = innovanet('GET', '/api/pages?status=active');

Response 200

{
  "success": true,
  "data": [
    {
      "id": 2,
      "title": { "sk": "O firme", "cs": "O firmě", "en": "About us" },
      "slug": "o-firme",
      "status": 1,
      "sectionsCount": 3,
      "commentsCount": 0
    }
  ],
  "pagination": { "total": 1, "limit": 20, "offset": 0 }
}

status 1 is published, 0 is hidden. By slug: GET /api/pages/slug/o-firme. Detail: GET /api/pages/2.

POST /api/pages

Field Type Required Description
title object yes at least one of sk, cs, en
content object no
slug string no when missing, it is built from the title
status integer no 0 or 1, default 1

Request

{
  "title": { "sk": "O firme", "cs": "O firmě", "en": "About us" },
  "status": 1
}

PHP

$res = innovanet('POST', '/api/pages', [
    'title' => ['sk' => 'O firme', 'cs' => 'O firmě', 'en' => 'About us'],
    'status' => 1,
]);

Response 200

{ "success": true, "data": { "id": 2, "slug": "o-firme" } }

A title in no language returns 422. Update: PUT /api/pages/2. Comment: POST /api/pages/2/comments with the field comment.

Other paths

Each path below belongs to this module. Field names are the ones the API reads. A downloaded file is not JSON.

GET /api/pages/sidebar

No body.

Response 200 – Envelope { "success": true, "data": ... }.

POST /api/pages/{id}/sections

Body

Field Type Required
type string no
title array no
content array no
sortOrder integer no
{
  "type": "text",
  "title": [],
  "content": [],
  "sortOrder": 1
}
$res = innovanet('POST', '/api/pages/1/sections', [
    'type' => 'text',
    'title' => [],
    'content' => [],
    'sortOrder' => 1,
]);

Response 200 – Envelope { "success": true, "data": ... }.

PUT /api/pages/{pageId}/sections/{sectionId}

Body

Field Type Required
type string no
title array no
content array no
sortOrder integer no
{
  "type": "text",
  "title": [],
  "content": [],
  "sortOrder": 1
}
$res = innovanet('PUT', '/api/pages/1/sections/1', [
    'type' => 'text',
    'title' => [],
    'content' => [],
    'sortOrder' => 1,
]);

Response 200 – Envelope { "success": true, "data": ... }.

DELETE /api/pages/{pageId}/sections/{sectionId}

No body.

Response 200 – Envelope { "success": true, "data": ... }.

PUT /api/pages/{id}/sections/reorder

Body

Field Type Required
sections array yes
{
  "sections": []
}
$res = innovanet('PUT', '/api/pages/1/sections/reorder', [
    'sections' => [],
]);

Response 200 – Envelope { "success": true, "data": ... }.

DELETE /api/pages/{pageId}/comments/{commentId}

No body.

Response 200 – Envelope { "success": true, "data": ... }.


Want to try this feature? Start your innovanet trial →