Introduction
The MocDoc API provides secure, structured access to the MocDoc healthcare platform, enabling external systems to interact programmatically using REST-based endpoints. The API follows standard REST architecture principles including:
- Resource-oriented URLs
- Standard HTTP methods (GET, POST, PUT, DELETE)
- JSON-formatted responses
- Conventional HTTP response and error codes
Authentication & Security
Authentication is implemented using an HMAC-based signing mechanism. Each request must include the required headers and be transmitted over a secure TLS connection to ensure data integrity and confidentiality.The API supports integration across core operational and clinical workflows, including:
- Locations, Users, Providers, Doctors, and Referrals
- Patient registration and demographic updates
- OP bill and pharmacy bill creation
- Appointments (book / update status)
- Lab orders and results retrieval
- Stock and inventory management
- Visit patient images and teleconsultation
Usage Guidelines
- No fixed daily limit on total API calls.
- Data retrieval APIs follow a one-day-per-call model.
- Date range retrieval must be handled programmatically via looping.
- Minimum interval: One request every 3 seconds.
These guidelines ensure secure, scalable, and reliable interoperability between MocDoc and external systems.
HMAC Authentication
You can authenticate HTTP requests by using the HMAC-SHA1 authentication scheme. (HMAC refers to hash-based message authentication code.) These requests must be transmitted over TLS.
Prerequisites
- Credential - Access Key ID
- Secret - base64 decoded Access Key Value
Provide each request with all HTTP headers required for authentication. The minimum required are:
| Request Header | Description |
|---|---|
| Date | Date and time at which the request was originated. It can't be more than 15 minutes off from the current Coordinated Universal Time (Greenwich Mean Time). |
| Content-Type | The Content-Type representation header is used to indicate the original media type of the resource. |
| Authorization | Authentication information required by the HMAC-SHA1 scheme. Format and details are explained later in this article. |
Authorization header syntax
Authorization: MD ${accesskey}:${signature}
| Argument | Description |
|---|---|
| Accesskey | Accesskey key given by MocDoc |
| Signature | base64 encoded HMACSHA256 of String-To-Sign. (required) |
Credential
ID of the access key used to compute the signature.
Signed headers
HTTP request header names, separated by semicolons, required to sign the request. These HTTP headers must be correctly provided with the request as well. Don't use white spaces.
Required HTTP request headers
x-ms-date [or Date]; host;x-ms-content-sha256
Any other HTTP request headers can also be added to the signing. Just append them to the SignedHeaders argument.
Example
Date: Wed, 09 Aug 2023 12:57:34 GMT; Authorization: MD your_accesskey:signature;
Content-Type:application/x-www-form-urlencoded.Signature
Base64 encoded HMACSHA256 hash of the String-To-Sign. It uses the access key identified by Credential.
base64_encode(HMACSHA256(String-To-Sign, Secret))
String-To-Sign
It is a canonical representation of the request:
String-To-Sign =
HTTP_METHOD + '\n' + path_and_query + '\n' + signed_headers_values
| Argument | Description |
|---|---|
| HTTP_METHOD | Uppercase HTTP method name used with the request. |
| path_and_query | Concatenation of request absolute URI path and query string. |
| signed_headers_values | Semicolon-separated values of all HTTP request headers listed in SignedHeaders. The format follows SignedHeaders semantics. |
Example
string-To-Sign= "POST" + '\n\n' + "application/x-www-form-urlencoded" + '\n' // VERB "Fri, 11 May 2018 18:48:36 GMT"+'\n\n'+"/api/locationlist/entitykey" //signed_headers_values
Example Request
Status Code
- 200 - Authentication Successful
- 401 - Authentication Failed
Example Javascript code to generate signature
Errors & Response Code
MocDoc uses conventional HTTP response codes to indicate the success or failure of an API request.
| Status Code | Description |
|---|---|
| 200 - Ok | Everything worked as expected. |
| 400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
| 401 - Unauthorized | No valid API key provided. |
| 402 - Request Failed | The parameters were valid but the request failed. |
| 403 - Forbidden | The API key doesn't have permissions to perform the request. |
| 404 - Not Found | The requested resource doesn't exist. |
| 409 - Conflict | The request conflicts with another request (perhaps due to using the same idempotent key). |
| 429 - Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
| 500, 502, 503, 504 - Server Errors | Something went wrong on MocDoc's end. (These are rare.) |
Locations
GET https://mocdoc.com/api/locationlist/{EntityKey}
This API provides information about a list of locations associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| entitylocation | string | location1 | Unique Key for location |
| landmark | string | near temple | Nearby landmark place |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/locationlist/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"entitylocations":[
{
....
}
]
}
Users
POST https://mocdoc.com/api/get/userlist/{EntityKey}
This API provides list of users associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Entity location | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Lavanya | Doctor's name |
| created_at | string | 2019030718:57:27 | Created At Format: YYYYMMDDHH:mm:ss |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid entitylocation
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/userlist/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"users":[
{
....
}
]
}
Provider
POST https://mocdoc.com/api/get/provider/{EntityKey}
This API provides list of providers associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Entity location | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| type | string | test | Provider type |
| subtype | string | test | Provider subtype |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid entitylocation
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/provider/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"Provider":[
{
....
}
]
}
Doctors
POST https://mocdoc.com/api/get/dr/{EntityKey}
This API provides doctor's associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Entity location | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Arthi B | Doctor's name |
| drkey | string | Unique key of the doctor | |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid entitylocation
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/dr/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"dr":[
{
....
}
]
}
Referrals
POST https://mocdoc.com/api/masters/referrals/{EntityKey}
This API is to get referrals list associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| referral_name | string | SenthilNathan | Referral Name |
| referral_mobile | integer | 9003245123 | Referral Mobile Number |
| referral_key | string | Referral Key |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/masters/referrals/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Investigations
POST https://mocdoc.com/api/masters/testprofiles/{EntityKey}
This API is to get test & profile list associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| labResources | array | Lab Resources | |
| labProfiles | array | Lab Profiles | |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/masters/testprofiles/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Packages
GET https://mocdoc.com/api/get/packages/{EntityKey}
This API is to get the packages list associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| entitykey | string | itooth | EntityKey |
| expirydate | string | 20401222 | Date of Expiry Format: YYYYMMDD |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/packages/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Rateplan List
GET https://mocdoc.com/api/get/rateplan/{EntityKey}
This API is to get the Rateplan list associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | itooth Default Rate Plan | Name of the Rate Plan |
| rateplankey | string | RateplanKey |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/rateplan/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Rateplan Details
GET https://mocdoc.com/api/get/rateplan/{RatePlanKey}/{EntityKey}
This API is to get the Rateplan Details associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | itooth Default Rate Plan | Name of the Rate Plan |
| entitykey | string | itooth | EntityKey |
| Treatments | string |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/rateplan/sathish-kumar-demo_new/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Products
GET https://mocdoc.com/api/list/products/{EntityKey}
This API provides information about a list of products associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Dolo 650 | Product name |
| purprice | integer | 10.00 | Purchase price of the product |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/list/products/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"products":[
{
....
}
]
}
Stores
GET https://mocdoc.com/api/list/stores/{EntityKey}
This API provides information about a list of Stores associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Vadapalani | Name of the Store |
| entitylocation | string | location1 | Unique key for location |
Status Code
- 200 - Success
- 403 - Unauthorized Entry
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/list/stores/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"stores":[
{
....
}
]
}
Patient Creation
POST https://mocdoc.com/api/register/patient/{EntityKey}
This API register the patient associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| phid | string | 20211209_001 | Patient Id |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/register/patient/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":{
"phid":"BH44837"
}
}
Update Patient
POST https://mocdoc.com/api/update/patient/{EntityKey}
This API update the patient list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | Optional |
| phid | string | Patient ID | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Request Parameters
No parameters.
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/update/patient/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"Patient detail updated successfully",
}
OP Bill Creation
POST https://mocdoc.com/api/lims/laborder/create/{EntityKey}
This API to create a bill for the patient associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| patientkey | string | Patient Key | |
| patientid | string | Patient ID | |
| doctorkey | string | Doctor Key | |
| billkey | string | Bill Key |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Authentication Failed
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/lims/laborder/create/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Pharmacy Bill Creation
POST https://mocdoc.com/api/pharmacy/bill/save/{EntityKey}
This API provides information to create a pharmacy bill associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| patientname | string | Name of the patient | ✅ Yes |
| patientmobile | string | Patient Mobile number | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billkey | string | Bill Key |
Status Code
- 200 - Success
- 400 - Quantity exceeds current stock quantity
- 403 - Unauthorized Entry
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/pharmacy/bill/save/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"info":[
{
....
}
]
}
Patient Info
POST https://mocdoc.com/api/patientinfo/{EntityKey}
This API is to get the demographic and geographic info of a registered patient.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| phid | string | Patient Id | ✅ Yes |
| mobile | integer | Patient Mobile Number | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Razmul | Patient Name |
| phid | string | 201707_001 | Patient Id |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/patientinfo/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Book Appointment
POST https://mocdoc.com/api/bookappt/{EntityKey}
This API creates appointment associated with the entity,location and doctor.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| fname | string | First name of the patient | ✅ Yes |
| phone | string | Phone number of the patient | ✅ Yes |
| .... | .... | .... |
Content Type : application/json
Response
No parameters.
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/bookappt/sathish-kumar-demo
Example Response
{
"status":"200",
"apptkey":"itooth-nathankps2023020304:00",
}
Update Appointment Status
POST https://mocdoc.com/api/appt/updatestatus/{EntityKey}
This API creates appointment associated with the entity,location and doctor.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| apptkey | string | Appointment Key | ✅ Yes |
| status | string | Status of appointment | ✅ Yes |
| totalamt | integer | Total Amount | Optional |
| amount_paid | integer | Amount Paid | Optional |
Content Type : application/json
Response
No parameters.
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/appt/updatestatus/sathish-kumar-demo
Example Response
{
"status":"200",
"Message":"Success",
}
Current Stock
GET https://mocdoc.com/api/currentstock/{EntityKey}/{StoreKey}
This API provides information about a Current Stock of Stores associated with the entity.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| prodkey | string | Unique key of the product | |
| qty | integer | 1 | Quantity of the product |
| storesection | object | Store section of the product | |
| reorderlevel | integer | 1 | Recorder level of the product |
Status Code
- 200 - Success
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/currentstock/sathish-kumar-demo/sathish-kumar-demolocation1_store-one
Example Response
{
"status":"200",
"message":"success",
"currentstock":[
{
....
}
]
}
Current Stock - Batchwise
GET https://mocdoc.com/api/stocks/listbatch/{EntityKey}/{EntityLocation}/{StoreKey}/{ProdKey}
This API provides information about a batches of product in particular store associated with the entity and location.
Request Parameters
No parameters.
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| purprice | integer | 200.00 | Purchase price of the product |
| purpriceafterded | integer | 200.00 | Purchase price after deduction |
| .... | .... | .... |
Status Code
- 200 - Success
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/stocks/listbatch/sathish-kumar-demo/location1/sathish-kumar-demolocation1_store-one/sathish-kumar-demo_1
Example Response
{
"status":"200",
"message":"success",
"products":[
{
....
}
]
}
Patient Registration
POST https://mocdoc.com/api/get/ptlist/{EntityKey}
This API provides information about the list of patients registered for the given date associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| registrationdate | string | Registration Date | ✅ Yes |
| entitylocation | string | Entity location for the patient | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Raj | Patient Name |
| phid | string | 20211209_001 | Patient Id |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date
- 402 - Invalid entitylocation
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/ptlist/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"visits":[
{
....
}
]
}
O/P Visits
POST https://mocdoc.com/api/get/visitdata/{EntityKey}
This API provides information about the list of patient visits for the given date associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| date | string | Date of Visit | ✅ Yes |
| entitylocation | string | Unique key for location of Visit | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| location | string | location2 | Unique key for location of Visit |
| date | string | 20211209 | Date of Visit Format: YYYYMMDD |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date
- 402 - Invalid entitylocation
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/visitdata/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"visits":[
{
....
}
]
}
Checked In
POST https://mocdoc.com/api/checkedin/{EntityKey}
This API is to get checked-in patient list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| startdate | string | Start Date Format: YYYYMMDD Ex: 20120611 |
✅ Yes |
| enddate | string | End Date Format: YYYYMMDD Ex: 20120612 |
✅ Yes |
| speciality | string | Cardiac surgeon | Optional |
| drdept | string | Inpatient service | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| checkinkey | string | itooth20211230_002_2022080511:02:20 | Checkin Key |
| speciality | string | 'Orthopaedic Surgeon' | Speciality |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/checkedin/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"checkedin":[
{
....
}
]
}
Calendar API
POST https://mocdoc.com/api/calendar/{EntityKey}
This API is to get doctor's calendar associated with the entity & doctor.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| drkey | string | Dr key | ✅ Yes |
| startdate | string | Start Date Format: YYYYMMDD Ex: 20120712 |
✅ Yes |
| enddate | string | End Date Format: YYYYMMDD Ex: 20120713 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| drkey | string | Unique key of the dr | |
| drname | string | Senthilnathan | DrName |
| slots | array | TimeSlots |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/calendar/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
{
[
"drKey":"itooth-nathankps",
"drName":"Senthilnathan Periasamy",
"slots":[
{
....>
}
]
]
}
Request Parameters
POST https://mocdoc.com/api/get/ipadmission/{EntityKey}
This API is to get IP Admission list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date of admission Format: YYYYMMDD Ex: 20221109 |
✅ Yes |
| drdept | string | Inpatient service | Optional |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| firstvisit_time | string | 18:44 | First Visit Time Format: HH:MM |
| firstvisit_date | string | 20211222 | First Visit Data Format: YYYYMMDD |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/ipadmission/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"ipadmission": [
{
...
}
]
}
I/P Discharges
POST https://mocdoc.com/api/get/ipdischarge/{EntityKey}
This API is to get IP Discharge list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date of discharge Format: YYYYMMDD Ex: 20110218 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| ipno | integer | 317 | IP number |
| phid | string | 20211222_001 | Patient ID |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/ipdischarge/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"ipdischarge": [
{
...
}
]
}
I/P Room Transfers
POST https://mocdoc.com/api/get/transferroom/{EntityKey}
This API is to get Transfer Room list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date of discharge Format: YYYYMMDD Ex: 20110918 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| roomallocationkey | string | itoothlocation1_9_907_962772021122319:04:50 | Room Allocation Key |
| created_at | string | 2021122319:04:50 | Created at Format: YYYYMMDDHH:MM |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/transferroom/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"transferroomlist": [
{
...
}
]
}
Bills
POST https://mocdoc.com/api/get/billlist/{EntityKey}
This API is to get Bill list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20221108 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billtype | string | O/P | Bill Type |
| consultant | string | Dr. S.Rekha B.D.S | Consultant |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/billlist/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"billinglist": [
{
...
}
]
}
Bills-Detailed
POST https://mocdoc.com/api/get/billlist/detailed/{EntityKey}
This API is to get Bill list detailed associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex:20220304 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| entitylocation | string | location1 | Unique key for location |
| receivedby | string | Receivedby | |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/billlist/detailed/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"billinglist_detailed": [
{
...
}
]
}
Edited-Bills
POST https://mocdoc.com/api/get/editedbills/{EntityKey}
This API is to get Edited Bill list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20220908 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| edited_at | string | 2019080514:27:14 | Edited at Format: YYYYMMDDHH:MM:SS |
| bill_no | string | OP2122-111 | Bill no |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/editedbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"editedbills": [
{
...
}
]
}
OP/IP Cancelled Bills
POST https://mocdoc.com/api/get/opipcancelledbills/{EntityKey}
This API is to get OP/IP cancelled bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billno | string | OP2526-111 | Cancelled bill number |
| cancelreason | string | Duplicate bill | Cancellation reason |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/opipcancelledbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"cancelledbills": [
{
...
}
]
}
Stock Sale Cancelled Bills
POST https://mocdoc.com/api/get/stocksalecancelledbills/{EntityKey}
This API is to get stock sale cancelled bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billno | string | PHARM2526-74 | Cancelled pharmacy bill number |
| cancelreason | string | Wrong product | Cancellation reason |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/stocksalecancelledbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"cancelledsalebills": [
{
...
}
]
}
Stock Sale Return Cancelled Bills
POST https://mocdoc.com/api/get/stocksalereturncancelledbills/{EntityKey}
This API is to get stock sale return cancelled bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billno | string | RET2526-11 | Cancelled return bill number |
| amount_returned | number | 150.00 | Returned amount |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/stocksalereturncancelledbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"cancelledsaleretbills": [
{
...
}
]
}
OP/IP Discounted Bills
POST https://mocdoc.com/api/get/opipdiscountedbills/{EntityKey}
This API is to get OP/IP discounted bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billno | string | OP2526-111 | Discounted bill number |
| discount_amount | number | 120.00 | Discount amount |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/opipdiscountedbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"discountedbills": [
{
...
}
]
}
Stock Sale Discounted Bills
POST https://mocdoc.com/api/get/stocksalediscountedbills/{EntityKey}
This API is to get stock sale discounted bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billno | string | PHARM2526-74 | Discounted pharmacy bill number |
| discount_amount | number | 35.00 | Discount amount |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/stocksalediscountedbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"pharmdiscountedbills": [
{
...
}
]
}
Refund Bills
POST https://mocdoc.com/api/get/refundbills/{EntityKey}
This API is to get refund bills associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20260218 | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| refund_no | string | RF2526-10 | Refund number |
| refund_amount | number | 250.00 | Refunded amount |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/refundbills/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"refundedbills": [
{
...
}
]
}
Pharmacy Bills
POST https://mocdoc.com/api/get/pharmacybill/{EntityKey}
This API is to get Pharmacy Bill list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Bill date Format: YYYYMMDD Ex: 20220809 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Raj | Patient name |
| patientkey | string | Patient Key | |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/pharmacybill/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"pharmbilllist": [
{
...
}
]
}
Lab Orders
POST https://mocdoc.com/api/orderlist/{EntityKey}
This API is to get lab orders list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| date | string | Date of Order Format: YYYYMMDD Ex: 20220908 |
✅ Yes |
| starttime | string | Start Time of Order Format: HH:MM Ex: 22:00 |
✅ Yes |
| endtime | string | End Time of Order Format: HH:MM Ex: Ex: 22:30 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | Bill Paid | Order Status(Bill Paid, Sample Taken, Completed, Verified, Approved, Printed) |
| orderdate | string | 2022071315:34:31 | Bill date Format: YYYYMMDDHH:MM |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/orderlist/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"orders": [
{
...
}
]
}
Test Result
POST https://mocdoc.com/api/orderresult/{EntityKey}
This API is to get order result associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| date | string | Date of Test result Format: YYYYMMDD Ex: 20220908 |
✅ Yes |
| orderkey | string | Order Key | Optional |
| starttime | string | Start Time of Test result Format: HH:MM Ex: 22:00 |
✅ Yes |
| endtime | string | End Time of Test result Format: HH:MM Ex: 22:30 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| orderkey | string | Order Key | |
| results | array | ||
| entitykey | string | itooth | Entity Key |
| entitylocation | string | location1 | Unique key of the location |
| patientkey | string | Patient Key |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/orderresult/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"orderresult": [
{
...
}
]
}
Order Create
POST https://mocdoc.com/api/hl7/laborder/create/{EntityKey}/{EntityLocation}
This API is to create the order associated with the entity and location.
HL7 Message
MSH|^~\&|EHOSPITAL|600^BU10|IP||20220823101146||OML^O21|BC-2308220191|P|2.4|||AL|AL||84302
PID|||2201007||Ms. LEELA||1967-02-16|Female|||^^^^^AE||1234567890||E|M|OPD|sivakumar
ORC|NW|202200000000099762||1||1||NM-HIGH DOSE THERAPY WARD||261||Grnd Floor Collection Centre|R||2022-07-29 16:34:54.456439|General Ward Male|Clinical Heamotology Division|Surgical Oncology
OBR|BC-2308220191||18_104_TSH_0.34-5.06_mIU/mL_525021_2022_0_0_nill||20220823092808|||||A||||Serum|5000000167^Dr. RAHUL A S^CB-GEN/86692/202223, Dt:2022-08-23 09:34:06>058898+05:30, Amt: Rs. 230^
OBR|BC-2308220191||18_107_TG (Thyro globulin)_1.59-50.03_ng/mL_525021_2022_0_0_nill||20220823092808|||||A||||Serum|5000000167^Dr. RAHUL A S^CB-GEN/86692/202223, Dt:2022-08-23 09:34:06.058898+05:30, Amt: Rs. 450^
OBR|BC-2308220191||18_26_CALCIUM_8.40-10.20_mg/dL_525021_2022_0_0_nill||20220823092808|||||A||||Serum|5000000167^Dr. RAHUL A S^CB-GEN/86692/202223, Dt:2022-08-23 09:34:06.058898+05:30, Amt: Rs. 120^
OBR|BC-2308220191||18_16_ALBUMIN_3.50-5.00_g/dL_525021_2022_0_0_nill||20220823092808|||||A||||Serum|5000000167^Dr. RAHUL A S^CB-GEN/86692/202223, Dt:2022-08-23 09:34:06.058898+05:30, Amt: Rs. 60^Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| patientkey | string | Patient Key | |
| patientid | string | 20211209_001 | Patient ID |
| doctorkey | string | Doctor Key | |
| billkey | string | Bill Key |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 402 - Invalid date or Invalid location
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/hl7/laborder/create/sathish-kumar-demo/location1
Example Response
{
"data": {
"patientkey": "sathish-kumar-demo2201007",
"patientid": "2201007",
"doctorkey": "sathish-kumar-demo-dr-rahul--a-s",
"billkey": "sathish-kumar-demo2201007_2022082310:08:33_64980"
},
"status": "200",
"message": "success"
}
Tele Consultation Doctor
POST https://mocdoc.com/api/telecon/get/drs/{EntityKey}
This API list Tele consultation doctor associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| title | string | Dr | Docter title |
| name | string | Tazeen Fathima | Docter name |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/telecon/get/drs/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
[
{
...
}
]
}
Tele Consultation Doctor slot
POST https://mocdoc.com/api/telecon/dr/slots/{DrKey}
This API list Tele consultation doctor slot associated with the entity and doctor key.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| startdate | string | Start Date Format: YYYYMMDD Ex: 20221109 |
✅ Yes |
| enddate | string | End Date Format: YYYYMMDD Ex: 20221110 |
✅ Yes |
| drkey | string | Unique key of the doctor | ✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| drslots | array | ||
| drkey | string | Dr key | |
| entitykey | string | itooth | Entity key |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/telecon/dr/slots/itooth-nathankps
Example Response
{
"status":"200",
"message":"success",
[
{
...
}
]
}
Tele consultation Patient List
POST https://mocdoc.com/api/telecon/patientlist/{Mobile}/{EntityKey}
This API list Tele consultation patient list associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| mobile | integer | Patient mobile number Ex: 1234123412 |
✅ Yes |
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| Title | string | Mr | Patient Title |
| credit_provider | string | sampoorna-suraksha-insurance | Credit Provider |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/telecon/patientlist/****8713/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
[
{
...
}
]
}
Tele consultation Book Appointment
POST https://mocdoc.com/api/telecon/book/appt/{Doctorkey}/{EntityKey}
This API Tele consultation book appointment associated with the entitykey.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| drkey | string | Doctor key | ✅ Yes |
| entitykey | string | Entity key | ✅ Yes |
| .... | .... | .... |
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| dr | string | Senthilnathan | Dr name |
| date | string | 20221013 | Date of appointment Format: YYYYMMDD |
| slot | string | 21:00 | start slot time Format: HH:MM |
Status Code
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/telecon/book/appt/itooth-nathankps/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
[
{
...
}
]
}
Tele consultation Block slot
POST https://mocdoc.com/api/telecon/block/slot/{Doctorkey}/{EntityKey}
This API block tele consultation slot associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| drkey | string | Doctor key | ✅ Yes |
| entitykey | string | Entity key | ✅ Yes |
| date | string | Appointment Date Format: YYYYMMDD Ex: 20221110 |
✅ Yes |
| slotstart | string | start slot time Format: HH:MM Ex: 22:00 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| cachekey | string | itooth-nathankps_20221013_21:00 | cachekey |
| entitykey | string | itooth | Entity key |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Missed Fields
- 401 - Unauthorized access
- 402 - Validation Error
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/telecon/block/slot/itooth-nathankps/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
[
{
...
}
]
}
Visit Patient Images
POST https://mocdoc.com/api/visit/adddoc/{EntityKey}
This API is to get Visit Patient Images associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| Visitkey | string | Visit key | ✅ Yes |
| imagename | string | Image Name | ✅ Yes |
| imagecontent | base64 | Image Content | ✅ Yes |
| imagenote | string | Image Note | Optional |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| imagekey | string | Image key | |
| Visitkey | string | Visit key |
Status Code
- 200 - Success
- 400 - "Please provide are all the Required field"
- 401 - Unauthorized access
- 402 - name already exist please change the file name..!
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/visit/adddoc/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"patientdoc": [
{
...
}
]
}
Patient Images
POST https://mocdoc.com/api/addimg/{EntityKey}
This API is to get Patient Images associated with the entity.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| Patientkey | string | Patient key | ✅ Yes |
| imagename | string | Image Name | ✅ Yes |
| imagecontent | base64 | Image Content | ✅ Yes |
| imagenote | string | Image Note | Optional |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| imagekey | string | Image key | |
| Patientkey | string | Patient key |
Status Code
- 200 - Success
- 400 - Please provide are all the Required field
- 401 - Unauthorized access
- 402 - name already exist please change the file name..!
- 403 - Forbidden
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/addimg/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"patientdoc": [
{
...
}
]
}