Web API Endpoint Reference

Introduction

Our Web API provides client applications access to OPTretina. Please notice the API still won't cover all situations and features that our platform offers.

Requirements

Ask us for the developer keys at developers@optretina.com

Summary

Basic workflow

Aditional options

Endpoints

Authentication

HTTP Method: POST

URL: https://api.optretina.com/authorize

Param Description
client_id Client identifier
client_secret Client Secret hash
grant_type Constant string 'client_credentials'

Example


curl --data "client_id=<YOUR_CLIENT_ID>client_secret=<YOUR_CLIENT_SECRET>&grant_type=client_credentials" https://api.optretina.com/authorize
                                            

Create case

HTTP Method: POST

URL: https://api.optretina.com/cases

Authentication: Required

Param Description
history_numberString
first_nameString
last_nameString
gender0: MALE, 1: FEMALE
agenumber
diabetes0: no, 1: yes
visit_dateYYYY-MM-DD
visit_reasonString
ophthalmic_antecedentsString
other_relevant_infoString
retinologist_notesString
od_iopfloat
od_vafloat
od_axisfloat
od_cylinderfloat
od_spherefloat
od_addfloat
od_prismfloat
od_prism_basefloat
os_iopfloat
os_vafloat
os_axisfloat
os_cylinderfloat
os_spherefloat
os_addfloat
os_prismfloat
os_prism_basefloat
callback_urlURL
imagesArray files

Example


curl  -H "Authorization: Bearer <YOUR_TOKEN>" --form "images[]=@<PATH_IMAGE>;filename=<FILE_NAME>" --form "images[]=@<PATH_IMAGE_2>;filename=<FILE_NAME_2>" --form first_name=<PATIENT_NAME> --form last_name=<PATIENT_LAST_NAME> --form gender=<GENDER>  --form age=<AGE> --form paramName=paramValue ... https://api.optretina.com/cases
                                          

Retrieving a collection of cases

HTTP Method: GET

URL: https://api.optretina.com/cases

Authentication: Required

Param Description

Example


curl -H "Authorization: Bearer <YOUR_TOKEN>" https://api.optretina.com/cases
                                          

Retrieving a single case

HTTP Method: GET

URL: https://api.optretina.com/cases/{id}

Authentication: Required

Param Description
ID Case ID

Example


curl -H "Authorization: Bearer <YOUR_TOKEN>" https://api.optretina.com/cases/<CASE_ID>>
                                          

Getting a report

HTTP Method: GET

URL: https://api.optretina.com/cases/report/{id}

Param Description
ID Case ID

Example


curl -H "Authorization: Bearer <YOUR_TOKEN>" https://api.optretina.com/cases/report/<CASE_ID>