Creating a Client account through Clinic

Creating Client accounts (and assigning sessions to them) by Clinics.

This section will explain how to add a client by clinic admin.

A Clinic can create Client accounts resembling its clients by this API and one of the ways of assigning homework to Clients is assigning Design Plans to them just after their account is registered by the Clinic. Notice that Client and Design Plan must exist before we can assign them to each other, for using this assignment you can use this API as described below:

1- Request URL:

https:/gateway.optt.ca/profile/clinic/client

2- Request Method Type:

POST

3- Request Input Parameters:

Body

{
  "caregiverList": [
    0
  ],
  "clientId": "string",
  "clinicId": 0,
  "email": "string",
  "externalClientId": "string",
  "fromCpm": true,
  "id": 0,
  "imageData": "string",
  "imageExtension": "string",
  "language": "EN",
  "mobile": "string",
  "name": "string",
  "session": {
    "bookIdList": [
      0
    ],
    "caregiverId": 0,
    "clientId": 0,
    "clinicId": 0,
    "date": "string",
    "description": "string",
    "designPlanId": 0,
    "id": 0,
    "remindDays": 0,
    "sessionCount": 0,
    "time": "string",
    "title": "string"
  },
  "status": "ACTIVE"
}

*Body description

Parameter Name

Parameter Type

Description

name

String

Client’s full name

email

String

Client’s email address [standard email format]

mobile

String

Client’s cell phone number

imageData

String

Base64 form of Client’s image data

imageExtension

String

Type of the image file

Care ProviderList

List
(Optional)

List of all Care Providers who are going to be assigned to this Client. It is optional.

session

sessionRequestModel(Optional)

You can assign this new client to a session quickly. It is optional and you don't need to set a clientId or clinicId for it

A complete example of an API call:

curl -X POST "https://gwi.dv.optt.ca/gateway/profile/clinic/client" -H "accept: */*" -H "Authorization: bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM3NTgyMDY0NDQsInVzZXJfbmFtZSI6ImxhbGVoQG9wdHQuY2EiLCJhdXRob3JpdGllcyI6WyJDTElOSUMiXSwianRpIjoiMjU5NTgwMTAtZWVkMC00MThkLTlmNzctZWU1YzA3OWU0Mzc3IiwiY2xpZW50X2lkIjoib3B0dC0wMmVlNzdkYy1hYzQ1LTQzNDQtODE3ZS0xN2NhNTJiNThiNWQiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXX0.Qx07ooEYUh_i6p-ieR1w__IKj8AxIC7qeOXRHYRqJkh1IYo_wGmM1zv_qaiB9e9Gxk9yob8NalQsyJ5Knte08vyEg3bAF94fey1rXBjbmgwsLtz9lH2GaIqyw030vCv7fbbw1q-R2-drM31dRmhRy981gykA0Vo-F2ypOnYeu7FcJJxLGVs8Tu4bImCDNsKeqkCj81R_j3YFu1uigYjPbWzCRFG6xKATJrGU-fFhbr_m-WpiIIFZCoi12EK18C_Ikf1ClBDk78GHYEs6NFb4hH7Hmd5yQjDHwtgQb78uzWMUS7jQYtYw7W3tULCT3K_FZRJBNwMxWAbRMHQVcLoFRA" -H "offset: 1" -H "Content-Type: application/json" -d "{ \"caregiverList\": [ 1 ], \"clinicId\": 1, \"email\": \"[email protected]\", \"externalClientId\": \"9865\", \"language\": \"EN\", \"mobile\": \"093\", \"name\": \"laleh\", \"status\": \"ACTIVE\"}"

Response:

201:

access-control-allow-credentials: true 
 access-control-allow-origin: https://gwi.dv.optt.ca 
 cache-control: max-age=1, no-cache 
 connection: keep-alive 
 content-length: 0 
 date: Tue, 09 Feb 2021 15:26:22 GMT 
 expires: Tue, 09 Feb 2021 15:26:23 GMT 
 location: /client/2 
 pragma: no-cache 
 server: nginx/1.18.0 (Ubuntu) 
 vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Origin 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block