Skip to content

Command 08 — Client registrationrework

Creates a client. In V2 it is POST /client, and most fields keep their names. What changes is what the call checks: duplicate detection, required fields and several defaults work differently — see What changes compared with V1 below the mapping.

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
POST /clientClients → Fast registration - Create
PATCH /client/{clientID}Clients → Clients - Save
GET /system/countriesGeneral → Settings - Load
GET /client/{clientID}Clients → Clients - Edit
GET /clientClients → Clients - Search
API V1
curl --location 'https://euapi.flowww.net/v1/fwa_external_get.asp?cmd=08&doctor=USER_LOGIN&pass=USER_PASS&country=ES&key=SYSTEM_KEY&ClinicID=1' \
--data-urlencode 'ClientName=Benito' \
--data-urlencode 'ClientSurname1=Perez' \
--data-urlencode 'ClientPhone1=610000000' \
--data-urlencode 'ClientSex=M' \
--data-urlencode 'ClientEmail=benito@perez.com' \
--data-urlencode 'ClientCountryISO3166_1_alfa2=ES' \
--data-urlencode 'ClientProvinceISO3166_2=ES-M' \
--data-urlencode 'ClientRefererID=1'
<Cmd08>
<Result>1</Result>
<ResultClientID>93271</ResultClientID>
</Cmd08>
API V2
curl --location 'https://api.flowww.net/v2/client?clinicID=1' \
--header 'Authorization: Bearer <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"ClientName": "Benito",
"ClientSurname1": "Perez",
"ClientPhone1": "610000000",
"ClientSex": "M",
"ClientEmail": "benito@perez.com",
"ClientCountryID": 201,
"ClientProvinceID": 32,
"ClientRefererID": 1
}'
{ "ClientID": 93271 }

Most fields keep the name they had in V1, and POST /client and PATCH /client/{clientID} take the same ones. What follows is only what a V1 payload has to change; the complete list of fields, with types and limits, is in the API reference (Create Client, createClient).

API V1API V2What to do
ClientProvinceISO3166_2 (ES-M)ClientProvinceID (28)The numeric id, not the ISO code. Resolve it once with GET /system/provinces?countryID=… — see 4.11.
ClientCountryISO3166_1_alfa2 (ES)ClientCountryID (201)Same change. GET /system/countries carries the catalogue — see 4.11.
ClientCityNameClientCityRenamed.
ClientBirthDayClientBirthDateRenamed. dd/MM/yyyy, as everywhere else in V2 — see 4.1.
Legal representativeClientRepParenthood, ClientRepName, ClientRepSurnames, ClientRepNIF, ClientRepIDClass, ClientRepAddress, ClientRepPhone, ClientRepEmailThe prefix is ClientRep, not ClientLegalRep. Send them for a minor.
ClientEnableRGPDClientConsentEmail, ClientConsentSMS, ClientConsentAPP, ClientConsentPhone, ClientConsentWhatsApp, ClientConsentPostalConsent is per channel now. ClientEnableRGPD still works, but it overrides all six — read the warning below.
ClientDisableEMailNotification—Gone. The welcome email is sent whenever the clinic has the client app enabled and the client has an email.
ClientTemp, ClientAppDisabledsame namesTrue is -1, not 1 — see 4.2. A temporary client is created with this same POST /client by sending ClientTemp; there is no separate call.
ClientFWAsame nameStill 1 to give the client the app, and it now works on an update too — see command 18.

Worth sending although V1 had no equivalent: ClientPhonePrefix1…3 (the dial code, separate from the number), ClientExternalReference (your own id, which also resolves the referer), ClientSource, ClientCardNumber, ClientFWALogin / ClientFWAPassword, and ClientLNotes.

TopicAPI V1API V2
ClinicWith the clinic setting default clinic for online registrations, V1 ignored ClinicID and used that clinic.The client is created in the clinicID you send (or the API user’s default clinic). That setting is ignored.
Required fieldsV1 enforced the clinic’s list of fields mandatory for online registrations (100003 if one was missing).The same fields the flowww interface requires. The clinic’s configuration applies exactly as it does when a client is created by hand in flowww; the separate online-registration list is no longer a case of its own.
Codes of country, province, refererChecked.Stored as sent.
MinorsRefused a birth date that needs a legal representative.Accepted; send the ClientRep* fields to create the representative.
Emails such as nomail…, nowant…Blanked, and the text was moved to ClientCustom3.Stored as sent.
Consent when ClientEnableRGPD is omittedThe clinic’s default.Withheld on every channel.
Welcome emailCould be suppressed with ClientDisableEMailNotification.Always sent when the clinic has the client app enabled and the client has an email.

This is the change most likely to create duplicate clients after the switch.

  • V1 always checked the email, and also the ID number and the phones when the clinic set them as unique.
  • V2 only checks when you send ClientForceEmail: 0. It then applies the clinic’s rules: same full name always, and email, ID number, phones and card number according to the clinic’s settings. If you omit ClientForceEmail, no check is done at all.

Send ClientForceEmail: 0 so the check runs. A duplicate answers 409 {"message":"A client with those details already exists.","errorCode":"409"}.

Reach for ClientForceEmail: 1 only once you have established that you do want a second record — you looked the client up and it is a different person, or whoever handles the 409 decided to create it anyway. Retrying the same call with ClientForceEmail: 1 as an automatic reaction to the 409 turns the duplicate check into a no-op and is exactly how the duplicates get in.

Always check that the answer carries a numeric ClientID before storing it.

AnswerMeaningWhat to do
400 invalid-request-data + fieldA field does not meet the rules in the mapping.Fix the field.
409Duplicate client (only with ClientForceEmail: 0).Search the existing client and use it. Only send ClientForceEmail: 1 once someone has established it really is a different person — never as an automatic retry.
400 381 / 340The system (or the test clinic) reached its maximum number of clients.Contact flowww.
400 403 / 706 / 707 / 708Clinic connected to the regional health registry: mandatory registry data missing, or birth date in the future / too old / invalid.Complete the data. Note that 403 here is an errorCode inside a 400 answer.
400 (errorCode 15)The API user lacks Clients → Fast registration → Create.Grant the permission.