Skip to content
Documentation
pozyskajpacjentaDocs

API referenceEntities

Get a treatment

GET/api/v1/services/{slug}

Since
1.1.0
Auth
Bearer key
operationId
getService

One published treatment with its content blocks, questions and answers, and related treatments. 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).

Path parameters

  • slugstringrequired

    Slug of the treatment (lower-case letters, digits, hyphens).

curl "https://app.pozyskajpacjenta.pl/api/v1/services/higienizacja" \
  -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 { service } = await client.getService("higienizacja");
<?php
$response = wp_remote_get(
    'https://app.pozyskajpacjenta.pl/api/v1/services/higienizacja',
    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 treatment.

  • serviceServiceDetailrequired

    The treatment.

    Fields (14)
    • idstringrequired

      Treatment id.

    • slugstringrequired

      Slug from the treatment's address.

    • pathstringrequired

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

    • namestringrequired

      Treatment name.

    • categorystring | null

      Category the clinic groups the treatment under; null when none.

    • shortDescstring | null

      One-sentence description for lists; null when empty.

    • priceFromLabelstring | null

      Price label, e.g. od 290 zł; null when the clinic shows no price.

    • durationLabelstring | null

      Duration label, e.g. zabieg 60 min; null when empty.

    • bookingServiceIdstring | nullrequiredsince 1.3.0

      Id of the active booking service this treatment is booked as: an entry of GET /booking/catalog and the service parameter of /booking/slots. null when the treatment is not linked to booking or the linked service is inactive.

    • heroMediaRef | null

      Main image of the treatment page; null when none.

      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.

      • widthintegersince 1.4.0

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

      • heightintegersince 1.4.0

        Height of the original in px.

      • aiGeneratedbooleansince 1.4.0

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

      • captionstringsince 1.4.0

        Caption to show under the image.

    • bodyBlocksBlock[]required

      Content blocks of the treatment page.

      Fields of each item (3)
      • idstringrequired

        Block id, stable within the page.

      • typestringrequired

        Block type with its version, e.g. hero.v1, faq.v1.

      • propsobjectrequired

        The block's fields; their shape depends on type.

    • faqobject[]required

      Questions and answers about the treatment.

      Fields of each item (2)
      • questionstringrequired

        The question.

      • answerstringrequired

        The answer, plain text.

    • relatedRelatedService[]required

      Other published treatments the clinic links from this one.

      Fields of each item (5)
      • idstringrequired

        Treatment id.

      • slugstringrequired

        Treatment slug.

      • pathstringrequired

        Path of the treatment page.

      • namestringrequired

        Treatment name.

      • priceFromLabelstring | null

        Price label, e.g. od 290 zł; null when the clinic shows no price.

    • updatedAtstring (date-time)required

      Last change, ISO 8601.

A treatment page

{
  "service": {
    "id": "svc_higienizacja",
    "slug": "higienizacja",
    "path": "/zabiegi/higienizacja",
    "name": "Higienizacja",
    "category": "Profilaktyka",
    "shortDesc": "Skaling ultradźwiękowy, piaskowanie i fluoryzacja z instruktażem higieny, zalecana co 6 miesięcy.",
    "priceFromLabel": "290 zł",
    "durationLabel": "zabieg 60 min",
    "bookingServiceId": "bsvc_higienizacja",
    "hero": null,
    "bodyBlocks": [
      {
        "id": "svc-hig-body",
        "type": "rich-text.v1",
        "props": {
          "variant": "narrow",
          "heading": "Najtańsze leczenie, jakie istnieje",
          "body": "Regularna higienizacja usuwa kamień, zanim wywoła stan zapalny dziąseł, i pozwala wychwycić próchnicę na etapie małego wypełnienia."
        }
      },
      {
        "id": "svc-hig-cta",
        "type": "booking.v1",
        "props": {
          "heading": "Umów higienizację",
          "subheading": "Zabieg wykonuje lek. dent. Maria Zielińska.",
          "preselectedServiceId": "bsvc_higienizacja"
        }
      }
    ],
    "faq": [
      {
        "question": "Czy higienizacja boli?",
        "answer": "Nie, przy wrażliwych zębach możemy zastosować znieczulenie powierzchniowe. Po zabiegu nadwrażliwość mija w ciągu doby."
      },
      {
        "question": "Jak często powtarzać higienizację?",
        "answer": "Standardowo co 6 miesięcy; przy aparatach ortodontycznych i implantach co 3–4 miesiące."
      }
    ],
    "related": [
      {
        "id": "svc_kontrola",
        "slug": "wizyta-kontrolna",
        "path": "/zabiegi/wizyta-kontrolna",
        "name": "Wizyta kontrolna",
        "priceFromLabel": "150 zł"
      },
      {
        "id": "svc_konsultacja",
        "slug": "konsultacja-stomatologiczna",
        "path": "/zabiegi/konsultacja-stomatologiczna",
        "name": "Konsultacja stomatologiczna",
        "priceFromLabel": "200 zł"
      }
    ],
    "updatedAt": "2026-09-30T14:21:55.000Z"
  }
}

Errors

StatusWhen
401No Authorization header
401Unknown or rotated key
404No published treatment with this slug
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 · No published treatment with this slug
{
  "error": "nie znaleziono"
}
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.getService(slug: string): Promise<{ service: ServiceDetail }>

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