Multi-center
Clinics with several sites in one agenda.
A multi-center clinic has several sites (centers) in one agenda system. Ovianta then needs to know which site each request and each appointment is about. The site decides which phone number calls the patient, which site the agent speaks for, which slots it can offer, and which center the call is filed under.
If the clinic has a single site, skip this page. Ovianta never sends centerId, and you can leave centerRef out.
Two ways to set up the agents
A multi-center clinic does not need multi-center agents. Pick one of these setups with the clinic:
| One agent per center | One agent for several centers | |
|---|---|---|
| How it works | Each agent works for one site. A clinic with 3 sites has 3 agents. | One agent works for several sites. |
| Available for | Every agent type | Reminder agents only |
centerId on requests | Always sent: the agent's site | Left out when the agent lists or searches appointments, so you return every site's |
centerRef on appointments | Not needed | Required: it is how Ovianta knows each appointment's site |
If your API cannot answer without a centerId | Works | Does not work |
Setting it up
List your sites
Add a centers list to GET /custom-config, with your id and name for each site:
{
"centers": {
"data": [
{ "id": "1", "name": "Sede Centro" },
{ "id": "2", "name": "Sede Norte" }
]
}
}Link each Ovianta center to one of your sites
In the integration's settings in Ovianta, each Ovianta center is linked to one of your center ids, for example Ovianta's "Clínica Norte" to your "2". This is configuration in Ovianta: there is nothing to build on your side.
At most one Ovianta center can stay unlinked. That center is the catch-all: it receives the appointments of every site of yours that nobody linked.
Use your ids in both directions
From then on, your center ids travel both ways, under two field names:
centerId: Ovianta tells you which site a request is about.centerRef: you tell Ovianta which site an appointment is at.
Both hold an id from your centers list.
centerId: which site Ovianta is asking about
centerId is a query parameter or body field on Ovianta's requests. It means "only this site". Return only data from that site: slots there, appointments there.
| Request | centerId sent |
|---|---|
GET /availabilities | The site of the conversation |
POST /appointments | The site of the new appointment |
GET /appointments?date=, GET /appointments/range | The agent's site. Left out for an agent that serves several centers. |
GET /appointments?nif= | The agent's site. Left out for an agent that serves several centers: a patient's appointments are theirs at any site. |
POST /appointments/end-of-reminder-day | The agent's own site. One call per cycle, not one per site. |
A missing centerId means "all sites", not "unknown". Ovianta leaves it out when:
- the integration has no centers linked (a single-site clinic);
- the site is the catch-all, which stands for a group of your sites, and a request can only name one;
- an agent that serves several centers lists or searches appointments.
centerRef: which site an appointment is at
centerRef is a field on each appointment you return. Ovianta reads it only for agents that serve several centers, and uses it to give each appointment to one of the agent's centers:
- If
centerRefmatches a linked center the agent serves, the appointment goes to that center. - Otherwise it goes to the agent's catch-all center, if the agent serves it.
- Otherwise the appointment is skipped, and that patient is not called.
An agent that works for one center ignores centerRef. It treats every appointment you return as its own, which is why it matters that you honour centerId.
Use the key centerRef, with the id from your list
Ovianta reads only the key centerRef. Any other key, such as idCenter, is ignored. The value must be exactly an
id from your centers list: "2", not "Sede Norte".
Example: one reminder agent for two sites
The clinic has two sites, linked like this: Ovianta's "Clínica Centro" to your "1", and "Clínica Norte" to your "2". One reminder agent serves both.
Ovianta lists the day's appointments with no centerId, because it wants both sites at once:
GET {baseUrl}/appointments?date=16/02/2026You return every appointment that day, each with its centerRef:
{
"data": [
{ "appointmentId": "56834", "centerRef": "1", "patientName": "Marta Ruiz", "...": "..." },
{ "appointmentId": "56901", "centerRef": "2", "patientName": "Ana García", "...": "..." }
]
}Ovianta calls each patient on behalf of their site. Marta's call is made for Clínica Centro, with that center's phone number and details. Ana's is made for Clínica Norte.
Requests during each call carry that call's site. If Ana wants to move her appointment, the availability search sends centerId=2.