Command 120 — Get the appointments booked in a systemrework
V1 answered with every appointment of a date range for a list of clinics in one call. V2 reads the appointment book the way the application does: one clinic, one day or one week at a time.
Permissions
Section titled “Permissions”V2 checks an app permission on every call — V1 checked none — and a call whose permission is missing answers 400 with errorCode 15, the same status as an invalid payload (see 4.4). Grant these to the API user before porting the command; the names are the ones of the permission tree in flowww.
| Call | Permission |
|---|---|
GET /client/{clientID} | Clients → Clients - Edit |
GET /diary/{diaryGID} | APPT Book → APPT - Visualize |
POST /diary | APPT Book → APPT - Save |
POST /diary/{id}/move | APPT Book → APPT - Save |
GET /diary | APPT Book → APPT Book - See Daily APPT Book → APPT Book - See weekly APPT Book → APPT Book - See daily by professional APPT Book → APPT Book - See weekly by professional |
Before and after
Section titled “Before and after”curl --location 'https://euapi.flowww.net/v1/fwa_external_get.asp?cmd=120&doctor=USER_LOGIN&pass=USER_PASS&country=ES&key=SYSTEM_KEY&FromDate=01/04/2025&ToDate=15/04/2025' \ --data-urlencode 'ClinicIDs[]=1,2'curl --location 'https://api.flowww.net/v2/diary?diaryGDate=01/04/2025&view=day&groupBy=cabinet&clinicID=1' \ --header 'Authorization: Bearer <api_key>'Field mapping
Section titled “Field mapping”| API V1 | API V2 | Notes |
|---|---|---|
FromDate / ToDate | diaryGDate + view=day|week | Gap: no arbitrary range. view=week returns the 7 days starting on diaryGDate (not Monday to Sunday), so a 15-day range is 3 calls per clinic. diaryGDate is dd/MM/yyyy; an invalid date fails with 400 errorCode 21 (day) or 20 (week). |
ClinicIDs[]=1,2 | ?clinicID= | One clinic per call — loop over your centres. |
| — | groupBy=cabinet|professional | Required, exactly once, like view. Both work with either view, but the shape of the answer changes: view=day&groupBy=cabinet returns a bare array; the other combinations return {"DiaryAvailable": […], "DiaryUnavailable": […]}. |
AppID, AppDate, AppStart, AppEnd | DiaryGID, DiaryGDate, DiaryGStart, DiaryGEnd | Renamed. |
Cabinet.CabID / CabName | DiaryGCabinetNum, DiaryGCabinetAbbr | The payload is flat now, not nested. DiaryGCabinetNum is not the cabinet id: it is the column of the cabinet in the appointment book (with groupBy=professional, the professional’s column). The cabinet’s name comes in DiaryAvailable[].DiaryGCabinetName. |
Client.ClientID / ClientName / ClientPhone1 | DiaryGClientID, DiaryGClientName, DiaryGClientPhone1 | DiaryGClientName arrives as a single display string (“Rosalind Franklin (nº 1)”), not split into name and surnames (the surnames are only included when the clinic splits names and surnames), and the client’s e-mail is not in this payload — read it with GET /client/{clientID} if you need it. |
AppDelayedID | DiaryGDelayed | — |
Clinic.ClinicID / ClinicCommercialName | — | Implied by the clinicID of the call. |
| — | DiaryGConfirmed, DiaryGNotAttended, DiaryGUserName, DiaryGProductZoneCode, DiaryGLocked, DiaryGFWA | New. |
Single appointment detail: GET /diary/{diaryGID}. Creating, moving, confirming and cancelling appointments are first-class operations in V2 too (POST /diary, POST /diary/{id}/move, /confirm, /cancel) — none of which V1 exposed.
The rows are not the same
Section titled “The rows are not the same”The two versions do not return the same set of rows. Filter the V2 answer before comparing it with what V1 gave you:
| Rows | API V1 | API V2 |
|---|---|---|
| Appointments with a client | Yes. | Yes. |
| Blocked slots, closed hours, locks | No. | Yes, mixed with the appointments: rows without DiaryGID, or with DiaryGLocked: -1. Keep only the rows with a DiaryGID, DiaryGLocked other than -1 and DiaryGClientID greater than 0. |
| Not attended (cancelled) appointments | Yes, flagged. | Yes, with DiaryGNotAttended: -1. On those rows DiaryGComments holds the reason. |
| Appointments in hidden cabinets, hidden appointments | Yes. | No. |
Appointments of a professional not scheduled that day (groupBy=professional) | Yes. | No. Use groupBy=cabinet for a complete read. |
| Group appointments | One row per member. | view=day: one row per member. view=week: one row for the group, with DiaryGClientID: 0. |
| Other clinics | Any clinic of the system, in one call. | One clinic per call. |
What the API user may see
Section titled “What the API user may see”- A user restricted to their own appointments only gets those, whatever you send.
DiaryGClientPhone1is empty if the user may not see clients’ contact data, andDiaryGClientNotesonly appears if the clinic shows client notes in the appointment book.- Times are the clinic’s local time, with no time zone.
Errors
Section titled “Errors”| Answer | Meaning | What to do |
|---|---|---|
400 invalid-request-data + field | view or groupBy missing, repeated or invalid. | Send each exactly once. |
400 21 / 20 | Invalid diaryGDate. | Use dd/MM/yyyy. |
400 448 | groupBy=professional is not available: the clinic requires a professional on every appointment and some appointments of the range have none. | Use groupBy=cabinet. |
400 (errorCode 15) | The API user lacks the permission of that view. Day and week, by cabinet and by professional, are four different permissions in the appointment book. | Grant the ones you use. |