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. 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).

No parameters and no body.

curl "https://app.pozyskajpacjenta.pl/api/v1/pages" \
  -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',
    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 (4)
    • 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.

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(): Promise<{ pages: PageListItem[] }>

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