Skip to content
Documentation
pozyskajpacjentaDocs

API referenceContent

Get the site

GET/api/v1/site

Since
1.4.0
Auth
Bearer key
operationId
getSite

The same site object GET /content returns next to a page: name, domain, menu, theme and the clinic profile (contact, address, hours, NFZ, payments, logos). Use it for layouts, footers, JSON-LD and metadata without fetching a page. 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/site" \
  -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 { site } = await client.getSite();
<?php
$response = wp_remote_get(
    'https://app.pozyskajpacjenta.pl/api/v1/site',
    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

200The site.

  • siteSiterequired

    The clinic's site.

    Fields (6)
    • namestringrequired

      Name of the clinic as shown on the site.

    • primaryDomainstring | null

      The site's main domain; null before a domain is connected.

    • menuMenuItem[]required

      The main menu, in order.

      Fields of each item (2)
      • labelstringrequired

        Text of the menu item.

      • pathstringrequired

        Path on the clinic's site, e.g. /zabiegi.

    • themeThemeTokensrequired

      Theme tokens of the site.

    • profileSiteProfile | nullrequired

      The clinic profile; null until the clinic fills it in.

      Fields (18)
      • legalNamestring

        Registered name of the entity that runs the clinic.

      • phonestring

        Phone number for display, e.g. +48 22 100 20 30. For a tel: link keep the digits and the +.

      • emailstring (email)

        The clinic's contact e-mail.

      • addressSiteAddress

        The clinic's address.

        Fields (5)
        • streetstringrequired

          Street and number.

        • postalCodestringrequired

          Postal code, 00-000.

        • citystringrequired

          City.

        • districtstring

          District, e.g. Mokotów.

        • accessNotestring

          How to get in: entrance, floor, parking, lift.

      • geoobject

        Map point of the clinic.

        Fields (2)
        • latnumberrequired

          Latitude.

        • lngnumberrequired

          Longitude.

      • openingHoursOpeningHours

        Opening hours per weekday.

        Fields (7)
        • monOpeningInterval[]

          Monday's intervals.

          Fields of each item (2)
          • opensstringrequired

            Opening time, HH:MM.

          • closesstringrequired

            Closing time, HH:MM, later than opens.

        • tueOpeningInterval[]

          Tuesday's intervals.

          Fields as in OpeningInterval above.

        • wedOpeningInterval[]

          Wednesday's intervals.

          Fields as in OpeningInterval above.

        • thuOpeningInterval[]

          Thursday's intervals.

          Fields as in OpeningInterval above.

        • friOpeningInterval[]

          Friday's intervals.

          Fields as in OpeningInterval above.

        • satOpeningInterval[]

          Saturday's intervals.

          Fields as in OpeningInterval above.

        • sunOpeningInterval[]

          Sunday's intervals.

          Fields as in OpeningInterval above.

      • openingHoursNotestring

        Note shown next to the hours, e.g. until when the phone is answered.

      • nfzobject

        Contract with the National Health Fund (NFZ).

        Fields (2)
        • contractbooleanrequired

          true when the clinic has an NFZ contract.

        • notestring

          Note about the NFZ contract, e.g. which services it covers.

      • paymentsobject

        Accepted payment methods.

        Fields (2)
        • methodsstring[]required

          Payment methods as the clinic names them, e.g. gotówka, karta, BLIK.

        • notestring

          Note about payments, e.g. instalments.

      • socialsobject[]

        Links to the clinic's profiles elsewhere.

        Fields of each item (2)
        • networkstringrequired

          The network.

          One of facebookinstagramyoutubetiktoklinkedinxgoogleznanylekarzother

        • urlstringrequired

          Profile address (https://).

      • logoMediaRef | null

        Logo; null when the file was removed from the media library.

        Fields (8)
        • urlstringrequired

          Absolute address of the file.

        • focalXinteger | null

          Horizontal focal point in percent (0 to 100) to keep when cropping, e.g. as object-position.

        • focalYinteger | null

          Vertical focal point in percent (0 to 100).

        • altstring | null

          Alternative text; null when the clinic left it empty.

        • widthinteger

          Width of the original in px (library files, when known), for width/height attributes without layout shift.

        • heightinteger

          Height of the original in px.

        • aiGeneratedboolean

          The image was generated by AI: label it next to the image (e.g. in a caption).

        • captionstring

          Caption to show under the image.

      • logoInverseMediaRef | null

        Logo for dark backgrounds.

        Fields as in MediaRef above.

      • faviconMediaRef | null

        Favicon file.

        Fields as in MediaRef above.

      • defaultOgImageMediaRef | null

        og:image for pages that have none of their own.

        Fields as in MediaRef above.

      • registryobject

        Registry numbers. Show only the ones that are set.

        Fields (4)
        • rpwdlstring

          Number in the register of medical entities (RPWDL).

        • nipstring

          Tax identification number (NIP).

        • regonstring

          Statistical number (REGON).

        • krsstring

          Court register number (KRS).

      • privacyobjectsince 1.7.0

        Data for the privacy policy and the information clause. The controller is legalName with the address and the registry numbers. Full policy text: GET /privacy.

        Fields (4)
        • contactEmailstring (email)since 1.7.0

          E-mail for personal-data requests; the clinic's email when unset.

        • registeredOfficestringsince 1.7.0

          The controller's registered office, when it differs from the clinic address.

        • dpoNamestringsince 1.7.0

          Data protection officer, when one is appointed.

        • dpoEmailstring (email)since 1.7.0

          The data protection officer's e-mail.

      • reviewsPolicystring

        How the clinic collects and checks the reviews it shows on its site.

      • demoNoticestring

        A notice for every page (e.g. a demo site). Show it when present.

    • noindexbooleansince 1.5.0

      true: the site stays out of search engines (a demo, or before launch). Add meta robots noindex to every page (ideally also the header X-Robots-Tag: noindex) and publish no sitemap. Keep robots.txt open (Allow: /, no Sitemap line): a crawler has to fetch the pages to see the noindex and drop URLs it indexed before.

The site with its clinic profile

{
  "site": {
    "name": "Klinika Wzorcowa",
    "primaryDomain": "wzorcowa.pozyskajpacjenta.pl",
    "menu": [
      {
        "label": "Strona główna",
        "path": "/"
      },
      {
        "label": "Zabiegi",
        "path": "/zabiegi"
      },
      {
        "label": "Zespół",
        "path": "/zespol"
      },
      {
        "label": "Rezerwacja",
        "path": "/rezerwacja"
      }
    ],
    "theme": {
      "version": 1,
      "colors": {
        "background": "#faf7f1",
        "foreground": "#211d18",
        "surface": "#fffdf9",
        "surface2": "#f3ede1",
        "muted": "#f1eadb",
        "mutedForeground": "#655c4e",
        "primary": "#7a5c2e",
        "primaryForeground": "#fffdf9",
        "accent": "#2c2a25",
        "accentForeground": "#f5efe2",
        "border": "#e3dac7"
      },
      "colorsDark": {
        "background": "#171310",
        "foreground": "#f2ecdf",
        "surface": "#201b15",
        "surface2": "#2a241b",
        "muted": "#242017",
        "mutedForeground": "#b5aa93",
        "primary": "#d3ab63",
        "primaryForeground": "#231b0e",
        "accent": "#ece0c6",
        "accentForeground": "#1c1712",
        "border": "#3a3326"
      },
      "radius": "0.375rem",
      "radiusPill": "9999px",
      "fontSans": "\"Inter\", \"Inter Fallback\", system-ui, sans-serif",
      "fontHeading": "\"Fraunces\", \"Fraunces Fallback\", Georgia, serif",
      "type": {
        "baseMinPx": 16,
        "baseMaxPx": 17.5,
        "ratioMin": 1.18,
        "ratioMax": 1.3,
        "headingWeight": 560,
        "bodyWeight": 400,
        "headingLineHeight": 1.04,
        "bodyLineHeight": 1.62,
        "headingTracking": -0.012
      },
      "rhythm": {
        "sectionYMinRem": 5,
        "sectionYMaxRem": 10,
        "container": "76rem"
      },
      "elevation": {
        "shadowColor": "#2a2114",
        "strength": 0.16
      },
      "motion": {
        "durationFastMs": 180,
        "durationBaseMs": 340,
        "durationSlowMs": 750,
        "easeOut": "cubic-bezier(0.22, 1, 0.36, 1)",
        "easeSpring": "cubic-bezier(0.32, 1.2, 0.6, 1)"
      },
      "imagery": {
        "overlayColor": "#1a1208",
        "overlayOpacity": 0.5,
        "imageRadius": "0.375rem"
      }
    },
    "profile": {
      "legalName": "Klinika Wzorcowa sp. z o.o.",
      "phone": "+48 22 100 20 30",
      "email": "recepcja@klinika-wzorcowa.example",
      "address": {
        "street": "ul. Przykładowa 12",
        "postalCode": "00-950",
        "city": "Warszawa",
        "district": "Mokotów",
        "accessNote": "Wejście od podwórza, parter, winda."
      },
      "geo": {
        "lat": 52.1935,
        "lng": 21.0346
      },
      "openingHours": {
        "mon": [
          {
            "opens": "08:00",
            "closes": "20:00"
          }
        ],
        "tue": [
          {
            "opens": "08:00",
            "closes": "20:00"
          }
        ],
        "wed": [
          {
            "opens": "08:00",
            "closes": "20:00"
          }
        ],
        "thu": [
          {
            "opens": "08:00",
            "closes": "20:00"
          }
        ],
        "fri": [
          {
            "opens": "08:00",
            "closes": "16:00"
          }
        ],
        "sat": [
          {
            "opens": "09:00",
            "closes": "14:00"
          }
        ]
      },
      "openingHoursNote": "Rejestracja telefoniczna do 19:00.",
      "nfz": {
        "contract": false
      },
      "payments": {
        "methods": [
          "gotówka",
          "karta",
          "BLIK"
        ]
      }
    },
    "noindex": false
  }
}

Errors

StatusWhen
401No Authorization header
401Unknown or rotated key
404The clinic's site is not published
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"
}
404 · The clinic's site is not published
{
  "error": "site not published"
}
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.getSite(): Promise<SiteInfo>

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