Download OpenAPI specification:
Iranian Health Insurance Organization (IHIO) API Documentation
Get an authentication token for accessing other services
terminalId required | integer Terminal ID of the service caller |
username required | string Username of the service caller |
password required | string Password of the service caller |
{- "terminalId": 123,
- "username": "test",
- "password": "Test123"
}
{- "resCode": 0,
- "exampleToken": "your-auth-token-here"
}
Create a new session for the user
cpartyUsername required | string User username |
cpartyPassword required | string User password |
{- "cpartyUsername": "string",
- "cpartyPassword": "string"
}
{- "description": "Successful counterparty session creation.",
- "type": "object",
- "properties": {
- "resCode": {
- "type": "integer",
- "example": 1,
- "description": "Response code (1 for success)."
}, - "resMessage": {
- "type": "string",
- "description": "Success message."
}, - "info": {
- "$ref": "#/components/schemas/CpartySessionInfo"
}
}, - "required": [
- "resCode",
- "resMessage",
- "info"
]
}
Create a new session for a citizen
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
nationalNumber required | string Citizen's national number |
{- "cpartySessionId": "string",
- "nationalNumber": "1234567890"
}
{- "resCode": 1,
- "resMessage": "Citizen session opened successfully.",
- "info": {
- "citizenSessionId": "cit_sess_123abc789xyz",
- "isCovered": true,
- "coverageReferenceInternalOwnerId": 1001,
- "age": 30,
- "birthDate": "1993-04-15",
- "countOfFamilyMember": 3,
- "gender": "M",
- "geoInfo": "{\"province\":\"Tehran\",\"city\":\"Tehran\"}",
- "lastName": "Yazdani",
- "lifeStatus": "Alive",
- "name": "Ali",
- "memberImage": "base64encodedstring...",
- "productName": "Salamat Insurance Plan A",
- "registrationStatus": "Active",
- "relationType": "R",
- "responsibleFullName": "Mohammad Yazdani",
- "responsibleNN": "007...",
- "zipCode": "1234567890",
- "nationalNumber": "008...",
- "accountValidto": "2025-12-31",
- "issuerType": "I",
- "productId": 205,
- "isReferenceable": true,
- "cellPhoneNumber": "09123456789",
- "maritalStatus": "M",
- "familyPhysician": "{\"name\":\"Dr. Ahmadi\",\"code\":\"D456\"}",
- "message": {
- "infoMessage": [
- "Welcome Ali Yazdani!"
], - "snackMessage": [
- {
- "type": "I",
- "text": "Your session is now active."
}
]
}, - "specialAccount": "ACC12345"
}
}
Verify the OTP code for two-factor authentication
cpartySessionId required | string Session ID to verify |
otp required | integer One-time password code |
{- "cpartySessionId": "string",
- "otp": 0
}
{- "resCode": 1,
- "resMessage": "OTP verification successful.",
- "info": {
- "sessionId": "new_session_id_after_otp_check_xxxx"
}
}
Generate a new electronic SAMAD code for a citizen
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
receiptPartnerId required | integer ID of the partner through whom we want to receive the SAMAD code |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "receiptPartnerId": 15345
}
{- "resCode": 1,
- "resMessage": "SAMAD code generated successfully.",
- "info": {
- "message": {
- "infoMessage": [
- "Prescription is ready for submission"
], - "snackMessage": [
- {
- "type": "I",
- "text": "SAMAD code XXXXX generated."
}
]
}, - "samadCode": "SAMAD6789012345"
}
}
Generate a SAMAD code for a referred prescription
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
printCode required | string Tracking code of the referred prescription |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "printCode": "00903"
}
{- "resCode": 1,
- "resMessage": "Reference SAMAD code generated successfully.",
- "info": {
- "message": {
- "infoMessage": [
- "Prescription is ready for submission via reference."
], - "snackMessage": [
- {
- "type": "I",
- "text": "Reference SAMAD code YYYYY generated."
}
]
}, - "samadCode": "SAMADREFYYYYY"
}
}
Search and retrieve a list of SAMAD codes based on various criteria
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
nationalNumber | string National number to search for (optional). |
status | string Enum: "D" "O" "R" Status to filter by (optional). |
fromDate required | string^\\d{8}$ Start date for search range (YYYYMMDD). |
toDate required | string^\\d{8}$ End date for search range (YYYYMMDD). |
index | integer >= 0 Default: 0 Page index for pagination (optional, defaults to 0 if not provided). |
count | integer [ 1 .. 100 ] Default: 50 Number of items per page (optional, defaults to system default, e.g., 50 if not provided). |
{- "cpartySessionId": "string",
- "nationalNumber": "007...",
- "status": "D",
- "fromDate": "13980101",
- "toDate": "13981212",
- "index": 0,
- "count": 50
}
{- "resCode": 1,
- "resMessage": "Search completed successfully.",
- "info": [
- {
- "age": 22,
- "creationDate": "1398/07/04 11:39:40",
- "picture": "base64string...",
- "gender": "F",
- "lastName": "TestLastName",
- "name": "TestName",
- "nationalNumber": "008...",
- "productName": "Test Product",
- "samadCode": "1234567890123456",
- "tarckingCode": "20096",
- "PartnerName": "Test Partner",
- "status": "D",
- "referenceTrackingCode": "REF98765"
}
]
}
Search and retrieve a list of delivered SAMAD codes based on various criteria
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
nationalNumber | string National number to filter by (optional). If empty, search is at the national level. |
fromDate required | string^\\d{8}$ Start date for search range (format YYYYMMDD). |
toDate required | string^\\d{8}$ End date for search range (format YYYYMMDD). |
index | integer >= 0 Default: 0 Page index for pagination (0-based). |
count | integer [ 1 .. 50 ] Default: 50 Number of items per page (max 50). |
{- "cpartySessionId": "string",
- "nationalNumber": "007...",
- "fromDate": "13980101",
- "toDate": "13981212",
- "index": 0,
- "count": 50
}
{- "resCode": 1,
- "resMessage": "Search for delivered SAMAD codes completed successfully.",
- "info": [
- {
- "age": 22,
- "deliveredDate": "1398/07/04 11:39:40",
- "gender": "F",
- "lastName": "LastNameDelivered",
- "name": "NameDelivered",
- "nationalNumber": "009...",
- "picture": "base64string...",
- "productName": "Product Delivered",
- "samadStatus": "R",
- "trackingCode": "14785",
- "rowNum": 1,
- "prescriptionType": "E",
- "sequenceNumber": 1,
- "checkCode": "CHK123",
- "relationType": "R",
- "validTo": "1402/03/16",
- "dto": "1402/03/16"
}
]
}
Generate a SAMAD code for a paper prescription
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
required | object Wrapper for paper prescription information. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "paperInfoWrapper": {
- "nomedicalSystem": 123,
- "visitDate": 13980707,
- "expertiseGrade": "string",
- "paperImage": "string",
- "partnerContractingPartyId ": 15345
}
}
{- "resCode": 1,
- "resMessage": "Paper SAMAD code generated successfully.",
- "info": {
- "message": {
- "infoMessage": [ ],
- "snackMessage": [
- {
- "type": "I",
- "text": "Paper SAMAD YYYYYYY generated."
}
]
}, - "samadCode": "SAMADPAPERXXXXX"
}
}
Search for services based on various criteria
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
searchClause required | string Search term |
serviceTypeId required | integer Enum: 2 3 4 5 6 Type of services to return (2:Lab, 3:Pharmaceutical, 4:Physiotherapy, 5:Physician Services, 6:Reference Services) |
maxResultCount required | integer Maximum number of results to return |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "searchClause": "Anti",
- "serviceTypeId": 2,
- "maxResultCount": 5
}
{- "resCode": 1,
- "resMessage": "Service search completed successfully.",
- "info": [
- {
- "fullName": "Anti-Tissue Transglutamiase IgA Test",
- "nationalNumber": "803625",
- "shortName": "Transglutamias Test",
- "interfaceName": "Transglutamias_IgA_803625",
- "description": "Anti-Tissue Transglutamiase (IgA, IgG) Test",
- "NORepeat": 1,
- "state": {
- "isCovered": true
}
}, - {
- "fullName": "Another Service Full Name",
- "nationalNumber": "SvcCode002",
- "shortName": "Another Svc",
- "interfaceName": "Another_Svc_Intf",
- "description": "Description for another service.",
- "NORepeat": 0,
- "state": {
- "isCovered": false
}
}
]
}
Retrieve a list of services in the same family based on service national number
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
serviceNN required | integer <int64> National number of the service (serviceNN) |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "serviceNN": 0
}
{- "resCode": 1,
- "resMessage": "Success",
- "info": [ ]
}
Retrieve product information based on its IRC code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
ircCode required | string IRC code of the product |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "ircCode": "string"
}
{- "resCode": 1,
- "resMessage": "Product fetched successfully.",
- "info": {
- "genericCode": "GENERIC12345"
}
}
Search for products based on their generic code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
searchClause required | string Search term for finding products |
maxResultCount required | integer <int32> Maximum number of results to return |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "searchClause": "string",
- "maxResultCount": 0
}
{- "resCode": 1,
- "resMessage": "اطلاعات با موفقیت دریافت شد",
- "info": [
- {
- "isDefault": true,
- "fullName": "TINYPHEN 125mg|(...)",
- "shortName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "nationalNumber": "2157131736861839",
- "interfaceName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "description": "ACETAMINOPHEN TABLET, FOR SOLUTION ORAL 125 mg",
- "basePrice": 3250,
- "state": {
- "isCovered": true,
- "shape": "TABLET"
}
}
]
}
Quickly search for products using their IRC code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service. |
citizenSessionId required | string Citizen session ID received from citizen session creation service. |
searchClause required | string The search term (part of IRC or product name) to query for. |
maxResultCount required | integer Maximum number of results to return. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "searchClause": "Anti",
- "maxResultCount": 5
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد",
- "info": [
- {
- "fullName": "TINYPHEN 125mg|(...)",
- "shortName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "nationalNumber": "2157131736861839",
- "genericCode": "123",
- "interfaceName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "description": "ACETAMINOPHEN TABLET, FOR SOLUTION ORAL 125 mg",
- "NORepeat": 1,
- "state": {
- "isCovered": true,
- "shape": "TABLET"
}
}
]
}
Quickly search for products using their combination name (generic or IRC based on productType)
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service. |
citizenSessionId required | string Citizen session ID received from citizen session creation service. |
searchClause required | string The search term (part of product name) to query for. |
productType required | string Enum: "G" "I" Type of product to search for. |
maxResultCount required | integer Maximum number of results to return. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "searchClause": "Amoxi",
- "productType": "G",
- "maxResultCount": 10
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد",
- "info": [
- {
- "fullName": "TINYPHEN 125mg|(...)",
- "shortName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "nationalNumber": "2157131736861839",
- "genericCode": "00522",
- "interfaceName": "ACETAMINOPHEN 125mg TINYPHEN (-5952)",
- "description": "ACETAMINOPHEN TABLET, FOR SOLUTION ORAL 125 mg",
- "NORepeat": 1,
- "state": {
- "isCovered": true,
- "shape": "TABLET"
}
}
]
}
Quickly search for products using their generic name
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
searchClause required | string Search term for finding products |
maxResultCount required | integer <int32> Maximum number of results to return |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "searchClause": "string",
- "maxResultCount": 0
}
{- "resCode": 0,
- "products": [ ]
}
Retrieve a list of products in the same family based on generic code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID received from user authentication or two-factor authentication service |
citizenSessionId required | string Citizen session ID received from citizen session creation service |
genCode required | string Generic code of the product to fetch co-family for |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "genCode": "string"
}
{- "resCode": 0,
- "products": [ ]
}
Check if a subscription order can be fulfilled
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
samadCode required | string SAMAD code for the prescription/order |
required | object (SubInfoWrapper) |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "subInfoWrapper": {
- "service": {
- "count": 0,
- "nationalNumber": "string",
- "type": "string",
- "mode": "string",
- "description": "string",
- "consumption": "string",
- "consumptionInstruction": "string",
- "numberOfPeriod": 0.1,
- "bulkId": 0,
- "activeFrom": 0
}, - "otherServices": [
- {
- "checkCode": "string"
}
]
}
}
{- "resCode": 1,
- "resMessage": "Operation successful.",
- "info": {
- "isAllowed": true,
- "hasContract": true,
- "message": { },
- "checkCode": "CHK12345",
- "maxCoveredCount": 10
}
}
Check if a subscription can be delivered
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
trackingCode required | string Tracking code for the delivery |
required | object (SubInfoDeliverWrapper) |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "trackingCode": "string",
- "subInfoWrapper": {
- "service": {
- "count": 0,
- "nationalNumber": "string",
- "type": "string",
- "description": "string",
- "consumption": "string",
- "consumptionInstruction": "string",
- "numberOfPeriod": 0.1,
- "isOutOfPrescription": true,
- "referenceCheckCode": "string"
}, - "otherServices": [
- {
- "checkCode": "string"
}
]
}
}
{- "resCode": 1,
- "resMessage": "Delivery check successful.",
- "info": {
- "isAllowed": true,
- "hasContract": true,
- "shouldSendToEsalat": true,
- "message": { },
- "checkCode": "DELCHK123",
- "priceInfo": {
- "totalPrice": 100,
- "coveredPrice": 80,
- "payablePrice": 20,
- "discountAmount": 0
}, - "maxCoveredCount": 5
}
}
Check the delivery price for a subscription item
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
trackingCode required | string Tracking code related to the delivery |
checkCode required | string Check code obtained from a previous step |
basePrice required | integer <int32> Base price to be checked/considered |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "trackingCode": "string",
- "checkCode": "string",
- "basePrice": 0
}
{- "resCode": 1,
- "resMessage": "Price check successful.",
- "info": {
- "isAllowed": true,
- "hasContract": true,
- "shouldSendToEsalat": true,
- "message": {
- "detail": "Price calculated based on provided basePrice."
}, - "checkCode": "CHECK789",
- "priceInfo": {
- "totalPrice": 120,
- "coveredPrice": 90,
- "payablePrice": 30,
- "discountAmount": 0
}, - "maxCoveredCount": 3
}
}
Check if a paper-based subscription order can be fulfilled
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
samadCode required | string SAMAD code for the prescription/order |
required | object (SubInfoPaperWrapper) |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "subInfoWrapper": {
- "service": {
- "orderCount": 0,
- "deliverCount": 0,
- "orderNationalNumber": "string",
- "deliverNationalNumber": "string",
- "type": "string",
- "description": "string",
- "consumption": "string",
- "consumptionInstruction": "string",
- "numberOfPeriod": 0.1,
- "bulkId": 0,
- "isOutOfPrescription": true
}, - "otherServices": [
- {
- "checkCode": "string"
}
]
}
}
{- "resCode": 1,
- "resMessage": "Paper check successful.",
- "info": {
- "isAllowed": true,
- "hasContract": true,
- "shouldSendToEsalat": false,
- "message": {
- "detail": "Paper subscription is permitted."
}, - "checkCode": "PAPERCHK123",
- "priceInfo": {
- "totalPrice": 50,
- "coveredPrice": 40,
- "payablePrice": 10,
- "discountAmount": 0
}, - "maxCoveredCount": 2
}
}
Check the price for a paper-based subscription item
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
samadCode required | string SAMAD code related to the paper prescription/order |
checkCode required | string Check code obtained from a previous step |
basePrice required | integer <int32> Base price to be checked/considered for paper item |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "checkCode": "string",
- "basePrice": 0
}
{- "resCode": 1,
- "resMessage": "Paper price check successful.",
- "info": {
- "isAllowed": true,
- "hasContract": true,
- "shouldSendToEsalat": false,
- "message": {
- "detail": "Price for paper item calculated."
}, - "checkCode": "PAPERCHECK789",
- "priceInfo": {
- "totalPrice": 70,
- "coveredPrice": 50,
- "payablePrice": 20,
- "discountAmount": 0
}, - "maxCoveredCount": 1
}
}
Inquiry about a subscription using its UID
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
checkCode required | string Check code related to the inquiry |
count required | integer <int32> Count related to the inquiry |
uId required | string UID of the subscription to inquire about |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "checkCode": "string",
- "count": 0,
- "uId": "string"
}
{- "resCode": 1,
- "resMessage": "Inquiry successful.",
- "info": {
- "resCode": 0,
- "resMessage": "Subscription details retrieved."
}
}
Reactivate a subscription using its UID
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID for the contracting party |
citizenSessionId required | string Citizen session ID |
checkCode required | string Check code related to the inquiry |
count required | integer <int32> Count related to the inquiry |
uId required | string UID of the subscription to inquire about |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "checkCode": "string",
- "count": 0,
- "uId": "string"
}
{- "resCode": 1,
- "resMessage": "Reactivation successful.",
- "info": {
- "resCode": 0,
- "resMessage": "Subscription reactivated."
}
}
Save a new electronic prescription
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
referenceFeedback | string or null Optional reference feedback from the user/system. |
samadCode required | string SAMAD code associated with the prescription. |
required | Array of objects (PrescriptionSaveSubscriptionItem) List of subscription items (check codes) to be included in the save operation. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "referenceFeedback": "string",
- "samadCode": "string",
- "subscriptions": [
- {
- "checkCode": "1670000000000000000000000000001"
}
]
}
{- "resCode": 1,
- "resMessage": "Prescription saved successfully.",
- "info": {
- "trackingCode": "TRK123456789",
- "sequenceNumber": 1,
- "message": {
- "infoMessage": [
- {
- "text": "Prescription processed.",
- "type": "INFO"
}
], - "snackMessage": [
- {
- "text": "Saved!",
- "type": "SUCCESS"
}
]
}
}
}
Update an existing electronic prescription
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication. |
citizenSessionId required | string Citizen session ID. |
samadCode required | string SAMAD code of the prescription to be updated. |
Array of objects or null (PrescriptionSaveSubscriptionItem) List of new or existing subscription items (check codes) to be part of the updated prescription. Items not in deleteSubscriptions will be kept/added. | |
Array of objects or null (PrescriptionSaveSubscriptionItem) List of subscription items (check codes) to be explicitly removed from the prescription. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "subscriptions": [
- {
- "checkCode": "1670000000000000000000000000001"
}
], - "deleteSubscriptions": [
- {
- "checkCode": "1670000000000000000000000000001"
}
]
}
{- "resCode": 1,
- "resMessage": "Prescription updated successfully.",
- "info": {
- "trackingCode": "TRKUPDT12345",
- "message": {
- "infoMessage": [ ],
- "snackMessage": [
- {
- "text": "Updated!",
- "type": "SUCCESS"
}
]
}
}
}
Mark an electronic prescription as delivered
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication. |
citizenSessionId required | string Citizen session ID. |
printCode required | string The print code associated with the prescription delivery. |
required | Array of objects (PrescriptionDeliverSubscriptionItem) List of subscription items being delivered. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "printCode": "string",
- "subscriptions": [
- {
- "checkCode": "string",
- "uIds": [
- {
- "uId": "string",
- "count": 0
}
]
}
]
}
{- "resCode": 1,
- "resMessage": "Prescription delivered successfully.",
- "info": {
- "sequenceNumber": 12345,
- "checkCode": "CHKDEL789",
- "message": {
- "detail": "Delivery recorded."
}
}
}
Confirm the delivery of an electronic prescription
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
checkCode required | string Check code of the prescription to confirm delivery |
{- "cpartySessionId": "string",
- "checkCode": "string"
}
{- "resCode": 0,
- "message": "Electronic prescription delivery confirmed."
}
Delete a prescription that has already been delivered
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
checkCode required | string Check code of the delivered prescription to be deleted |
{- "cpartySessionId": "string",
- "checkCode": "string"
}
{- "resCode": 1,
- "resMessage": "عملیات حذف با موفقیت انجام شد."
}
Retrieve information about prescriptions that have been delivered
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party (e.g., pharmacy). |
checkCode required | string The check code of the specific delivered prescription to fetch. |
{- "cpartySessionId": "string",
- "checkCode": "string"
}
{- "resCode": 1,
- "resMessage": "اطلاعات نسخه تحویل شده با موفقیت دریافت شد.",
- "info": {
- "orderedDate": "1402/10/01 10:00:00",
- "deliveredDate": "1402/10/01 14:30:00",
- "samadCode": "SAMAD123PRESCRIPTION",
- "typeId": 1,
- "totalAmount": 300000,
- "totalPatientPayment": 60000,
- "isVisitSimultaneous": false,
- "orderPartnerInfo": {
- "partnerName": "دکتر معالج",
- "partnerPhone": "02112345678",
- "contractPartyName": "بیمه سلامت",
- "noMedicalSystem": 98765,
- "licenseName": "متخصص اطفال"
}, - "subscriptionDeliveredInfos": [
- {
- "numberOfDelivered": 1,
- "numberOfRequest": 1,
- "numberOfPeriod": 1,
- "description": "شربت آموکسی سیلین 125",
- "amount": 150000,
- "patientPayment": 30000,
- "consumption": "هر 8 ساعت 5 سی سی",
- "consumptionSNOMEDCode": "SCTAMX125",
- "consumptionInstruction": "قبل از مصرف تکان دهید",
- "shape": "SYRUP",
- "bulkId": 101,
- "serviceFullName": "شربت آموکسی سیلین 125 میلی گرم/5 میلی لیتر",
- "serviceShortName": "آموکسی 125 شربت",
- "serviceInterfaceName": "Amoxicillin125mgSyrup",
- "serviceGenericCode": "GABCDE",
- "serviceNationalNumber": "NABCDE",
- "serviceDescription": "شربت آنتی بیوتیک",
- "serviceOrderGenericCode": "GABCDE-ORD",
- "serviceOrderNationalNumber": "NABCDE-ORD"
}
], - "subscriptionDeliveredInfosWithNoReference": [
- {
- "numberOfDelivered": 2,
- "numberOfRequest": 2,
- "numberOfPeriod": 1,
- "description": "سرنگ انسولین BD لوئردوز",
- "amount": 150000,
- "patientPayment": 30000,
- "consumption": "طبق دستور",
- "consumptionSNOMEDCode": "SCTINSULINSYR",
- "consumptionInstruction": "یکبار مصرف",
- "shape": "SYRINGE",
- "bulkId": 202,
- "serviceFullName": "سرنگ انسولین BD لوئردوز 0.5 سی سی",
- "serviceShortName": "سرنگ انسولین",
- "serviceInterfaceName": "InsulinSyringeBD0.5cc",
- "serviceGenericCode": "GXYZ123",
- "serviceNationalNumber": "NXYZ123",
- "serviceDescription": "سرنگ تزریق انسولین",
- "serviceOrderGenericCode": "GXYZ123-ORD",
- "serviceOrderNationalNumber": "NXYZ123-ORD"
}
]
}
}
Retrieve a prescription using its SAMAD code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
samadCode required | string SAMAD code of the prescription to fetch |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string"
}
{- "resCode": 1,
- "resMessage": "Prescription fetched successfully.",
- "info": {
- "creationDate": "1398/07/05 17:58:51",
- "subscriptionInfos": [ ],
- "partnerName": "نام پزشک نمونه",
- "partnerPhone": "02188888888",
- "contractPartyName": "بیمه سلامت"
}
}
Retrieve a prescription using its reference print code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
printCode required | string Print code to be used for retrieving the prescription reference |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "printCode": "string"
}
{- "resCode": 1,
- "resMessage": "اطلاعات نسخ مرجع با موفقیت دریافت شد.",
- "info": [
- {
- "referencePrescriptionInfo": {
- "creationDate": "1398/07/05 17:58:51",
- "partnerName": "پزشک عمومی محمد یریمی",
- "partnerPhone": "02188776655",
- "contractPartyName": "بیمه سلامت ایرانیان",
- "referenceSamadOwner_Id": 777777,
- "subscriptionInfos": [
- {
- "description": "قرص سرماخوردگی بزرگسالان",
- "numberOfRequest": 10,
- "serviceId": 101,
- "serviceDescription": "قرص سرماخوردگی بزرگسالان",
- "serviceFullName": "قرص سرماخوردگی بزرگسالان",
- "serviceInterfaceName": "AdultColdTab",
- "serviceGenericCode": "G1001",
- "serviceNationalNumber": "N1001",
- "serviceShortName": "سرماخوردگی",
- "countOfReference": 0,
- "typeId": 1,
- "ihioBasePrice": 5000,
- "prescriptionId": 12345,
- "samadId": 67890,
- "status": "Active",
- "consumption": "هر 8 ساعت",
- "consumptionSNOMEDCode": "SCT123",
- "numberOfPeriod": 1,
- "shape": "TABLET",
- "subscriptionDeliveredInfos": [
- {
- "description": "تحویل اول",
- "numberOfDelivered": 5,
- "deliverDate": "1398/07/06 10:00:00",
- "serviceDescription": "قرص سرماخوردگی بزرگسالان",
- "serviceFullName": "قرص سرماخوردگی بزرگسالان",
- "serviceInterfaceName": "AdultColdTab",
- "serviceGenericCode": "G1001",
- "serviceNationalNumber": "N1001",
- "serviceShortName": "سرماخوردگی",
- "patientPayment": 0,
- "amount": 25000,
- "delivery": "حضوری",
- "prescriber": "دکتر یریمی",
- "typeId": 1,
- "ihioBasePrice": 5000,
- "checkCode": "DELIVCKC111"
}
]
}
]
}
}
]
}
Retrieve a prescription using its print code
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
printCode required | string Print code of the prescription to fetch |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "printCode": "string"
}
{- "resCode": 1,
- "resMessage": "Prescription fetched successfully using print code.",
- "info": {
- "creationDate": "1398/07/05 17:58:51",
- "subscriptionInfos": [ ],
- "partnerName": "نام پزشک نمونه",
- "partnerPhone": "021YYYYYYYY",
- "contractPartyName": "بیمه سلامت",
- "samadCode": "SAMAD1234567890123",
- "typeId": 1,
- "noMedicalSystem": 12345,
- "licenseName": "عمومی"
}
}
Create an order for a paper-based prescription
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
referenceFeedback | string or null Optional reference feedback from the user/system. |
samadCode required | string SAMAD code associated with the prescription. |
required | Array of objects (PrescriptionSaveSubscriptionItem) List of subscription items (check codes) to be included in the save operation. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "referenceFeedback": "string",
- "samadCode": "string",
- "subscriptions": [
- {
- "checkCode": "1670000000000000000000000000001"
}
]
}
{- "resCode": 1,
- "resMessage": "Paper prescription ordered successfully.",
- "info": {
- "sequenceNumber": 1,
- "checkCode": "PAPERCHK123",
- "trackingCode": "PAPERTRK789",
- "message": {
- "detail": "Order for paper prescription created."
}
}
}
Mark a paper prescription as delivered
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
citizenSessionId required | string Citizen session ID |
samadCode required | string SAMAD code |
required | Array of objects Array of subscriptions to deliver |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "subscriptions": [
- {
- "checkCode": "string",
- "uIds": [
- {
- "uId": "string",
- "count": 0
}
]
}
]
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد",
- "info": {
- "sequenceNumber": 12345,
- "checkCode": "CHK789PAPER",
- "trackingCode": "TRKXYZPAPER",
- "message": { }
}
}
Confirm the delivery of a paper prescription
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
checkCode required | string Check code of the paper prescription to confirm delivery |
{- "cpartySessionId": "string",
- "checkCode": "string"
}
{- "resCode": 0,
- "message": "Operation completed successfully."
}
Retrieve the queue of prescriptions waiting for delivery
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
{- "cpartySessionId": "string"
}
A list of prescriptions currently in the delivery queue for the authenticated party.
{- "resCode": 1,
- "resMessage": "اطلاعات صف با موفقیت دریافت شد.",
- "info": [
- {
- "trackingCode": "TRK12345XYZ",
- "memberNN": "0012345678",
- "fullName": "علی رضایی",
- "gender": "M",
- "picture": "U0FNRVRIQVRIQVRMT09LU0xJS0VBUFJJVFVSRUJPVVRUSEVSRS4uLg=="
}, - {
- "trackingCode": "TRK67890ABC",
- "memberNN": "0098765432",
- "fullName": "فاطمه محمدی",
- "gender": "F",
- "picture": "QU5PVEhFUlBIT1RPVkVSSFRFREUuLi4="
}
]
}
Send a prescription to the delivery queue
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
citizenSessionId required | string Session ID of the citizen/patient whose prescription is being queued. |
trackingCode required | string Tracking code of the prescription to send to the delivery queue. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "trackingCode": "string"
}
{- "resCode": 1,
- "resMessage": "اطلاعات نسخه جهت الصاق به صف ارسال گردید."
}
Retrieve a list of partners (e.g., doctors, clinics) associated with the authenticated calling party session.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
{- "cpartySessionId": "string"
}
{- "resCode": 1,
- "resMessage": "اطلاعات شرکای کاری با موفقیت دریافت شد.",
- "info": [
- {
- "id": 654894,
- "parentId": 9844,
- "partnerName": "پزشک عمومی محمد یریمی"
}, - {
- "id": 654895,
- "parentId": 9844,
- "partnerName": "کلینیک سلامت ایرانیان"
}
]
}
Retrieve detailed partner and associated contract party information using National Number and/or Print Code.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
nationalNumber | string or null National number of the partner or person related to the print code. |
printCode | string or null Print code (e.g., from a prescription) to identify related partner(s). |
{- "cpartySessionId": "string",
- "nationalNumber": "1234567890",
- "printCode": "P12345"
}
{- "resCode": 1,
- "resMessage": "اطلاعات شریک کاری و مرکز طرف قرارداد با موفقیت دریافت شد.",
- "info": {
- "PartnerInfo": {
- "id": 654894,
- "nationalNumber": "0071234567",
- "partnerName": "دکتر محمد رضایی",
- "typeId": 221,
- "name": "محمد",
- "typeName": "پزشک عمومی",
- "lastName": "رضایی",
- "fixPhoneNo": "02188776655"
}, - "contractPartyInfo": {
- "id": 10203,
- "name": "مرکز بهداشتی",
- "lastName": "سلامت",
- "nationalNumber": "1122334455",
- "gender": "M",
- "type": "مرکز درمانی",
- "cellPhoneNo": 9121112233
}
}
}
Search for partners (doctors, clinics, etc.) based on specific criteria like medical system ID, visit date, and expertise.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
citizenSessionId required | string Session ID of the citizen/patient, used for context in some partner searches. |
nomedicalSystem required | integer Medical system code (کد نظام پزشکی) of the partner to search for. |
visitDate required | integer Visit date in YYYYMMDD format, used to determine active partners or for context. |
expertiseGrade required | string Comma-separated list of expertise/grades to filter by (e.g., "doctor", "midwife"). |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "nomedicalSystem": 123,
- "visitDate": 13980101,
- "expertiseGrade": "doctor,midwife"
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد.",
- "info": [
- {
- "name": "نام",
- "lastName": "نام خانوادگی",
- "cellphoneNumber": 9123456789,
- "partnerType": "پزشک",
- "contractPartyType": "مطب",
- "address": "آدرس نمونه",
- "licenseType": "پروانه مطب",
- "nomedicalSystem": 12345,
- "image": "(base64 encoded string)",
- "partnerContractingPartyId": 101
}
]
}
Removes a family physician assignment for a citizen.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
citizenSessionId required | string Session ID of the citizen/patient whose family physician assignment is to be deleted. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string"
}
{- "resCode": 1,
- "resMessage": ".دش ماجنا تیقفوم اب تلامع",
- "info": {
- "message": {
- "snackMessage": [
- {
- "text": ".تفگ ماجنا تیقفوم اب کشزپ هداوناخ فذح",
- "type": "I"
}
], - "infoMessage": [ ]
}
}
}
Assigns a family physician to a citizen, or updates the existing assignment.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
citizenSessionId required | string Session ID of the citizen/patient. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string"
}
{- "resCode": 1,
- "resMessage": ".دش ماجنا تیقفوم اب تلامع",
- "info": {
- "message": {
- "snackMessage": [
- {
- "text": ".دش ماجنا تیقفوم اب نکشزپ هب هدش همیب باستنا",
- "type": "I"
}
], - "infoMessage": [ ]
}
}
}
Checks the status of a bill, specifically if it is viewable, and effectively sends it for this check. Used to query if a bill can be displayed to the user.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
{- "cpartySessionId": "string"
}
{- "resCode": 1,
- "resMessage": ".دش یبایشزراو تیاعفش تاعلاطا",
- "info": {
- "isBillView": true,
- "billType": ".تسا هدش هداد شیامن بصحتوص"
}
}
Retrieve a list of bill information for a cParty (contracting party) for a specified year and month.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
year required | integer The year for which to fetch bill information (e.g., 1399). |
month required | integer The month for which to fetch bill information (1-12). |
{- "cpartySessionId": "string",
- "year": 1399,
- "month": 12
}
{- "resCode": 1,
- "resMessage": ".دش ماجنا تیقفوم اب تايلمع",
- "info": [
- {
- "billId": 277,
- "billType": "XYZ123",
- "billTypeName": "نوع صورتحساب نمونه",
- "billCycle": "139912",
- "description": "توضیحات نمونه برای صورتحساب",
- "billInfo": {
- "productName": "نام محصول نمونه",
- " specialAccount": "Y",
- " type": "VISIT",
- "count": 5,
- "orgPart": 75000
}
}
]
}
Generate a printable version of a bill using its ID.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
billId required | integer <int64> >= 1 Identifier of the bill to be printed. |
{- "cpartySessionId": "string",
- "billId": 1
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد.",
- "info": {
- "print": "U0FNRVRIQVRUSEVSRSBCSUxMLi4u"
}
}
Generate a printable delivery note for a delivered prescription using its check code.
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication |
checkCode required | string Check code of the delivered prescription |
{- "cpartySessionId": "string",
- "checkCode": "string"
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد.",
- "info": {
- "print": "U0FNRVRIQVRUSEVSRSBERUxJVkVSWU5PVEUuLi4="
}
}
Generate a printable version of an order
terminalId required | integer Terminal ID of service caller |
token required | string Token received from token fetch service |
clientIPAddress required | string User IP address |
clientAgentInfo required | string User browser information |
cpartySessionId required | string Session ID from authentication of the calling party. |
citizenSessionId required | string Session ID of the citizen/patient. |
samadCode required | string SAMAD code of the prescription order to be printed. |
type required | string Enum: "drug" "physiotherapy" "test" "imaging" "reference" "doctor" Type of print order required. |
{- "cpartySessionId": "string",
- "citizenSessionId": "string",
- "samadCode": "string",
- "type": "drug"
}
{- "resCode": 1,
- "resMessage": "عملیات با موفقیت انجام شد.",
- "info": {
- "print": "U0FNRVRIQVRUSEVSRSBERUxJVkVSWU5PVEUuLi4="
}
}