Skip to content
Documentation
pozyskajpacjentaDocs

API referenceContent

List published pages

GET/api/v1/pages

Since
1.0.0
Auth
Bearer key
operationId
listPages

Every published path of the site: pages built from blocks and the entity pages (treatments, team, case studies, posts). type is the kind GET /content returns, so you know what to expect before fetching a page. When a block page and an entity page share a path, the block page wins, as on the clinic's site. Things moved to the trash in the clinic's panel are not listed; their address answers 404, and after a restore they come back under the same address. Responses are private to the key: Cache-Control: private, max-age=60, so cache them on your side for up to a minute.

Request

Send the clinic's key in Authorization: Bearer (see API keys).

Query parameters

  • kindstringsince 1.10.0

    Which pages to list. Without it (or page): the site's pages and entity pages. landing or thanks: only ad landing pages or only their thank-you pages. all: everything.

    One of pagelandingthanksall

curl "https://app.pozyskajpacjenta.pl/api/v1/pages?kind=landing" \
  -H "Authorization: Bearer $PP_API_KEY"
import { PozyskajPacjentaClient } from "@pozyskajpacjenta/sdk";

const client = new PozyskajPacjentaClient({
  apiKey: process.env.PP_API_KEY ?? "",
  baseUrl: "https://app.pozyskajpacjenta.pl",
});

const { pages } = await client.listPages();
<?php
$response = wp_remote_get(
    'https://app.pozyskajpacjenta.pl/api/v1/pages?kind=landing',
    array(
        'headers' => array( 'Authorization' => 'Bearer ' . getenv( 'PP_API_KEY' ) ),
        'timeout' => 10,
    )
);
if ( is_wp_error( $response ) ) {
    error_log( $response->get_error_message() );
    return;
}
$status = wp_remote_retrieve_response_code( $response );
$data   = json_decode( wp_remote_retrieve_body( $response ), true );

Response

200Every published path.

  • pagesPageListItem[]required

    The paths.

    Fields of each item (7)
    • pathstringrequired

      Path on the clinic's site; pass it to GET /content.

    • titlestringrequired

      Page title.

    • typestringrequired

      The kind GET /content returns for this path.

      One of pageservicesserviceteamdoctorcase-studiescase-studypostspost

    • updatedAtstring (date-time)required

      Last change, ISO 8601.

    • kindstringsince 1.10.0

      page for a page of the site (block pages and entity pages); landing for an ad landing page and thanks for its thank-you page. Both are kept out of search engines, the sitemap and the menu, and are listed only when you ask with ?kind=.

      One of pagelandingthanks

    • seoTitlestringnullsince 1.28.0

      The title for search engines as the clinic set it; null when it has none, then use title. Only on items of type page.

    • seoDescriptionstringnullsince 1.28.0

      The description for search engines as the clinic set it; null when it has none. Only on items of type page.

Every published path (trimmed)

{
  "pages": [
    {
      "path": "/",
      "title": "Klinika Wzorcowa, stomatologia w Warszawie",
      "updatedAt": "2026-09-30T14:21:55.000Z",
      "type": "page"
    },
    {
      "path": "/rezerwacja",
      "title": "Rezerwacja wizyty",
      "updatedAt": "2026-09-30T14:21:55.000Z",
      "type": "page"
    },
    {
      "path": "/zabiegi",
      "title": "Zabiegi i usługi",
      "type": "services",
      "updatedAt": "2026-09-30T14:21:55.000Z"
    },
    {
      "path": "/zabiegi/konsultacja-stomatologiczna",
      "title": "Konsultacja stomatologiczna",
      "type": "service",
      "updatedAt": "2026-09-30T14:21:55.000Z"
    },
    {
      "path": "/zespol",
      "title": "Nasi lekarze",
      "type": "team",
      "updatedAt": "2026-09-30T14:21:55.000Z"
    }
  ]
}

Errors

StatusWhen
401No Authorization header
401Unknown or rotated key
429Over 120 requests in this minute

Branch on the status and code, never on the Polish error text. All statuses in Errors.

401 · No Authorization header
{
  "error": "missing Authorization: Bearer <klucz z panelu Ustawienia>"
}
401 · Unknown or rotated key
{
  "error": "invalid key"
}
429 · Over 120 requests in this minute
{
  "error": "przekroczono limit 120 zapytań/min"
}

Rate limit

  • 120 requests per minute per key, shared by every endpoint.
  • Every response to a valid key carries RateLimit-Remaining and RateLimit-Reset; see Rate limits.

SDK method

client.listPages(options?: { kind? }): Promise<{ pages: PageListItem[] }>

The TypeScript tab above uses it. Install and errors: TypeScript SDK.