Skip to content
Documentation
pozyskajpacjentaDocs

API referenceBooking

Get the booking catalog

GET/api/v1/booking/catalog

Since
1.3.0
Auth
Bearer key
operationId
getBookingCatalog

Active booking services and specialists, with links to the published treatments and team profiles. The ids are the service and resource parameters of /booking/slots and the serviceId and resourceId of /booking/appointments. A treatment points at its service with bookingServiceId, a team profile at its specialist with bookingResourceId. 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/booking/catalog" \
  -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 { services, resources } = await client.getBookingCatalog();
<?php
$response = wp_remote_get(
    'https://app.pozyskajpacjenta.pl/api/v1/booking/catalog',
    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

200Services and specialists.

  • servicesBookingCatalogService[]required

    Active booking services.

    Fields of each item (9)
    • idstringrequired

      Service id: the service parameter of /booking/slots.

    • namestringrequired

      Name of the service.

    • durationMinintegerrequired

      Length of the visit in minutes.

    • priceLabelstring | nullrequired

      Price of the visit for display: the booking service's own price label (e.g. a consultation at 300 zł), else the priceFromLabel of the published treatment linked to it (as in /services/{slug}); null when there is neither.

    • resourceIdsstring[]required

      Active specialists who perform the service (ids from resources). An empty list means nobody can be booked for it. Free slots always come from /booking/slots.

    • serviceSlugstring | nullrequired

      Slug of the published treatment linked to the service (GET /services/{slug}); null when no published treatment points at it.

    • nfzbooleansince 1.8.0

      true: an NFZ (public health fund) service. Show it for information with a note that booking is by phone and the clinic's phone; it cannot be booked online (/booking/slots and /booking/appointments answer 400 nfz_phone_only). Absent on older servers, which means false.

    • bookingPolicystringsince 1.13.0

      How a booking ends. instant: booked at once. confirm: the clinic confirms the visit (POST /booking/appointments answers status pending; tell the patient the clinic will confirm). pay: the patient pays online first (the answer carries paymentUrl). Already resolved: a clinic without online payments serves pay as confirm. Absent on older servers, which means instant.

      One of instantconfirmpay

    • prepayobject | nullsince 1.13.0

      The online prepayment: with pay, and with confirm as a card hold taken only once the clinic confirms. null when there is none.

      Fields (4)
      • amountintegerrequired

        Amount in grosze (PLN minor units).

      • currencystringrequired

        Always PLN.

        One of PLN

      • kindstringrequired

        full: the whole price; deposit: part of it, the rest is paid at the clinic.

        One of fulldeposit

      • labelstringrequired

        Ready-made label, e.g. Zaliczka 50,00 zł.

  • resourcesBookingCatalogResource[]required

    Active specialists.

    Fields of each item (5)
    • idstringrequired

      Specialist id: the resource parameter of /booking/slots.

    • namestringrequired

      Full name.

    • titlestring | nullrequired

      Professional title, e.g. lek. dent.; null when none.

    • doctorSlugstring | nullrequired

      Slug of the published team profile (GET /doctors/{slug}); null when no published profile points at the specialist.

    • locationIdsstring[]since 1.12.0

      The locations the specialist works in, ids from locations.

  • locationsBookingCatalogLocation[]

    Locations someone works in (1.12.0); pass one as location to /booking/slots.

    Fields of each item (3)
    • idstringrequired

      Location id: the location parameter of /booking/slots.

    • namestringrequired

      Name of the location.

    • addressstring | nullrequired

      Street and town; null when not set.

Bookable services (trimmed) and specialists, one of them NFZ

{
  "services": [
    {
      "id": "bsvc_konsultacja",
      "name": "Konsultacja stomatologiczna",
      "durationMin": 30,
      "priceLabel": "200 zł",
      "resourceIds": [
        "bres_anna",
        "bres_piotr",
        "bres_maria"
      ],
      "serviceSlug": "konsultacja-stomatologiczna",
      "nfz": false
    },
    {
      "id": "bsvc_higienizacja",
      "name": "Higienizacja (skaling + piaskowanie + fluoryzacja)",
      "durationMin": 60,
      "priceLabel": "290 zł",
      "resourceIds": [
        "bres_maria"
      ],
      "serviceSlug": "higienizacja",
      "nfz": false
    },
    {
      "id": "bsvc_nfz",
      "name": "Leczenie zachowawcze (NFZ)",
      "durationMin": 30,
      "priceLabel": null,
      "resourceIds": [
        "bres_piotr"
      ],
      "serviceSlug": null,
      "nfz": true
    }
  ],
  "resources": [
    {
      "id": "bres_anna",
      "name": "Anna Wzorcowa",
      "title": "dr n. med.",
      "doctorSlug": "anna-wzorcowa"
    },
    {
      "id": "bres_piotr",
      "name": "Piotr Nowicki",
      "title": "lek. dent.",
      "doctorSlug": "piotr-nowicki"
    },
    {
      "id": "bres_maria",
      "name": "Maria Zielińska",
      "title": "lek. dent. spec. stomatologii estetycznej",
      "doctorSlug": "maria-zielinska"
    }
  ]
}

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.getBookingCatalog(): Promise<BookingCatalog>

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