P21 API Documentation
Comprehensive guides and examples for Epicor Prophet 21 APIs
Disclaimer: This is unofficial, community-created documentation. It is not affiliated with, endorsed by, or supported by Epicor Software Corporation. All trademarks are property of their respective owners. Use at your own risk.
Getting Started
Authentication
Token generation, credentials vs consumer keys, V1 and V2 endpoints, and token refresh patterns.
API Selection Guide
Decision tree and comparison table to help you choose the right API for your use case.
API Reference
OData API READ
Query any P21 table using standard OData v3 protocol. Filtering, pagination, and complex queries.
Transaction API WRITE
Stateless bulk operations for creating and updating records. Service discovery and async operations.
Interactive API READ/WRITE
Stateful window interactions with full business logic. Sessions, windows, and response handling.
Entity API CRUD
Simple REST operations on customers, vendors, contacts, and addresses.
Inventory REST API CRUD
Inventory item CRUD and multi-company workflows. Read inv_loc data, append locations and suppliers.
Troubleshooting & Reference
Error Handling
HTTP status codes, API-specific errors, Python error handling patterns, and debugging tips.
Session Pool Issues
Diagnosing and fixing Transaction API session pool contamination and related problems.
SalesPricePage Codes
Dropdown code mappings for the Sales Price Page window in the Interactive API.
Batch Processing Patterns
Production patterns for bulk operations: session batching, error recovery, and async client.
Changelog
Complete history of changes, additions, and contributors to this documentation project.