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
- IVF and IUI form details
Usage Guidelines
- 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 retrieves the list of locations associated with the selected entity, along with their basic details such as location name, code, and other configured information.
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 retrieves the list of users associated with the selected entity, along with their basic profile information.
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 retrieves the list of billing providers associated with the selected entity, including insurance companies, corporate organizations, TPAs, and other payer organizations.
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 retrieves the list of doctors associated with the selected entity, along with their registration and profile details.
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 retrieves the list of referral sources associated with the selected entity, including referral doctors, clinics, hospitals, and other referral sources.
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 retrieves the list of laboratory tests and profiles configured for the selected 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 retrieves the list of healthcare packages configured for the selected 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 retrieves the list of rate plans configured for the selected 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 retrieves the complete details of the selected rate plan, including the applicable services and charges.
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 retrieves the list of products configured for the selected entity along with their basic information.
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 retrieves the list of stores configured for the selected 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 registers a new patient under the selected entity by creating a new patient record with the demographic and contact details provided in the request.
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 updates the demographic and contact information of an existing registered patient.
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":[
{
....
}
]
}
Get Patient Info
GET https://mocdoc.com/api/get/patient/{EntityKey}
This API is used to retrieve the details of a registered patient.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| mobile | integer | Patient Mobile Number | ✅ Yes |
Content Type : application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| name | string | Razmul | Patient Name |
| phid | string | 201707_001 | Patient Id |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Bad Request
- 401 - Unauthorized access
- 403 - Forbidden
- 404 - Patient Not Found
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/patient/1234567898
Example Response
{
"status":"200",
"message":"success",
"data":[
{
....
}
]
}
Patient Info
GET https://mocdoc.com/api/get/patient/{EntityKey}
POST https://mocdoc.com/api/patientinfo/{EntityKey}
This API retrieves the demographic and contact information 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":[
{
....
}
]
}
Patient Timeline
GET https://mocdoc.com/api/get/patienttimeline/{EntityKey}/{PatientKey}
This API retrieves the complete clinical timeline of a patient, including OP bills, IP bills, pharmacy bills, laboratory orders, visit notes, and other clinical activities.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| EntityKey | string | Entity key | ✅ Yes |
| PatientKey | string | Patient key without entity key prefix | ✅ Yes |
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| billing date | object | 20240101 | Patient timeline grouped by billing date |
| .... | .... | .... |
Status Code
- 200 - Success
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl https://mocdoc.com/api/get/patienttimeline/sathish-kumar-demo/2201007
Example Response
{
"20260525": {
"op": {
"itoothBH22137_2026052516:09:19": {
"opbill": {
"billingdate": "20260525",
"billnumber": "OP2627-223",
"billtype": "O/P",
"pttl_consultant": "Dr. Nirmal",
"pttl_amountreceived": "1750.00",
"pttl_amountpayable": "1750.00",
"pttl_paymenttype": "Cash",
"previousbalance": "0.00",
"pttl_billitems": {
"item1": {
"name": "Consultation",
"amount": "0.00",
"quantity": "1",
"discountamount": "0.00"
}
}
},
"pttl_laborders": {
"order1": {
"pttl_laborderkey": "itoothBH22137_2026052516:09:19_itoothlocation1dengue-duo",
"name": "DENGUE DUO"
}
},
"pttl_visit": {
"chiefcomplaints": "Consultation",
"generalexaminations": "",
"provisionaldiagnosis": ""
}
}
}
}
}
Book Appointment
POST https://mocdoc.com/api/bookappt/{EntityKey}
This API creates a new appointment for a patient with the selected doctor and location.
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
| Parameter | Type | Description |
|---|---|---|
| status | string | Response status code |
| apptkey | string | Internal appointment key Returned when: booking succeeds |
| recordkey | string | Appointment record key - the same format used by Update Appointment Status's apptkey and in appointment webhooks Returned when: booking succeeds |
| message | string | Reason the slot could not be booked Returned when: the requested slot is unavailable, or on a validation error |
| info | array | On a slot conflict: the appointment data that failed to book. On a validation error: the list of invalid/missing field names |
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
Success:
{
"status":"200",
"apptkey":"itooth-nathankps2023020304:00",
"recordkey":"D_1-20260710-11:00"
}
Booked Appointments
POST https://mocdoc.com/api/bookedappts/{EntityKey}
This API retrieves the list of booked appointments for the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| startdate | string | Start date and time Format: YYYYMMDDHH:MM:SS Ex: 2026070200:00:00 |
✅ Yes |
| enddate | string | End date and time Format: YYYYMMDDHH:MM:SS Ex: 2026070323:59:59 |
✅ Yes |
Content Type : application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| appt_datetime | string | 03/07/2026 08:30 PM | Appointment date and time |
| phid | string | 20250819_003 | Patient Hospital ID |
| name | string | Nithish | Patient name |
| mobile | string | 6369499551 | Patient mobile number |
| consultant | string | Dr. Senthilnathan Periasamy (Orthopaedic Surgeon) | Consultant name |
| purpose | string | Consultation | Purpose of appointment |
| booked_at | string | 02/07/2026 07:54 PM | Appointment booking date and time |
| booked_by | string | Sundar P | Name of the user who booked the appointment |
Status Code
- 200 - Success
- 400 - Missed Fields
- 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/bookedappts/sathish-kumar-demo
Example Response
{
"status":"200",
"message":"success",
"appointmentlist":[
{
....
}
]
}
Update Appointment Status
POST https://mocdoc.com/api/appt/updatestatus/{EntityKey}
This API updates the status of an existing appointment. It supports confirmed, pending, cancelled, noshow and rescheduled statuses. When the status is confirmed or pending, the payment information is also recorded (used when the appointment payment is collected through an external payment gateway). When the status is rescheduled, the response returns the new apptkey for the moved appointment.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| apptkey | string | Appointment key. Either the internal appointment key or the record key used in appointment webhooks. Ex: D_1-20211209-22:00 |
✅ Yes |
| status | string | Status to set on the appointment Allowed values: confirmed, pending, cancelled, noshow, rescheduled |
✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| .... | .... | .... |
Content Type : application/json
Response
| Parameter | Type | Description |
|---|---|---|
| status | string | Response status code |
| message | string | Response message |
| apptkey | string | New appointment key Returned when: status is rescheduled |
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
Confirmed / Pending / Cancelled / No-show:
{
"status":"200",
"message":"success"
}
Rescheduled:
{
"status":"200",
"message":"Appointment rescheduled",
"apptkey":"D_1-20260710-11:00"
}
Current Stock
GET https://mocdoc.com/api/currentstock/{EntityKey}/{StoreKey}
This API retrieves the current stock availability of products in the selected store.
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}
Batchwise: This API retrieves the batch-wise stock details of products available in the selected store.
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 retrieves the list of patients registered for the specified date.
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 retrieves the list of outpatient visits for the specified date.
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 retrieves the list of patients who have been checked in for consultation.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitykey | string | Entity key | ✅ Yes |
| entitylocation | string | Unique key for location | ✅ Yes |
| startdate | string | Start Date Format: YYYYMMDDHH:mm Ex: 2012061100:00 |
✅ Yes |
| enddate | string | End Date Format: YYYYMMDDHH:mm Ex: 2012061223:59 |
✅ 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 retrieves the appointment calendar of the selected 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":[
{
....>
}
]
]
}
I/P Admissions
POST https://mocdoc.com/api/get/ipadmission/{EntityKey}
This API retrieves the list of inpatient admissions for the specified date.
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 retrieves the list of inpatient discharges for the specified date.
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 retrieves the list of inpatient room transfer records for the specified date.
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 retrieves the list of bills generated for the specified location and date.
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 |
| provider_name | string | Arunkumar | Credit Provider Name |
| .... | .... | .... |
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 retrieves the detailed information of bills generated for the specified location and date, including bill items and payment details.
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 | |
| billed_amt | number | 350.00 | Billed Amount (gross, before discount) |
| discount_amt | number | 66.50 | Discount Amount |
| net_amt | number | 283.50 | Net Amount (after discount) |
| provider_name | string | Arunkumar | Credit Provider Name |
| .... | .... | .... |
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 retrieves the list of bills that were modified after their creation for the specified location and date.
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 retrieves the list of cancelled outpatient and inpatient bills for the specified location and date.
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 retrieves the list of cancelled pharmacy sales bills for the specified location and date.
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 retrieves the list of cancelled pharmacy sale return bills for the specified location and date.
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 retrieves the list of outpatient and inpatient bills on which discounts were applied for the specified location and date.
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 retrieves the list of discounted pharmacy sales bills for the specified location and date.
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 retrieves the list of refunded bills generated for the specified location and date.
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 retrieves the list of pharmacy bills generated for the specified location and date.
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 retrieves the list of laboratory orders created for the specified date.
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 retrieves the laboratory test results available for the specified date.
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 creates a laboratory order for the specified patient, generates the corresponding laboratory bill, assigns a sample ID, records the sample details, and updates the sample status to Sample Accepted.
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 retrieves the list of doctors available for teleconsultation under the selected 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 retrieves the available teleconsultation slots for the selected doctor.
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 retrieves the list of patients scheduled for teleconsultation.
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 books a teleconsultation appointment for the specified patient.
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 blocks a teleconsultation appointment slot for the selected doctor.
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 retrieves all images captured during a specific patient visit.
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 retrieves all images associated with a registered patient.
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": [
{
...
}
]
}
IVF Form Details
POST https://mocdoc.com/api/ivf/formdetails/{EntityKey}
This API retrieves the complete clinical records of an IVF treatment, including all information captured throughout the patient's IVF treatment lifecycle for the selected stage and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| startdate | string | Start date Format: YYYYMMDD Allowed range: within 90 days | ✅ Yes |
| enddate | string | End date Format: YYYYMMDD Allowed range: within 90 days | ✅ Yes |
| stage | string | IVF stage. Allowed values: profile, investigation, ovarianstimulation, eggpickup, embryology, embryologyfreezing, embryologytransfer, outcome | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| stage | string | profile | Requested IVF stage |
| list | array | IVF form records for the selected stage | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing, invalid date range, or invalid stage
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/ivf/formdetails/sathish-kumar-demo -d "entitylocation=location1&startdate=20240101&enddate=20240131&stage=profile"
Example Response
{
"status":"200",
"message":"success",
"stage":"profile",
"list":[
{
"key":"itoothBH22222_JeQ5ocqF",
"recordcreatedon":"2026042818:23:30",
"femalepatientid":"itoothBH22985",
"malepatientid":"itoothBH22222",
...
}
]
}
IUI Form Details
POST https://mocdoc.com/api/iui/formdetails/{EntityKey}
This API retrieves the complete clinical records of an IUI treatment, including all information captured throughout the patient's IUI treatment lifecycle for the selected stage and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| startdate | string | Start date Format: YYYYMMDD Allowed range: within 90 days | ✅ Yes |
| enddate | string | End date Format: YYYYMMDD Allowed range: within 90 days | ✅ Yes |
| stage | string | IUI stage. Allowed values: profile, investigation, ovarianstimulation, semenpreparation, iuidone, outcome | ✅ Yes |
| .... | .... | .... |
Content Type : Either application/x-www-form-urlencoded or application/json
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| stage | string | profile | Requested IUI stage |
| list | array | IUI form records for the selected stage | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing, invalid date range, or invalid stage
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/iui/formdetails/sathish-kumar-demo -d "entitylocation=location1&startdate=20240101&enddate=20240131&stage=profile"
Example Response
{
"status":"200",
"message":"success",
"stage":"profile",
"list":[
{
"key":"itoothBH22222_hEdkIdwq",
"recordcreatedon":"2026042913:01:09",
"femalepatientid":"itoothBH22985",
"malepatientid":"itoothBH22222",
"entitykey":"itooth",
"rootkey":"itoothBH22222_hEdkIdwq",
...
}
]
}
PR (Purchase Requisition)
POST https://mocdoc.com/api/stock/pr/{EntityKey}
This API retrieves Purchase Requisition (PR) records for the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | pr | Requested stock report type |
| list | array | Purchase requisition records for the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/pr/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"pr",
"list":[
{
"recordkey":"itooth_location1_itoothlocation1_store-for-empty_1",
"prno":"1",
"recordstatus":"Completed",
"grandtotalamount":"1000.00"
}
]
}
PO
POST https://mocdoc.com/api/stock/po/{EntityKey}
This API retrieves Purchase Order (PO) records for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | po | Requested stock report type |
| list | array | Report records for all stores in the selected location with renamed response keys | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing, invalid report type, or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/po/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"reporttype":"po",
"list":[
{
"purchaseordernumber":"1",
"supplier":"serviceprovider4",
"grandtotalamount":"250.00",
"productlist":{
"product1":{
"name":"alginate",
"qty":"1",
"purprice":"250.00",
"mrp":"275.00"
}
}
}
]
}
PO Detailed
POST https://mocdoc.com/api/stock/po/detailed/{EntityKey}
This API retrieves the product-wise details of Purchase Orders for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | po_detailed | Requested stock report type |
| list | array | Product line records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/po/detailed/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"po_detailed",
"list":[
{
"recordkey":"itoothlocation1_1_2026051209:21:20",
"lineitemkey":"product1",
"productdetails":{
"productid":"itooth_29",
"productname":"alginate",
"quantity":"1",
"purchaseprice":"250.00",
"maximumretailprice":"275.00"
},
"supplier":"serviceprovider4",
"grandtotalamount":"250.00",
"purchaseordernumber":"1"
}
]
}
GRN
POST https://mocdoc.com/api/stock/grn/{EntityKey}
This API retrieves Goods Received Note (GRN) records for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | grn | Requested stock report type |
| list | array | Report records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/grn/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"grn",
"list":[
{
"recordkey":"itoothlocation1_1_2026050711:33:37",
"grnnumber":"1",
"locationkey":"location1",
"supplier":"serviceprovider4",
"invoiceamt":"650.00",
"productlist":{
"product1":{
"name":"flowable composite A1",
"qty":"1",
"purprice":"650.00",
"mrp":"750.00"
}
}
}
]
}
GRN Detailed
POST https://mocdoc.com/api/stock/grn/detailed/{EntityKey}
This API retrieves the product-wise details of Goods Received Notes for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | grn_detailed | Requested stock report type |
| list | array | Product line records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/grn/detailed/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"grn_detailed",
"list":[
{
"recordkey":"itoothlocation1_1_2026050711:33:37",
"lineitemkey":"product1",
"productdetails":{
"productid":"itooth_31",
"productname":"flowable composite A1",
"quantity":"1",
"purchaseprice":"650.00",
"maximumretailprice":"750.00"
},
"grnnumber":"1",
"supplier":"serviceprovider4"
}
]
}
GReturn
POST https://mocdoc.com/api/stock/greturn/{EntityKey}
This API retrieves Goods Return records for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | greturn | Requested stock report type |
| list | array | Report records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/greturn/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"greturn",
"list":[
{
"recordkey":"itoothlocation1_1_2026050711:34:47",
"greturnnumber":"1",
"locationkey":"location1",
"supplier":"serviceprovider4",
"invoiceamt":"650.00",
"productlist":{
"product1":{
"name":"flowable composite A1",
"qty":"1",
"purprice":"650.00",
"mrp":"750.00"
}
}
}
]
}
GReturn Detailed
POST https://mocdoc.com/api/stock/greturn/detailed/{EntityKey}
This API retrieves the product-wise details of Goods Return transactions for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | greturn_detailed | Requested stock report type |
| list | array | Product line records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/greturn/detailed/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"greturn_detailed",
"list":[
{
"recordkey":"itoothlocation1_1_2026050711:34:47",
"lineitemkey":"product1",
"productdetails":{
"productid":"itooth_31",
"productname":"flowable composite A1",
"quantity":"1",
"purchaseprice":"650.00",
"maximumretailprice":"750.00"
},
"greturnnumber":"1",
"supplier":"serviceprovider4"
}
]
}
Indent
POST https://mocdoc.com/api/stock/indent/{EntityKey}
This API retrieves internal stock transfer (Indent) records for the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | indent | Requested stock report type |
| list | array | Indent records for the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/indent/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"indent",
"list":[
{
"recordkey":"itoothlocation1_12_2026062418:06:59",
"indentno":"12",
"recordstatus":"Dispatched",
"grandprodvalue":"30.00"
}
]
}
GDN
POST https://mocdoc.com/api/stock/gdn/{EntityKey}
This API retrieves Goods Dispatch Note (GDN) records for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | gdn | Requested stock report type |
| list | array | Report records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/gdn/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"gdn",
"list":[
{
"recordkey":"itoothlocation1_1_2026050711:35:54",
"gdnnumber":"1",
"locationkey":"location1",
"destinationstoreid":"itoothlocation1_pharmapoint",
"grandtotalamount":"750.00",
"recordstatus":"Received"
}
]
}
GDN Detailed
POST https://mocdoc.com/api/stock/gdn/detailed/{EntityKey}
This API retrieves the product-wise details of Goods Dispatch Notes for all stores in the specified location and date.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| entitylocation | string | Unique key for location | ✅ Yes |
| date | string | Date Format: YYYYMMDD Range: 00:00:00 to 23:59:59 in the location timezone | ✅ Yes |
Content Type : Either application/x-www-form-urlencoded
Response
| Parameter | Type | Value | Description |
|---|---|---|---|
| status | string | 200 | Response status |
| message | string | success | Response message |
| reporttype | string | gdn_detailed | Requested stock report type |
| list | array | Product line records for all stores in the selected location | |
| .... | .... | .... |
Status Code
- 200 - Success
- 400 - Required field missing or invalid date range
- 401 - Unauthorized access
- 500 - Something went wrong on MocDoc's end
Example Request
$ curl -X POST https://mocdoc.com/api/stock/gdn/detailed/sathish-kumar-demo -d "entitylocation=location1&date=20260723"
Example Response
{
"status":"200",
"message":"success",
"reporttype":"gdn_detailed",
"list":[
{
"recordkey":"itoothlocation1_2_2026050711:37:30",
"lineitemkey":"product1",
"productdetails":{
"productid":"itooth_31",
"productname":"flowable composite A1",
"quantity":"1",
"purchaseprice":"650.00",
"maximumretailprice":"750.00"
},
"gdnnumber":"2",
"recordstatus":"NotReceived"
}
]
}
Introduction
MocDoc Webhooks enable your application to receive real-time notifications whenever supported events occur within the MocDoc platform. Instead of periodically polling our APIs, your application can subscribe to webhook events and receive an HTTP POST request containing the relevant event data as soon as the event occurs.
Each webhook is delivered as a JSON payload to your configured HTTPS endpoint and can be authenticated using one of the supported authentication methods.
Webhook Configuration
To enable webhook notifications, please share your HTTPS webhook endpoint with the MocDoc team. Our team will configure the webhook for your entity and notify you once the setup is complete.
Authentication
MocDoc supports the following authentication methods for webhook delivery:
- Basic Authentication
- API Key
- Bearer Token
- OAuth 2.0
Authentication
- Your endpoint must return HTTP 200 OK to acknowledge successful receipt of the webhook.
- All webhook payloads are delivered using HTTP POST with Content-Type: application/json.
- The payload structure varies based on the webhook event. Refer to the respective webhook documentation for sample payloads and field descriptions.
Registration
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | patient_registration | Event Name |
| name | string | Raj | Patient First Name |
| lname | string | Kumar | Patient Last Name |
| phid | string | 20260602_003 | Patient ID |
| mobile | string | 9842424310 | Mobile Number |
| gender | string | M / F / T | Gender |
| dob | string | 20211209 | Date of Birth Format: YYYYMMDD |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
"name":"Raj",
"lname":"kumar",
....
}
Check In
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | check_in | Event Name |
| opno | string | 2905 | OP Number |
| date | string | 20260604 | Check In Date Format: YYYYMMDD |
| start | string | 19:16 | Check In Time Format: HH:MM |
| recordkey | string | D_1-20211209-1-location1 | Unique Checkin Key" |
| apptkey_ref | string | D_1-20211209-22:00 | Appointment Key Reference" |
| token | integer | 1 | Token Number |
| consultingdr_name | string | Dr. Abhinav B D S(Dentist) | Consulting Doctor Name |
| bookeddr_name | string | Dr. Arun Pandian M.B.B.S | Booked Doctor Name |
| createdby_name | string | Anitha L | Created By (Name) |
| purpose | string | Consultation | Purpose of Visit |
| natureofvisit | string | Consultation | Nature of Visit |
| entitylocation | string | location1 | Entity Location Key |
| referred_by | string | Dr. S.Rekha B.D.S(Dentist) | Referred By |
| drcode | string | D_1 | Doctor Code |
| patient | object | Full Patient Details (name, lname, phid, title, dob, age, gender, mobile, isdcode, email, bloodgroup, maritalstatus, idproof, idproofdetails, familyid, spousename, spouseage, relationship, extphid, registrationdate, address, guardian) | |
| .... | .... | .... |
Sample Payload
{
"event":"check_in",
"opno":"2905",
"date":"20260604",
"start":"19:16",
"recordkey":"D_1-20211209-1-location1",
"apptkey_ref":"D_1-20211209-22:00",
"token:1,
"consultingdr_name":"Dr. Abhinav B D S(Dentist)",
"bookeddr_name":"Dr. Arun Pandian M.B.B.S",
"createdby_name":"Anitha L",
"referred_by":"Dr. S.Rekha B.D.S(Dentist)",
"entitylocation":"location1",
"drcode": "D_1":,
"patient": {
"name":"Kalkikumar",
"lname":"F",
"phid":"20260602_003",
"mobile":"6379009150",
"gender":"M",
"dob":"19980617",
"age":"27 years 11 months 18 days",
"bloodgroup":"O+",
"maritalstatus":"Married",
"idproof":"Aadhaar",
"extphid":"YRO123",
"address": {
"street":"5/15,North street",
"area":"Valuvar Nagar",
"city":"Chennai",
"state":"Tamil Nadu",
"country":"India"
},
"guardian": {
"name":"Kalai",
"phone":"8998899777",
"isdcode":"91"
},
....
},
....
}
Check In Updation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | checkin_updated | Event Name |
| opno | string | 2905 | OP Number |
| date | string | 20260604 | Check In Date Format: YYYYMMDD |
| start | string | 19:16 | Check In Time Format: HH:MM |
| recordkey | string | D_1-20211209-1-location1 | Unique Checkin Key" |
| apptkey_ref | string | D_1-20211209-22:00 | Appointment Key Reference" |
| token | integer | 1 | Token Number |
| consultingdr_name | string | Dr. Abhinav B D S(Dentist) | Consulting Doctor Name |
| bookeddr_name | string | Dr. Arun Pandian M.B.B.S | Booked Doctor Name |
| createdby_name | string | Anitha L | Created By (Name) |
| purpose | string | Consultation | Purpose of Visit |
| natureofvisit | string | Consultation | Nature of Visit |
| entitylocation | string | location1 | Entity Location Key |
| referred_by | string | Dr. S.Kavin M.B.B.S | Updated Referred By |
| location | string | 107, Gangai Amman Koil Street, Vadapalani, Chennai | Checkin Location |
| drcode | string | D_1 | Doctor Code |
| patient | object | Full Patient Details (name, lname, phid, title, dob, age, gender, mobile, isdcode, email, bloodgroup, maritalstatus, idproof, idproofdetails, familyid, spousename, spouseage, relationship, extphid, registrationdate, address, guardian) | |
| .... | .... | .... |
Sample Payload
{
"event":"checkin_updated",
"opno":"2905",
"date":"20260604",
"start":"19:16",
"recordkey":"D_1-20211209-1-location1",
"apptkey_ref":"D_1-20211209-22:00",
"token:1,
"consultingdr_name":"Dr. Abhinav B D S(Dentist)",
"bookeddr_name":"Dr. Arun Pandian M.B.B.S",
"createdby_name":"Anitha L",
"referred_by":"Dr. S.Kavin M.B.B.S",
"entitylocation":"location1",
"drcode": "D_1":,
"patient": {
"name":"Kalkikumar",
"lname":"F",
"phid":"20260602_003",
"mobile":"6379009150",
"gender":"M",
"dob":"19980617",
"age":"27 years 11 months 18 days",
"bloodgroup":"O+",
"maritalstatus":"Married",
"extphid":"YRO123",
....
},
....
}
Check Out
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | check_in | Event Name |
| opno | string | 2905 | OP Number |
| date | string | 20260604 | Check Out Date Format: YYYYMMDD |
| start | string | 19:16 | Check In Time Format: HH:MM |
| recordkey | string | D_1-20260715-1-location1 | Unique Checkin Key" |
| apptkey_ref | string | D_1-20211209-22:00 | Appointment Key Reference" |
| token | integer | 1 | Token Number |
| co_user_name | string | Anitha L | Checked Out By (Name) |
| co_user_dt | string | 2026060419:23:29 | Check Out Date & Time Format: YYYYMMDDHH:MM:SS |
| consultingdr_name | string | Dr. Abhinav B D S(Dentist) | Consulting Doctor Name |
| bookeddr_name | string | Dr. Arun Pandian M.B.B.S | Booked Doctor Name |
| createdby_name | string | Anitha L | Created By (Name) |
| purpose | string | Consultation | Purpose of Visit |
| natureofvisit | string | Consultation | Nature of Visit |
| entitylocation | string | location1 | Entity Location Key |
| referred_by | string | Dr. S.Rekha B.D.S(Dentist) | Referred By |
| drcode | string | D_1 | Doctor Code |
| patient | object | Full Patient Details (name, lname, phid, title, dob, age, gender, mobile, isdcode, email, bloodgroup, maritalstatus, idproof, idproofdetails, familyid, spousename, spouseage, relationship, registrationdate, address, guardian) | |
| .... | .... | .... |
Sample Payload
{
"event":"check_out",
"opno":"2905",
"date":"20260604",
"start":"19:16",
"recordkey":"D_1-20211209-1-location1",
"apptkey_ref":"D_1-20211209-22:00",
"token:1,
"co_user_name":"Anitha L",
"co_user_dt":"2026060419:23:29",
"consultingdr_name":"Dr. Abhinav B D S(Dentist)",
"referred_by":"Dr. S.Rekha B.D.S(Dentist)",
"entitylocation":"location1",
"drcode": "D_1":,
"patient": {
"name":"Kalkikumar",
"phid":"20260602_003",
"mobile":"6379009150",
"gender":"M",
"bloodgroup":"O+",
"maritalstatus":"Married",
"idproof":"Aadhaar",
....
},
....
}
OP Bill Creation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | op_bill_create | Event Name |
| billdate | string | 20211209 | Bill Date Format: YYYYMMDD |
| billno | string | OP2122-111 | Bill Number |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
....
}
OP Bill Updation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| updated_by | string | Senthilnathan Periasamy | Updated By |
| updated_at | string | 2021122320:23:39 | Updated At Format: YYYYMMDDHH:MM:SS |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
....
}
OP Bill Cancellation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| cancelled_by | string | Senthilnathan Periasamy | Cancelled By |
| cancelled_reason | string | Cancelled Reason | |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
....
}
Appointment Confirmation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | booking_create | Event Name |
| bookedby | string | Anitha | Doctor Name |
| bookedbyname | string | Senthilnathan Periasamy | Booked By Name |
| recordkey | string | D_1-20211209-21:00 | Unique Appointment Key |
| dr_name | string | Senthilnathan Periasamy | Doctor Name |
| date | string | 20211209 | Appointment Date Format: YYYYMMDD |
| start | string | 21:00 | Appointment Start Time Format: HH:MM |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
"event":"booking_create",
"bookedby":"Anitha",
"bookedbyname":"Senthilnathan Periasamy",
....
}
Appointment Reschedule
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | booking_reschedule | Event Name |
| rescheduled_by | string | Senthilnathan Periasamy | Rescheduled By |
| rescheduled_at | string | 2011102118:00:06 | Rescheduled At Format: YYYYMMDDHH:MM:SS |
| recordkey | string | D_1-20211209-22:00 | Unique Appointment Key |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
"event":"booking_reschedule",
"rescheduleby":"Senthilnathan Periyasamy",
....
}
Appointment Cancellation
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | booking_cancel | Event Name |
| cancelledby | string | Senthilnathan Periasamy | Cancelled By |
| date | string | 2021102119:25:09 | Cancelled Date Format: YYYYMMDDHH:MM:SS |
| recordkey | string | D_1-20211209-22:00 | Unique Appointment Key |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
"event":"booking_cancel",
....
}
Appointment No-Show
Event Payload Details
| Parameter | Type | Value | Description |
|---|---|---|---|
| event | string | booking_noshow | Event Name |
| recordkey | string | D_1-20211209-22:00 | Unique Appointment Key |
| date | string | 20211209 | Appointment Date Format: YYYYMMDD |
| .... | .... | .... |
Sample Payload
{
"status":"200",
"message":"success",
"event":"booking_noshow",
....
}
Overview
Purpose
This document describes the integration requirements for WhatsApp service providers integrating with MocDoc.
MocDoc follows a standardized WhatsApp integration framework across all customer deployments to ensure compatibility, maintainability, and ease of onboarding.
MocDoc currently supports two integration methods:
Method 1 – Standard API Integration
The WhatsApp service provider accepts the request payload generated by MocDoc. Authentication and message delivery are handled using the configurable parameters available within MocDoc.
Method 2 – API Configuration Integration
MocDoc sends the request payload to a provider-specific API endpoint. The service provider is responsible for authenticating the request, transforming the payload (if required), and sending the final WhatsApp message through their platform.
Supported Features
Currently, MocDoc supports the following WhatsApp message types:
| Feature | Supported |
|---|---|
| Text Template Messages | ✅ Yes |
| PDF Document Messages | ✅ Yes |
| Image Messages | ❌ No |
| Video Messages | ❌ No |
| Audio Messages | ❌ No |
| Location Messages | ❌ No |
Configuration & Authentication
Method 1 – Standard API Integration
Configuration Parameters
| Parameter | Description | Required |
|---|---|---|
| API URL | WhatsApp Message API Endpoint | ✅ Yes |
| WhatsApp Account Number | Business WhatsApp Number | ✅ Yes |
| Secret / API Key | Authentication Key | ✅ Yes |
Authentication
Authorization: Bearer <SECRET_KEY>
Content-Type: application/json
Endpoint
POST {WhatsApp API URL}
Method 2 – API Configuration Integration
Configuration Parameters
| Parameter | Description | Required |
|---|---|---|
| API Config URL | Provider endpoint that receives the request from MocDoc | ✅ Yes |
Workflow
In this integration method, MocDoc sends the message payload to the configured API Config URL.
The WhatsApp service provider is responsible for:
- Authenticating the request.
- Validating the request payload.
- Transforming the payload into the provider's required format (if necessary).
- Constructing the final WhatsApp request.
- Sending the WhatsApp message through their platform.
- Returning the appropriate success or failure response to MocDoc.
No WhatsApp Account Number or Secret / API Key needs to be configured within MocDoc for this integration method.
MocDoc supports only the configuration parameters documented above.
Providers requiring additional configurable parameters within MocDoc (such as App ID, API Name, Client ID, Tenant ID, Customer ID, Workspace ID, etc.) are currently not supported.
Request Payload Structure
This section contains everything required to understand the WhatsApp API request payload.
Complete Payload
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "+919XXXXXXXXX",
"type": "template",
"template": {
"name": "template_name",
"language": {
"code": "en_US",
"policy": "deterministic"
},
"components": []
}
}
Payload Field Description
| Field | Description |
|---|---|
messaging_product |
Always whatsapp. |
recipient_type |
Always individual. |
to |
Recipient mobile number with country code. |
type |
Always template. |
template.name |
Name of the approved WhatsApp template. |
template.language.code |
Template language code (e.g., en_US). |
template.language.policy |
Always deterministic. |
template.components |
Array containing the template components (header, body, buttons, etc.). |
Supported Components
MocDoc currently supports the following WhatsApp message components.
| Component | Supported |
|---|---|
| Header (PDF Document) | ✅ Yes |
| Body (Text Variables) | ✅ Yes |
| Dynamic URL Button | ✅ Yes (Where applicable) |
Body Component
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Patient Name"
},
{
"type": "text",
"text": "Hospital Name"
}
]
}
PDF Header Component
{
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"link": "https://example.com/report.pdf",
"filename": "Lab_Report.pdf"
}
}
]
}
Dynamic URL Button
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [
{
"type": "text",
"text": "ORDER123"
}
]
}
Sample Payloads
The following sample payloads demonstrate the WhatsApp message structure generated by MocDoc. Appointment Confirmation has been used as the representative example for text-only notifications, while Lab Report Ready (PDF) has been used as the representative example for notifications with PDF attachments.
Sample Payload – Appointment Confirmation (Text Message)
The following sample illustrates the payload structure for a text-only WhatsApp template message. The same payload format is used for other text-based notifications with changes only to the template name and variable values.
{
"messaging_product":"whatsapp",
"to":"+9190xxxxxx51",
"type":"template",
....
}
Sample Payload – Lab Report Ready (PDF Attachment)
The following sample illustrates the payload structure for a WhatsApp template message that includes text content along with a PDF attachment, as used for the Lab Report Ready notification.
{
"messaging_product":"whatsapp",
"to":"+9190xxxxxx51",
"type":"template",
....
}
Integration Requirements
Standard API Integration
The WhatsApp service provider must support the following:
- HTTPS REST API
- Authorization using the configured Secret / API Key.
- The standardized request payload documented in this guide.
- WhatsApp Template Messages.
- Dynamic Body Variables.
- PDF Documents in the Header Component.
- Dynamic URL Buttons (where applicable).
API Configuration Integration
The WhatsApp service provider must provide the following:
- A single API endpoint capable of receiving the standardized MocDoc request payload.
- Authentication handled internally by the provider.
- Payload transformation handled internally by the provider (if required).
- Construction of the final WhatsApp request.
- Delivery of the WhatsApp message.
- Returning an appropriate API response back to MocDoc.
Limitations
MocDoc follows a standardized WhatsApp integration framework across all deployments.
Accordingly, the following limitations apply:
- Only the configuration parameters documented in this guide are supported.
- MocDoc always generates the standardized request payload documented in this guide.
- Provider-specific configuration parameters within MocDoc are not supported.
- Any payload transformation required by the WhatsApp service provider should be handled by the provider's API.
- Any provider-specific authentication or message routing logic should be implemented within the provider's API.