Comprehensive REST API for dermatology practice management, patient care, and prescription workflows
https://api.dermifi.com/v1
Authorization: Bearer {your_api_token}
All API requests must include this header
Content-Type: application/json
All request bodies must be valid JSON
Speak with your solutions engineer so that we can add your IPs to our allowlist
Required for production API access
/auth/login
{ "email": "provider@dermifi.com", "password": "SecurePass123!", "mfaCode": "123456" }
{ "accessToken": "eyJhbGciOiJIUzI1NiIs...", "refreshToken": "eyJhbGciOiJIUzI1NiIs...", "tokenType": "Bearer", "expiresIn": 3600, "user": { "id": "usr_123", "email": "provider@dermifi.com", "role": "provider", "permissions": ["read", "write", "prescribe"] } }
/auth/refresh
{ "refreshToken": "eyJhbGciOiJIUzI1NiIs..." }
{ "accessToken": "eyJhbGciOiJIUzI1NiIs...", "tokenType": "Bearer", "expiresIn": 3600 }
/auth/logout
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
No Content - Token successfully revoked
/patients
?page=1&limit=20&search=john&status=active&sortBy=lastName&order=asc
• page: Page number (default: 1)
• limit: Items per page (default: 20, max: 100)
• search: Search by name, email, or phone
• status: Filter by status (active|inactive|pending)
• sortBy: Sort field (lastName|firstName|createdAt)
• order: Sort order (asc|desc)
{ "data": [ { "id": "pat_123", "firstName": "John", "lastName": "Doe", "email": "john.doe@email.com", "phone": "+1 (555) 123-4567", "dateOfBirth": "1985-06-15", "gender": "male", "address": { "street": "123 Main St", "city": "San Francisco", "state": "CA", "zipCode": "94105" }, "insurance": { "provider": "Blue Cross", "memberId": "BC123456789", "groupNumber": "GRP001" }, "status": "active", "createdAt": "2024-01-01T12:00:00Z", "updatedAt": "2024-01-15T14:30:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 150, "totalPages": 8, "hasNext": true, "hasPrevious": false } }
/patients
{ "firstName": "Jane", "lastName": "Smith", "email": "jane.smith@email.com", "phone": "+1 (555) 987-6543", "dateOfBirth": "1990-03-21", "gender": "female", "address": { "street": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "zipCode": "90001" }, "emergencyContact": { "name": "John Smith", "relationship": "spouse", "phone": "+1 (555) 987-6544" }, "insurance": { "provider": "Aetna", "memberId": "AET987654321", "groupNumber": "GRP002", "copay": 25 }, "allergies": ["penicillin", "sulfa"], "medications": ["lisinopril 10mg daily"], "conditions": ["hypertension"], "consentToTreat": true, "hipaaConsent": true }
{ "id": "pat_124", "firstName": "Jane", "lastName": "Smith", "email": "jane.smith@email.com", "phone": "+1 (555) 987-6543", "dateOfBirth": "1990-03-21", "gender": "female", "address": { "street": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "zipCode": "90001" }, "emergencyContact": { "name": "John Smith", "relationship": "spouse", "phone": "+1 (555) 987-6544" }, "insurance": { "provider": "Aetna", "memberId": "AET987654321", "groupNumber": "GRP002", "copay": 25, "verified": false }, "allergies": ["penicillin", "sulfa"], "medications": ["lisinopril 10mg daily"], "conditions": ["hypertension"], "status": "active", "patientNumber": "P-2024-0124", "createdAt": "2024-01-20T10:00:00Z", "updatedAt": "2024-01-20T10:00:00Z" }
/patients/{id}
id: pat_123
?include=appointments,prescriptions,notes
{ "id": "pat_123", "firstName": "John", "lastName": "Doe", "email": "john.doe@email.com", "phone": "+1 (555) 123-4567", "dateOfBirth": "1985-06-15", "age": 38, "gender": "male", "address": { "street": "123 Main St", "city": "San Francisco", "state": "CA", "zipCode": "94105" }, "emergencyContact": { "name": "Jane Doe", "relationship": "spouse", "phone": "+1 (555) 123-4568" }, "insurance": { "provider": "Blue Cross", "memberId": "BC123456789", "groupNumber": "GRP001", "copay": 20, "verified": true, "verifiedAt": "2024-01-10T09:00:00Z" }, "allergies": ["peanuts", "latex"], "medications": ["metformin 500mg twice daily"], "conditions": ["diabetes type 2", "hypertension"], "lastVisit": "2024-01-10T14:00:00Z", "nextAppointment": "2024-02-15T10:00:00Z", "provider": { "id": "prov_789", "name": "Dr. Emily Johnson" }, "status": "active", "createdAt": "2024-01-01T12:00:00Z", "updatedAt": "2024-01-15T14:30:00Z" }
/patients/{id}
{ "email": "john.newemail@email.com", "phone": "+1 (555) 999-8888", "address": { "street": "789 New Street", "city": "San Francisco", "state": "CA", "zipCode": "94110" }, "insurance": { "provider": "Kaiser Permanente", "memberId": "KP987654321", "groupNumber": "GRP003", "copay": 30 }, "medications": [ "metformin 500mg twice daily", "lisinopril 10mg daily" ] }
{ "id": "pat_123", "firstName": "John", "lastName": "Doe", "email": "john.newemail@email.com", "phone": "+1 (555) 999-8888", "dateOfBirth": "1985-06-15", "gender": "male", "address": { "street": "789 New Street", "city": "San Francisco", "state": "CA", "zipCode": "94110" }, "insurance": { "provider": "Kaiser Permanente", "memberId": "KP987654321", "groupNumber": "GRP003", "copay": 30, "verified": false }, "medications": [ "metformin 500mg twice daily", "lisinopril 10mg daily" ], "updatedAt": "2024-01-20T15:00:00Z", "updatedBy": "usr_456" }
/patients/{id}
id: pat_123
{ "reason": "patient_request", "notes": "Patient moved to another state" }
{ "id": "pat_123", "status": "inactive", "deactivatedAt": "2024-01-20T16:00:00Z", "deactivatedBy": "usr_456", "reason": "patient_request", "notes": "Patient moved to another state", "dataRetentionDate": "2031-01-20T16:00:00Z" }
/patients/{id}/history
?startDate=2024-01-01&endDate=2024-12-31&type=visit
• startDate: Filter from date (ISO 8601)
• endDate: Filter to date (ISO 8601)
• type: History type (visit|prescription|lab|imaging|all)
{ "patientId": "pat_123", "history": [ { "id": "hist_001", "date": "2024-01-10T14:00:00Z", "type": "visit", "provider": { "id": "prov_789", "name": "Dr. Emily Johnson" }, "chiefComplaint": "Annual skin check", "diagnosis": ["Actinic keratosis", "Seborrheic keratosis"], "treatment": "Cryotherapy", "notes": "Multiple lesions treated", "followUp": "3 months" }, { "id": "hist_002", "date": "2023-10-15T10:00:00Z", "type": "visit", "provider": { "id": "prov_789", "name": "Dr. Emily Johnson" }, "chiefComplaint": "Suspicious mole", "diagnosis": ["Dysplastic nevus"], "treatment": "Excision biopsy", "pathology": { "result": "Benign", "reportDate": "2023-10-20T00:00:00Z" } } ], "totalRecords": 15, "dateRange": { "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } }
/patients/{id}/photos
{ "photo": <binary>, "type": "lesion", "bodyPart": "left_forearm", "description": "Pigmented lesion, 8mm diameter", "takenAt": "2024-01-20T11:00:00Z", "metadata": { "dermoscopy": true, "magnification": "10x", "lighting": "polarized" } }
{ "id": "photo_456", "patientId": "pat_123", "url": "https://storage.dermifi.com/photos/photo_456.jpg", "thumbnailUrl": "https://storage.dermifi.com/photos/thumb_456.jpg", "type": "lesion", "bodyPart": "left_forearm", "description": "Pigmented lesion, 8mm diameter", "takenAt": "2024-01-20T11:00:00Z", "uploadedAt": "2024-01-20T11:05:00Z", "uploadedBy": "usr_456", "metadata": { "dermoscopy": true, "magnification": "10x", "lighting": "polarized", "fileSize": "2.5MB", "dimensions": "3024x4032" } }
/patients/{id}/photos
?type=lesion&bodyPart=left_forearm&limit=10
{ "photos": [ { "id": "photo_456", "url": "https://storage.dermifi.com/photos/photo_456.jpg", "thumbnailUrl": "https://storage.dermifi.com/photos/thumb_456.jpg", "type": "lesion", "bodyPart": "left_forearm", "description": "Pigmented lesion, 8mm diameter", "takenAt": "2024-01-20T11:00:00Z", "uploadedAt": "2024-01-20T11:05:00Z", "uploadedBy": { "id": "usr_456", "name": "Dr. Emily Johnson" } }, { "id": "photo_455", "url": "https://storage.dermifi.com/photos/photo_455.jpg", "thumbnailUrl": "https://storage.dermifi.com/photos/thumb_455.jpg", "type": "lesion", "bodyPart": "left_forearm", "description": "Same lesion, 3 months prior", "takenAt": "2023-10-20T10:00:00Z", "uploadedAt": "2023-10-20T10:05:00Z" } ], "total": 2 }
/patients/{id}/notes
{ "type": "progress_note", "visitId": "visit_789", "content": { "chiefComplaint": "Follow-up for acne treatment", "hpi": "Patient reports improvement with tretinoin...", "examination": "Facial examination shows decreased comedones...", "assessment": "Acne vulgaris - improving", "plan": "Continue current regimen, follow-up in 6 weeks" }, "icd10Codes": ["L70.0"], "cptCodes": ["99213"], "confidential": false }
{ "id": "note_987", "patientId": "pat_123", "type": "progress_note", "visitId": "visit_789", "content": { "chiefComplaint": "Follow-up for acne treatment", "hpi": "Patient reports improvement with tretinoin...", "examination": "Facial examination shows decreased comedones...", "assessment": "Acne vulgaris - improving", "plan": "Continue current regimen, follow-up in 6 weeks" }, "icd10Codes": ["L70.0"], "cptCodes": ["99213"], "createdAt": "2024-01-20T14:30:00Z", "createdBy": { "id": "prov_789", "name": "Dr. Emily Johnson" }, "signedAt": "2024-01-20T14:35:00Z", "locked": true }
/providers
?specialty=dermatology&available=true&location=SF
{ "providers": [ { "id": "prov_789", "firstName": "Emily", "lastName": "Johnson", "title": "MD", "specialty": "Dermatology", "npiNumber": "1234567890", "licenseNumber": "CA12345", "licenseState": "CA", "email": "ejohnson@dermifi.com", "phone": "+1 (555) 111-2222", "locations": ["SF", "Oakland"], "languages": ["English", "Spanish"], "acceptingNewPatients": true, "rating": 4.8, "reviewCount": 245, "yearsOfExperience": 12, "education": [ { "degree": "MD", "institution": "Stanford University", "year": 2008 } ], "certifications": [ "American Board of Dermatology" ] } ], "total": 15 }
/providers
{ "firstName": "Michael", "lastName": "Chen", "title": "MD, PhD", "specialty": "Dermatology", "subspecialty": "Mohs Surgery", "npiNumber": "9876543210", "licenseNumber": "CA54321", "licenseState": "CA", "licenseExpiry": "2025-12-31", "deaNumber": "BC1234567", "email": "mchen@dermifi.com", "phone": "+1 (555) 333-4444", "locations": ["SF", "San Jose"], "languages": ["English", "Mandarin", "Cantonese"], "acceptingNewPatients": true, "education": [ { "degree": "MD", "institution": "Harvard Medical School", "year": 2010 }, { "degree": "PhD", "institution": "MIT", "year": 2008 } ], "residency": { "institution": "UCSF", "specialty": "Dermatology", "completionYear": 2014 }, "fellowship": { "institution": "Mayo Clinic", "specialty": "Mohs Surgery", "completionYear": 2015 }, "certifications": [ "American Board of Dermatology", "American College of Mohs Surgery" ] }
{ "id": "prov_790", "firstName": "Michael", "lastName": "Chen", "title": "MD, PhD", "specialty": "Dermatology", "subspecialty": "Mohs Surgery", "npiNumber": "9876543210", "licenseNumber": "CA54321", "licenseState": "CA", "licenseExpiry": "2025-12-31", "licenseVerified": false, "deaNumber": "BC1234567", "email": "mchen@dermifi.com", "phone": "+1 (555) 333-4444", "locations": ["SF", "San Jose"], "languages": ["English", "Mandarin", "Cantonese"], "acceptingNewPatients": true, "status": "pending_verification", "createdAt": "2024-01-20T12:00:00Z" }
/providers/{id}/schedule
?date=2024-01-20&location=SF
{ "providerId": "prov_789", "date": "2024-01-20", "location": "SF", "schedule": { "workingHours": { "start": "09:00", "end": "17:00", "break": { "start": "12:00", "end": "13:00" } }, "appointments": [ { "time": "09:00", "duration": 30, "patientId": "pat_123", "type": "follow_up", "status": "confirmed" }, { "time": "09:30", "duration": 30, "patientId": "pat_124", "type": "consultation", "status": "confirmed" } ], "availableSlots": [ "10:00", "10:30", "11:00", "11:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30" ] } }
/orders
{ "patientId": "pat_123", "providerId": "prov_789", "type": "prescription", "priority": "routine", "items": [ { "type": "medication", "name": "Tretinoin Cream 0.025%", "quantity": 1, "unit": "tube", "size": "45g", "instructions": "Apply thin layer to affected areas nightly" }, { "type": "medication", "name": "Clindamycin Gel 1%", "quantity": 1, "unit": "tube", "size": "30g", "instructions": "Apply twice daily to affected areas" } ], "pharmacy": { "id": "pharm_456", "name": "CVS Pharmacy", "address": "123 Market St, San Francisco, CA 94105", "phone": "+1 (555) 678-9012", "fax": "+1 (555) 678-9013" }, "shipping": { "method": "mail", "address": { "street": "123 Main St", "city": "San Francisco", "state": "CA", "zipCode": "94105" }, "expedited": false }, "notes": "Patient prefers generic if available" }
{ "id": "ord_234", "orderNumber": "ORD-2024-0234", "patientId": "pat_123", "providerId": "prov_789", "type": "prescription", "priority": "routine", "status": "pending", "items": [ { "id": "item_001", "type": "medication", "name": "Tretinoin Cream 0.025%", "genericName": "tretinoin", "quantity": 1, "unit": "tube", "size": "45g", "ndcCode": "12345-678-90", "instructions": "Apply thin layer to affected areas nightly", "refills": 3, "daysSupply": 90 }, { "id": "item_002", "type": "medication", "name": "Clindamycin Gel 1%", "genericName": "clindamycin phosphate", "quantity": 1, "unit": "tube", "size": "30g", "ndcCode": "98765-432-10", "instructions": "Apply twice daily to affected areas", "refills": 3, "daysSupply": 30 } ], "pharmacy": { "id": "pharm_456", "name": "CVS Pharmacy", "ncpdpId": "1234567" }, "totalCost": { "subtotal": 125.00, "insurance": -100.00, "copay": 25.00, "tax": 0, "total": 25.00 }, "createdAt": "2024-01-20T10:00:00Z", "estimatedReadyTime": "2024-01-20T14:00:00Z" }
/orders
?status=pending&patientId=pat_123&startDate=2024-01-01
• status: Order status (pending|processing|completed|cancelled)
• patientId: Filter by patient
• providerId: Filter by provider
• startDate: Orders from date
• endDate: Orders until date
{ "orders": [ { "id": "ord_234", "orderNumber": "ORD-2024-0234", "patientName": "John Doe", "providerName": "Dr. Emily Johnson", "type": "prescription", "status": "pending", "itemCount": 2, "totalAmount": 25.00, "createdAt": "2024-01-20T10:00:00Z", "priority": "routine" }, { "id": "ord_233", "orderNumber": "ORD-2024-0233", "patientName": "John Doe", "providerName": "Dr. Emily Johnson", "type": "lab", "status": "completed", "itemCount": 3, "totalAmount": 150.00, "createdAt": "2024-01-15T09:00:00Z", "completedAt": "2024-01-17T14:00:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 45 } }
/orders/{id}
id: ord_234
{ "id": "ord_234", "orderNumber": "ORD-2024-0234", "patient": { "id": "pat_123", "name": "John Doe", "dateOfBirth": "1985-06-15", "phone": "+1 (555) 123-4567" }, "provider": { "id": "prov_789", "name": "Dr. Emily Johnson", "npiNumber": "1234567890" }, "type": "prescription", "priority": "routine", "status": "processing", "statusHistory": [ { "status": "pending", "timestamp": "2024-01-20T10:00:00Z", "notes": "Order created" }, { "status": "processing", "timestamp": "2024-01-20T10:30:00Z", "notes": "Sent to pharmacy" } ], "items": [ { "id": "item_001", "type": "medication", "name": "Tretinoin Cream 0.025%", "status": "sent_to_pharmacy", "quantity": 1, "refills": 3, "prescriptionId": "rx_567" } ], "pharmacy": { "id": "pharm_456", "name": "CVS Pharmacy", "phone": "+1 (555) 678-9012", "status": "received" }, "createdAt": "2024-01-20T10:00:00Z", "updatedAt": "2024-01-20T10:30:00Z" }
/orders/{id}/cancel
{ "reason": "patient_request", "notes": "Patient found alternative treatment" }
{ "id": "ord_234", "status": "cancelled", "cancelledAt": "2024-01-20T11:00:00Z", "cancelledBy": "usr_456", "reason": "patient_request", "notes": "Patient found alternative treatment", "refund": { "amount": 25.00, "status": "processing", "expectedDate": "2024-01-23" } }
/orders/{id}/fulfill
{ "fulfilledBy": "pharm_456", "fulfilledItems": ["item_001", "item_002"], "pickupMethod": "in_store", "notes": "Patient picked up at 2:30 PM" }
{ "id": "ord_234", "status": "completed", "fulfilledAt": "2024-01-20T14:30:00Z", "fulfilledBy": "pharm_456", "fulfilledItems": ["item_001", "item_002"], "pickupMethod": "in_store", "completionTime": "4 hours 30 minutes" }
/prescriptions
{ "patientId": "pat_123", "providerId": "prov_789", "medication": { "name": "Doxycycline", "strength": "100mg", "form": "capsule", "ndcCode": "00000-0000-00" }, "sig": "Take 1 capsule by mouth twice daily with food", "quantity": 60, "quantityUnit": "capsules", "refills": 2, "daysSupply": 30, "substitutionAllowed": true, "indication": "Moderate acne vulgaris", "icd10Code": "L70.0", "notes": "Take with full glass of water", "priorAuthorization": { "required": false } }
{ "id": "rx_567", "rxNumber": "RX-2024-000567", "patientId": "pat_123", "providerId": "prov_789", "medication": { "name": "Doxycycline", "genericName": "doxycycline hyclate", "strength": "100mg", "form": "capsule", "ndcCode": "00000-0000-00", "manufacturer": "Generic Pharma" }, "sig": "Take 1 capsule by mouth twice daily with food", "quantity": 60, "quantityUnit": "capsules", "refills": 2, "refillsRemaining": 2, "daysSupply": 30, "substitutionAllowed": true, "indication": "Moderate acne vulgaris", "icd10Code": "L70.0", "status": "active", "writtenDate": "2024-01-20T11:00:00Z", "expirationDate": "2025-01-20T11:00:00Z", "deaSchedule": null, "eSigned": true, "eSignedAt": "2024-01-20T11:00:00Z" }
/prescriptions/{id}/send
{ "pharmacyId": "pharm_456", "method": "electronic", "priority": "routine", "patientNotes": "Please use generic if available", "pharmacyNotes": "Patient prefers morning pickup" }
{ "prescriptionId": "rx_567", "transmissionId": "trans_890", "sentTo": { "id": "pharm_456", "name": "CVS Pharmacy", "ncpdpId": "1234567", "address": "123 Market St, San Francisco, CA" }, "sentAt": "2024-01-20T11:05:00Z", "method": "electronic", "status": "transmitted", "confirmationNumber": "SURESCRIPT-123456", "estimatedReadyTime": "2024-01-20T15:00:00Z", "pharmacyAcknowledged": true, "pharmacyAcknowledgedAt": "2024-01-20T11:06:00Z" }
/prescriptions
?patientId=pat_123&status=active&includeExpired=false
• patientId: Filter by patient
• providerId: Filter by provider
• status: Prescription status (active|expired|cancelled)
• includeExpired: Include expired prescriptions
{ "prescriptions": [ { "id": "rx_567", "rxNumber": "RX-2024-000567", "medication": "Doxycycline 100mg", "patient": "John Doe", "provider": "Dr. Emily Johnson", "status": "active", "refillsRemaining": 2, "writtenDate": "2024-01-20", "lastFilled": "2024-01-20" }, { "id": "rx_566", "rxNumber": "RX-2024-000566", "medication": "Tretinoin 0.025% Cream", "patient": "John Doe", "provider": "Dr. Emily Johnson", "status": "active", "refillsRemaining": 3, "writtenDate": "2024-01-15", "lastFilled": null } ], "total": 12, "page": 1 }
/prescriptions/{id}/refill
{ "requestedBy": "patient", "pharmacyId": "pharm_456", "quantity": 60, "notes": "Patient traveling, needs early refill", "earlyRefillReason": "vacation" }
{ "refillId": "ref_789", "prescriptionId": "rx_567", "status": "pending_approval", "requestedAt": "2024-01-20T12:00:00Z", "requestedBy": "patient", "quantity": 60, "refillNumber": 1, "refillsRemaining": 1, "requiresApproval": true, "approvalReason": "early_refill", "estimatedApprovalTime": "2024-01-20T14:00:00Z", "pharmacyNotified": true }
/prescriptions/{id}/dosage
{ "newSig": "Take 2 capsules by mouth twice daily with food", "newQuantity": 120, "newDaysSupply": 30, "reason": "Increasing dose for better efficacy", "effectiveDate": "2024-01-21" }
{ "id": "rx_567", "previousSig": "Take 1 capsule by mouth twice daily with food", "newSig": "Take 2 capsules by mouth twice daily with food", "previousQuantity": 60, "newQuantity": 120, "updatedAt": "2024-01-20T13:00:00Z", "updatedBy": "prov_789", "reason": "Increasing dose for better efficacy", "effectiveDate": "2024-01-21", "pharmacyNotified": true, "requiresNewRx": false }
/refills/pending
?providerId=prov_789&priority=urgent
{ "refills": [ { "id": "ref_789", "patient": { "id": "pat_123", "name": "John Doe" }, "medication": "Doxycycline 100mg", "requestedAt": "2024-01-20T12:00:00Z", "priority": "urgent", "reason": "Patient out of medication", "lastFilled": "2023-12-20", "refillsRemaining": 1 } ], "total": 5, "urgentCount": 2 }
/refills/{id}/approve
{ "approvedBy": "prov_789", "quantity": 60, "notes": "Approved for vacation supply", "sendToPharmacy": true, "pharmacyId": "pharm_456" }
{ "refillId": "ref_789", "status": "approved", "approvedAt": "2024-01-20T14:00:00Z", "approvedBy": "prov_789", "quantity": 60, "sentToPharmacy": true, "pharmacyConfirmation": "SURE-REF-123456", "estimatedReadyTime": "2024-01-20T16:00:00Z", "patientNotified": true }
/refills/{id}/deny
{ "deniedBy": "prov_789", "reason": "too_soon", "explanation": "Last refill was 10 days ago", "alternativeAction": "schedule_appointment" }
{ "refillId": "ref_789", "status": "denied", "deniedAt": "2024-01-20T14:00:00Z", "deniedBy": "prov_789", "reason": "too_soon", "explanation": "Last refill was 10 days ago", "alternativeAction": "schedule_appointment", "patientNotified": true, "pharmacyNotified": true }
API requests are subject to rate limiting to ensure fair usage:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 950 X-RateLimit-Reset: 1642550400
All error responses follow a consistent format:
{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid request parameters", "details": [ { "field": "email", "message": "Invalid email format" } ], "requestId": "req_abc123", "timestamp": "2024-01-20T12:00:00Z" } }
Contact our developer support team for API integration assistance