Get the patient process
GET/api/v1/process
- Since
- 1.24.0
- Auth
- Bearer key
- operationId
- getProcess
The clinic's patient process from the enquiry to the next visit: six steps, each with its actions (who acts, the channels, when, the full SMS text or what an e-mail holds) and their state, built from the clinic's settings exactly as its panel shows them (Ustawienia › Proces pacjenta). Read only, never patient data. Use it to tell patients on your own frontend what happens after they write (for example "we call back within 15 minutes"). Answers 403 with the code feature_disabled until the clinic has the patient process switched on. 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/process" \
-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 { process } = await client.getProcess();<?php
$response = wp_remote_get(
'https://app.pozyskajpacjenta.pl/api/v1/process',
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 process.
- processPatientProcessrequired
The clinic's patient process.
Fields (5)
- versionintegerrequired
Version of the process shape (1).
One of
1 - isDefaultbooleanrequired
true while the clinic has not changed the default process.
- updatedAtstring (date-time) | nullrequired
When the clinic last changed the process; null for the default one.
- speedTargetMinutesintegerrequired
Reception's target for calling a new patient back, in minutes.
- stepsProcessStep[]required
The steps, in order.
Fields of each item (6)
- keystringrequired
The step's key.
One of
zapytanieszybka_odpowiedzumowienieprzypomnieniepo_wizycierecall - positionintegerrequired
The step's number, from 1.
- titlestringrequired
Name of the step (Polish).
- summarystringrequired
What happens to the patient at this step (Polish).
- notestring | nullrequired
The clinic's note for reception at this step (Polish), or null.
- actionsProcessAction[]required
The step's actions.
Fields of each item (10)
- keystringrequired
The action's key.
One of
powiadomienie_recepcjisms_recepcjisms_potwierdzeniepierwszy_kontaktsms_ponowieniepotwierdzenie_wizytyprzypomnienie_24hprzypomnienie_2hopinia_googlezaproszenie_recall - labelstringrequired
What happens (Polish).
- whostringrequired
pacjent: the patient gets a message;recepcja: reception acts.One of
pacjentrecepcja - channelsstring[]required
The action's channels.
One of
emailsmstelefonpanel - timingobjectrequired
When it happens.
Fields (2)
- kindstringrequired
The kind of timing.
One of
immediatelywithin_minutesafter_lead_hoursbefore_visit_hoursafter_visit_daysafter_visit_months - valueobject
Minutes, hours or days; for
after_visit_monthsthe list of months set on the clinic's treatments. Absent forimmediately.
- timingLabelstringrequired
The timing in words (Polish).
- templateobjectrequired
The words.
Fields (3)
- sourcestringrequired
platform: the platform's text;clinic: the clinic's own.One of
platformclinic - textstring | nullrequired
The full SMS text the patient gets; null for e-mails.
- descriptionstringrequired
What the message holds (Polish).
- statestringrequired
on,off, orneeds_setup(switched on but something it needs is missing).One of
onoffneeds_setup - stateReasonstring | nullrequired
Why it is off or what it lacks (Polish), or null.
- setupHrefstring | nullrequired
The clinic panel screen that sets it, or null.
A clinic's own process: SMS on, its own confirmation text, a 15-minute target
{
"process": {
"version": 1,
"isDefault": false,
"updatedAt": "2026-10-22T09:30:00.000Z",
"speedTargetMinutes": 15,
"steps": [
{
"key": "zapytanie",
"position": 1,
"title": "Nowe zapytanie",
"summary": "Pacjent wysyła formularz, dzwoni albo pisze. Recepcja dowiaduje się o tym od razu.",
"note": null,
"actions": [
{
"key": "powiadomienie_recepcji",
"label": "E-mail do recepcji o nowym zapytaniu",
"who": "recepcja",
"channels": [
"email",
"panel"
],
"timing": {
"kind": "immediately"
},
"template": {
"source": "platform",
"text": null,
"description": "Kto pisze, czego dotyczy zapytanie i link do pacjenta w panelu."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/settings/powiadomienia",
"timingLabel": "od razu"
},
{
"key": "sms_recepcji",
"label": "SMS do recepcji o nowym zapytaniu",
"who": "recepcja",
"channels": [
"sms"
],
"timing": {
"kind": "immediately"
},
"template": {
"source": "platform",
"text": null,
"description": "Krótka informacja o nowym zapytaniu na telefon recepcji."
},
"state": "off",
"stateReason": null,
"setupHref": "/panel/settings/powiadomienia#sms",
"timingLabel": "od razu"
}
]
},
{
"key": "szybka_odpowiedz",
"position": 2,
"title": "Szybka odpowiedź",
"summary": "Pacjent dostaje potwierdzenie, a recepcja oddzwania, zanim pacjent zadzwoni gdzie indziej.",
"note": "Zadzwoń, przedstaw się, zapytaj, czego potrzebuje pacjent, i zaproponuj dwa terminy.",
"actions": [
{
"key": "sms_potwierdzenie",
"label": "SMS do pacjenta: otrzymaliśmy zapytanie",
"who": "pacjent",
"channels": [
"sms"
],
"timing": {
"kind": "immediately"
},
"template": {
"source": "clinic",
"text": "Klinika Wzorcowa: dziękujemy za wiadomość. Oddzwonimy w ciągu kwadransa, w godzinach otwarcia.",
"description": "Treść kliniki"
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/settings/powiadomienia#sms",
"timingLabel": "od razu"
},
{
"key": "pierwszy_kontakt",
"label": "Recepcja dzwoni do pacjenta",
"who": "recepcja",
"channels": [
"telefon",
"panel"
],
"timing": {
"kind": "within_minutes",
"value": 15
},
"template": {
"source": "platform",
"text": null,
"description": "Zapytanie czeka w Recepcji; po tym czasie dostaje oznaczenie, że czeka za długo."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/recepcja",
"timingLabel": "w ciągu 15 minut"
},
{
"key": "sms_ponowienie",
"label": "SMS do pacjenta, gdy zapytanie wciąż czeka",
"who": "pacjent",
"channels": [
"sms"
],
"timing": {
"kind": "after_lead_hours",
"value": 4
},
"template": {
"source": "platform",
"text": "Klinika Wzorcowa: wciąż chcemy porozmawiać o Twoim zapytaniu. Zadzwoń do nas: +48 22 100 20 30 albo odbierz, gdy oddzwonimy.",
"description": "Tekst platformy"
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/settings/powiadomienia#sms",
"timingLabel": "po 4 godzinach, między 8:00 a 20:00"
}
]
},
{
"key": "umowienie",
"position": 3,
"title": "Umówienie wizyty",
"summary": "Pacjent wybiera termin na stronie albo umawia się z recepcją i dostaje potwierdzenie.",
"note": null,
"actions": [
{
"key": "potwierdzenie_wizyty",
"label": "E-mail do pacjenta z potwierdzeniem wizyty",
"who": "pacjent",
"channels": [
"email"
],
"timing": {
"kind": "immediately"
},
"template": {
"source": "platform",
"text": null,
"description": "Data, godzina, miejsce, plik do kalendarza i link do zmiany terminu."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/booking?konfiguracja=1",
"timingLabel": "od razu"
}
]
},
{
"key": "przypomnienie",
"position": 4,
"title": "Przypomnienie i przyjście",
"summary": "Przed wizytą pacjent dostaje przypomnienie, żeby przyszedł albo zwolnił termin.",
"note": null,
"actions": [
{
"key": "przypomnienie_24h",
"label": "Przypomnienie dzień przed wizytą",
"who": "pacjent",
"channels": [
"email",
"sms"
],
"timing": {
"kind": "before_visit_hours",
"value": 24
},
"template": {
"source": "platform",
"text": null,
"description": "Data, godzina i miejsce wizyty z linkiem do zmiany terminu."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/booking?konfiguracja=1#zasady",
"timingLabel": "dzień przed wizytą (24 h)"
},
{
"key": "przypomnienie_2h",
"label": "Przypomnienie w dniu wizyty",
"who": "pacjent",
"channels": [
"email",
"sms"
],
"timing": {
"kind": "before_visit_hours",
"value": 2
},
"template": {
"source": "platform",
"text": null,
"description": "Data, godzina i miejsce wizyty z linkiem do zmiany terminu."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/booking?konfiguracja=1#zasady",
"timingLabel": "2 h przed wizytą"
}
]
},
{
"key": "po_wizycie",
"position": 5,
"title": "Po wizycie",
"summary": "Dzień po wizycie pacjent może zostawić opinię w Google.",
"note": null,
"actions": [
{
"key": "opinia_google",
"label": "E-mail z prośbą o opinię w Google",
"who": "pacjent",
"channels": [
"email"
],
"timing": {
"kind": "after_visit_days",
"value": 1
},
"template": {
"source": "platform",
"text": null,
"description": "Do każdego pacjenta ze zgodą na e-mail, najwyżej raz na pół roku, bez wybierania po ocenie."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/settings/powiadomienia#opinie",
"timingLabel": "dzień po wizycie"
}
]
},
{
"key": "recall",
"position": 6,
"title": "Kolejna wizyta",
"summary": "Gdy zbliża się czas kolejnej wizyty (np. higienizacji), pacjent dostaje zaproszenie.",
"note": null,
"actions": [
{
"key": "zaproszenie_recall",
"label": "Zaproszenie na kolejną wizytę",
"who": "pacjent",
"channels": [
"email",
"sms"
],
"timing": {
"kind": "after_visit_months",
"value": [
6,
12
]
},
"template": {
"source": "platform",
"text": null,
"description": "Zaproszenie z linkiem do strony zabiegu, tylko do pacjentów ze zgodą na wiadomości."
},
"state": "on",
"stateReason": null,
"setupHref": "/panel/booking?konfiguracja=1#zabiegi",
"timingLabel": "po 6, 12 miesiącach (zależnie od zabiegu)"
}
]
}
]
}
}Errors
| Status | code | When |
|---|---|---|
| 401 | No Authorization header | |
| 401 | Unknown or rotated key | |
| 403 | feature_disabled | The clinic has not switched the patient process on |
| 429 | Over 120 requests in this minute |
Branch on the status and code, never on the Polish error text. All statuses in Errors.
{
"error": "missing Authorization: Bearer <klucz z panelu Ustawienia>"
}{
"error": "invalid key"
}{
"error": "Proces pacjenta nie jest włączony dla tej placówki.",
"code": "feature_disabled"
}{
"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-RemainingandRateLimit-Reset; see Rate limits.
SDK method
client.getProcess(): Promise<ProcessInfo>
The TypeScript tab above uses it. Install and errors: TypeScript SDK.