Files Generated:
1. API_ENDPOINTS.md (1,171 lines)
- Complete documentation of all 771 DocTypes in ERPNext
- Organized by 37 modules
- Sample record names for each DocType
- Full REST endpoint patterns
- Examples and usage instructions
2. generate_api_docs.py
- Python script to auto-discover and document all API endpoints
- Fetches live data from your ERPNext instance
- Can be re-run anytime to update documentation
3. discover_api_endpoints.sh
- Bash alternative for API discovery
- Lightweight script for quick checks
4. test_api.sh
- Ready-to-use API testing script
- Demonstrates authentication and common API calls
Key Features of the Documentation:
Complete Coverage:
- ✅ All 771 DocTypes documented
- ✅ 37 modules categorized
- ✅ Sample data for each DocType
- ✅ Single vs Standard vs Submittable types identified
- ✅ Child tables marked
API Endpoint Patterns for Each DocType:
# Standard DocTypes (e.g., Item, Customer)
GET /api/resource/{DocType} # List all
GET /api/resource/{DocType}/{name} # Get single
POST /api/resource/{DocType} # Create new
PUT /api/resource/{DocType}/{name} # Update
DELETE /api/resource/{DocType}/{name} # Delete
# Single DocTypes (e.g., System Settings)
GET /api/resource/{DocType}/{DocType} # Get singleton
Sample DocTypes by Category:
Standard DocTypes (most common):
- Customer, Item, Sales Order, Purchase Order, etc.
Single DocTypes (singletons):
- System Settings, Accounts Settings, Stock Settings, etc.
Submittable DocTypes (workflow):
- Sales Invoice, Purchase Invoice, Journal Entry, etc.
Child Tables (part of parent):
- Sales Order Item, Purchase Order Item, etc.