ODAS API Integration
ODAS API Integration
Welcome to Oxygen Demand Aggregation System’s API Documentation. We've designed this document to help developers and
ODAS users fully understand and integrate our API for a seamless and easy deployment. These APIs enable you to update Hospital
profile and infrastructure and also update the daily oxygen demand and consumption details.
We've listed all the APIs, their required parameters, and their example requests and responses in this document for easy
understanding. The easiest way to start using the ODAS APIs is by trying them out in Postman (a free tool that helps developers run
and debug API requests) or our Swagger UI ( https://oxygen.nha.gov.in/ODAS/swagger-ui.html# ).
Our APIs are based around REST architecture and use the basic HTTPS request methods. Our APIs accept JSON- encoded body
requests and return data in the same form.
Getting Started
First, you will need to white list the Public IP of ODAS to access the APIs. Please make note of the details
Public IP : 59.160.177.51
Port to be opened : Port : 443
Domain : oxygen.nha.gov.in
To access ODAS update APIs you will need to use the Authentication API to obtain an access-token. To be able to use the
Authentication API please follow these steps
1. Please reach out to ODAS team for a set of unique values specific for your State. The values will be namely clientId and
clientSecret.
2. These two unique values need to be used in the Request Body of Authentication API.
3. The access-token thus received from the Authentication API will be used to authenticate further API calls.
.
1. Authentication API
The clientId and clientSecret are alphanumeric code, unique to your State. Use this API with these values and obtain the access-
token. Copy this token and use it further to validate your API calls.
Step to Use access-token:
1. Copy the access-token value received in the Authentication API
2. Include ‘Authorization : Bearer <access-token>’ in the header of the all the other APIs.
3. That’s all! In case of any error, try checking your parameters.
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/get-access-token
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Body:
{
“clientId” : ””,
“clientSecret” : ””
}
(clientId and clientSecret will be provided by ODAS team with respect to your state. )
Response:
{
“access-token” : “”,
“expiresIn” : ,
“refreshExpiresIn” : ,
“refreshToken” : “”,
“tokenType” : “”
}
(access-token received here is to be used in further APIs for Authorization.)
Parameters:
Params Required Description Data type Format if any
email Yes This field specifies the Email of the nodal String Proper format for email is to be
contact person. followed
firstname Yes This field specifies the First name of the nodal String
contact person.
lastname No This field specifies the Last name of the nodal String
contact person.
middlename No This field specifies the Last name of the nodal String
contact person (if any)
mobilenumber Yes This field specifies the Mobile number of the String A valid 10 digit mobile number
nodal contact person.
salutation Yes This field takes the salutation of the Nodal String Accepted values are – Dr. / Ms.
Contact Person. / Mr.
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-facility-info
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
“facility” : {
“address” : {
“addressLine1” : “”,
“addressLine2” : “”,
“city” : “”,
“district” : “”,
“pincode” : “”,
“state” : “”,
“subdistrict” : “”
},
“facilitysubtype” : “”,
“facilitytype” : “”,
“id” : “”,
“langitude” : “”,
“latitude” : “”,
“name” : “”,
“ownershipsubtype” : “”,
“ownershiptype” : “”
},
“nodalcontacts” : [
{
“countrycode” : “”,
“designation” : “”,
“email” : “”,
“firstname” : “”,
“lastname” : “”,
“middlename” : “”,
“mobilenumber” : “”,
“salutation” : “”
}
],
“requestId” : “”,
“timestamp” : “”
}
Response:
{
“odasfacilityid” : “”,
“referencenumber” : “”,
“status” : “”
}
Parameters:
Params Required Description Data type Format if any
no_gen_beds Yes This field specifies the number of General Beds String Whole Number,
with oxygen available at your facility/hospital. 0 if not available
no_hdu_beds Yes This field specifies the number of HDU (High String Whole Number,
Dependency Units) beds available at your 0 if not available
facility/hospital.
no_icu_beds Yes This field specifies the number of ICU Sting Whole Number,
(Intensive Care Units) beds available at your 0 if not available
facility/hospital.
no_o2_concentrators Yes This field specifies the number of oxygen String Whole Number,
concentrators available at your facility/hospital. 0 if not available
no_vent_beds Yes This field specifies the number of Ventilators String Whole Number,
available at your facility/hospital. Please Note: 0 if not available
number of ventilators cannot be more than the
number of ICU beds.
facilityid Yes This field specifies the Facility Id unique to String ODAS Id generated after
ODAS system. successful data update using
Update Facility Information API
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-facility-bed-info
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
"beds": {
"no_gen_beds" : "",
"no_hdu_beds" : "",
"no_icu_beds" : "",
"no_o2_concentrators" : "",
"no_vent_beds": ""
},
"facilityid" : "",
"requestId" : "",
"timestamp" : ""
}
Response:
{
"referencenumber" : "",
"status" : ""
}
Parameters:
Params Required Description Data type Format if any
facilityid This field specifies the Facility Id unique to String ODAS Id generated after
ODAS system. successful data update using
Update Facility Information API
cylinder_a_type_capacity Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
A available Cylinder Type A available at your
hospital/facility
cylinder_a_type_yn Yes This field specifies whether Cylinder Type A is String Y/N
available at your hospital/facility or not
cylinder_b_type_capacity Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
B available Cylinder Type B available at your
hospital/facility
cylinder_b_type_yn Yes This field specifies whether Cylinder Type B is String Y/N
available at your hospital/facility or not
cylinder_c20_type_capac Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
ity C 2.0 available Cylinder Type C 2.0 available at your
hospital/facility
cylinder_c20_type_yn Yes This field specifies whether Cylinder Type C String Y/N
2.0 is available at your hospital/facility or not
cylinder_c35_type_capac Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
ity C 3.5 available Cylinder Type C 3.5 available at your
hospital/facility
cylinder_c35_type_yn Yes This field specifies whether Cylinder Type C String Y/N
3.5 is available at your hospital/facility or not
cylinder_c45_type_capac Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
ity C 4.5 available Cylinder Type C 4.5 available at your
hospital/facility
cylinder_c45_type_yn Yes This field specifies whether Cylinder Type C String Y/N
4.5 is available at your hospital/facility or not
cylinder_d6_type_capaci Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
ty D 6.0 available Cylinder Type D 6.0 available at your
hospital/facility
cylinder_d6_type_yn Yes This field specifies whether Cylinder Type D String Y/N
6.0 is available at your hospital/facility or not
cylinder_d7_type_capaci Yes - if Cylinder Type This field specifies the count/capacity of String Whole number
ty D 7.0 available Cylinder Type D 7.0 available at your
hospital/facility
cylinder_d7_type_yn Yes This field specifies whether Cylinder Type D String Y/N
7.0 is available at your hospital/facility or not
lmo_available_yn Yes This field specifies whether LMO (Liquid String Y/N
Medical Oxygen) tank is available at your
hospital/facility or not
lmo_current_stock Yes - if LMO available This field specifies the LMO - Current stock (in String Real number
MT) available at your hospital/facility
lmo_storage_capacity Yes - if LMO available This field specifies the LMO - Storage capacity String Real number
(in MT) available at your hospital/facility
psa_available_yn Yes This field specifies whether PSA(Pressure String Y/N
Swing Adsorption) Oxygen plant is available
at your hospital/facility or not
psa_gen_capacity Yes - if PSA available This field specifies the PSA plant’s Generation String Real number
capacity (in MT)
psa_has_mgp_option_yn Yes This field specified whether your String Y/N
hospital/facility has MGP(Medical Gas
Pipeline) option available at your
hospital/facility or not.
psa_has_refil_option_yn Yes This field specifies whether the PSA plant String Y/N
allows cylinder refilling as well or not.
psa_storage_capacity Yes - if PSA available This field specifies the PSA plant’s Storage String Real number
capacity (in MT)
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-facility-o2-infra
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
"facilityid" : "",
"o2Infra" : {
"cylinder_a_type_capacity" : "",
"cylinder_a_type_yn" : "",
"cylinder_b_type_capacity" : "",
"cylinder_b_type_yn" : "",
"cylinder_c20_type_capacity" : "",
"cylinder_c20_type_yn" : "",
"cylinder_c35_type_capacity" : "",
"cylinder_c35_type_yn" : "",
"cylinder_c45_type_capacity" : "",
"cylinder_c45_type_yn" : "",
"cylinder_d6_type_capacity" : "",
"cylinder_d6_type_yn" : "",
"cylinder_d7_type_capacity" : "",
"cylinder_d7_type_yn" : "",
"lmo_available_yn" : "",
"lmo_current_stock" : "",
"lmo_storage_capacity" : "",
"psa_available_yn" : "",
"psa_gen_capacity" : "",
"psa_has_mgp_option_yn" : "",
"psa_has_refil_option_yn" : "",
"psa_storage_capacity" : ""
},
"requestId" : "",
"timestamp" : ""
}
Response:
{
"referencenumber" : "",
“status" : ""
}
Parameters:
Params Required Description Data type Format if any
no_gen_beds Yes This field specifies the number of general beds with String Whole number
oxygen occupied on the mentioned date
no_hdu_beds Yes This field specifies the number of HDU (High String Whole number
Dependency Units) beds occupied in a given date
no_icu_beds Yes This field specifies the number of ICU (Intensive String Whole number
Care Units) beds occupied in a given date
no_o2_concentrators Yes This field specifies the number of Oxygen String Whole number
Concentrators occupied in a given date
no_vent_beds Yes This field specifies the number of ventilators String Whole number
occupied in a given date
facilityid Yes This field specifies the Facility Id unique to ODAS String ODAS Id generated after
system. successful data update using
Update Facility Information API
occupancyDate Yes This field specifies the Date for which the String "YYYY-MM-DD"
occupancy is being updated
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-bed-occupancy-info
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
"beds": {
"no_gen_beds" : "",
"no_hdu_beds" : "",
"no_icu_beds" : "",
"no_o2_concentrators" : "",
"no_vent_beds" : ""
},
"facilityid" : "",
"occupancyDate" : "",
"requestId" : "",
"timestamp" : ""
}
Response:
{
"referencenumber" : "",
"status" : ""
}
Accuracy flag – This field captures a flag value which is updated by the hospital/facility with respect to the total
estimated oxygen demand. If the estimation is correct according to the hospital/facility then flag value needs to
be “Accurate”. If the hospital/facility feels the oxygen estimation is more than what they require
(Overestimated) then flag value becomes “Over”. Similarly, if the hospital/facility feels the oxygen estimation is
less than what they require (Underestimated) then flag value becomes “Under”.
In case of “Over”, you are required to specify by how much the hospital/facility wants to reduce the demand by.
This value will come in “over_estimated_by” field. The value in this field cannot be greater than the total oxygen
estimated by your system.
In case of “Under”, you are required to specify by how much the hospital/facility wants to increase the demand
by. This value will come in “under_estimated_by” field. The value in this field cannot be greater than the total
oxygen estimated by your system.
If your system captures hospital/facility’s remarks on the demand estimation then that value should be captures
in “accuracy_remarks”.
Parameters:
Params Required Description Data type Format if any
accuracy_remarks No This field specifies the remarks entered by the String Free text
hospital/facility on the demand estimation
demand_accuracy_flag Yes This field specifies the Accuracy flag captured String value can be -
by your system with respect to oxygen demand Accurate/Over/Under
estimated for the hospital/facility.
demand_for_date Yes This field capture the Date for which the String YYYY-MM-DD
demand is estimated
demand_raised_date Yes This field captures the Date when the demand String in UTC
is being estimated
over_estimated_by Yes - if accuracy This field specifies the reduction in demand (or String It should be in numeric
flag = Over by how much the total has been overestimated
by) as stated by the hospital/facility in your
system (in MT)
total_estimated_demand Yes This field specifies the total estimated demand String It should be in numeric
being calculated by your system for the
hospital/facility.
under_estimated_by Yes - if accuracy This field specifies the increment in demand (or String It should be in numeric
flag = Under by how much the total has been
underestimated by) as stated by the
hospital/facility in your system (in MT)
facilityid Yes This field specifies the Facility Id unique to String ODAS Id generated after
ODAS system. successful data update using
Update Facility Information API
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-facility-oxygen-demand
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
"demandInfo": {
"accuracy_remarks" : "",
"demand_accuracy_flag" : "",
"demand_for_date" : "",
"demand_raised_date" : "",
"over_estimated_by" : "",
"total_estimated_demand" : " ",
"under_estimated_by" : ""
},
"facilityid" : "",
"requestId" : "",
"timestamp" : ""
}
Response:
{
"referencenumber" : "",
"status" : ""
}
Parameters:
Params Required Description Data type Format if any
consumption_for_date Yes This field specifies the Date for which the String "YYYY-MM-DD"
oxygen consumption details are being updated
for your hospital/facility.
consumption_updated_d Yes This field specifies the Date on which the String "YYYY-MM-DD"
ate oxygen consumption details are being updated
for your hospital/facility.
total_oxygen_consumed Yes This field specifies the total oxygen consumed String Real number
on the specified consumption_for_date (in MT)
total_oxygen_delivered Yes This field specifies the total oxygen delivered on String Real number
the specified consumption_for_date (in MT)
total_oxygen_generated Yes This field specifies the total oxygen generated String Real number
on the specified consumption_for_date (in MT)
facilityid Yes This field specifies the Facility Id unique to String ODAS Id generated after
ODAS system successful data update using
Update Facility Information API
requestId Yes This field will be a 36 character UUID. String 36 character UUID
timestamp Yes Timestamp of the instance the API is called. String It should be in GTC format
Specifications:
URL: https://oxygen.nha.gov.in/ODAS/v1.0/odas/update-facility-oxygen-consumption
Request Method: POST
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <access-token>
Body:
{
"consumptionInfo" : {
"consumption_for_date" : "",
"consumption_updated_date" : "",
"total_oxygen_consumed" : "",
"total_oxygen_delivered" : "",
"total_oxygen_generated" : ""
},
"facilityid" : "",
"requestId" : "",
"timestamp" : ""
}
Response:
{
"referencenumber" : "",
"status" : ""
}
Masters
Please refer to the following master data set for “facilitytype”, “ownershiptype” and “ownershipsubtype”. Please make sure to send
the code while consuming the API.
1. Facility Types