Skip to content

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.

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.

CallPermission
GET /client/{clientID}Clients → Clients - Edit
GET /diary/{diaryGID}APPT Book → APPT - Visualize
POST /diaryAPPT Book → APPT - Save
POST /diary/{id}/moveAPPT Book → APPT - Save
GET /diaryAPPT 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
API V1
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'
API V2
curl --location 'https://api.flowww.net/v2/diary?diaryGDate=01/04/2025&view=day&groupBy=cabinet&clinicID=1' \
--header 'Authorization: Bearer <api_key>'
API V1API V2Notes
FromDate / ToDatediaryGDate + view=day|weekGap: 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|professionalRequired, 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, AppEndDiaryGID, DiaryGDate, DiaryGStart, DiaryGEndRenamed.
Cabinet.CabID / CabNameDiaryGCabinetNum, DiaryGCabinetAbbrThe 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 / ClientPhone1DiaryGClientID, DiaryGClientName, DiaryGClientPhone1DiaryGClientName 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.
AppDelayedIDDiaryGDelayed—
Clinic.ClinicID / ClinicCommercialName—Implied by the clinicID of the call.
—DiaryGConfirmed, DiaryGNotAttended, DiaryGUserName, DiaryGProductZoneCode, DiaryGLocked, DiaryGFWANew.

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 two versions do not return the same set of rows. Filter the V2 answer before comparing it with what V1 gave you:

RowsAPI V1API V2
Appointments with a clientYes.Yes.
Blocked slots, closed hours, locksNo.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) appointmentsYes, flagged.Yes, with DiaryGNotAttended: -1. On those rows DiaryGComments holds the reason.
Appointments in hidden cabinets, hidden appointmentsYes.No.
Appointments of a professional not scheduled that day (groupBy=professional)Yes.No. Use groupBy=cabinet for a complete read.
Group appointmentsOne row per member.view=day: one row per member. view=week: one row for the group, with DiaryGClientID: 0.
Other clinicsAny clinic of the system, in one call.One clinic per call.
  • A user restricted to their own appointments only gets those, whatever you send.
  • DiaryGClientPhone1 is empty if the user may not see clients’ contact data, and DiaryGClientNotes only appears if the clinic shows client notes in the appointment book.
  • Times are the clinic’s local time, with no time zone.
AnswerMeaningWhat to do
400 invalid-request-data + fieldview or groupBy missing, repeated or invalid.Send each exactly once.
400 21 / 20Invalid diaryGDate.Use dd/MM/yyyy.
400 448groupBy=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.