Disclaimer: This is unofficial, community-created documentation for Epicor Prophet 21 APIs. It is not affiliated with, endorsed by, or supported by Epicor Software Corporation. All product names, trademarks, and registered trademarks are property of their respective owners. Use at your own risk.
Comprehensive documentation and working Python examples for all Prophet 21 integration APIs.
This repository provides developer-focused documentation for P21's integration APIs. All content is based on official Epicor SDK documentation and verified working implementations.
| API | Purpose | Best For |
|---|---|---|
| OData | Read-only data access via standard OData protocol | Reporting, lookups, data exports |
| Transaction API | Stateless bulk data manipulation | Bulk creates, external integrations |
| Interactive API | Stateful window interactions with business logic | Complex workflows, validation |
| Entity API | Simple CRUD on business objects | Basic record operations |
| Inventory REST API | Inventory item CRUD, multi-company workflows | Item reads, appending locations/suppliers |
# Clone and setup
git clone https://github.com/mrwuss/p21-api-documentation.git
cd p21-api-documentation
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your P21 credentials
# Run an example
python scripts/odata/01_basic_query.py- Authentication - Token generation, credentials vs consumer key
- API Selection Guide - Which API to use when
- OData API - Query syntax, filtering, pagination
- Transaction API - Service discovery, bulk operations
- Interactive API - Sessions, windows, workflows
- Entity API - Entity CRUD operations
- Inventory REST API - Inventory CRUD, multi-company workflows
- Error Handling - HTTP codes, error responses
- Session Pool Issues - Intermittent failures
- SalesPricePage Dropdown Codes - Valid values for price page fields
- Batch Processing Patterns - Production batch operation patterns
- Changelog - All changes and contributors
scripts/odata/01_basic_query.py- Simple table queryscripts/odata/02_filtering.py- Filter expressionsscripts/odata/03_pagination.py- Skip, top, countscripts/odata/04_complex_queries.py- Advanced queries
scripts/transaction/01_list_services.py- Discover servicesscripts/transaction/02_get_definition.py- Get service schemascripts/transaction/03_create_single.py- Create one recordscripts/transaction/04_create_bulk.py- Batch operationsscripts/transaction/test_session_pool.py- Diagnose pool issues
scripts/interactive/01_open_session.py- Session lifecyclescripts/interactive/02_open_window.py- Window operationsscripts/interactive/03_change_data.py- Field manipulationscripts/interactive/04_save_and_close.py- Save workflow
scripts/entity/01_list_entities.py- Discover entitiesscripts/entity/02_query_entity.py- Query recordsscripts/entity/03_create_entity.py- Create record
| Variable | Required | Description |
|---|---|---|
P21_BASE_URL |
Yes | P21 server URL (e.g., https://play.p21server.com) |
P21_USERNAME |
Yes | P21 API username |
P21_PASSWORD |
Yes | P21 API password |
All documentation is derived from:
- Official SDK: Epicor P21 SDK documentation
- Working Code: Verified implementations from production projects
- Actual Testing: Tested against P21 test environments
This documentation is a community effort! We welcome contributions:
- Found an error? Open an issue
- Need something documented? Request it
- Have P21 knowledge to share? Contribute
- Questions? Start a discussion
See CONTRIBUTING.md for guidelines.
MIT License - See LICENSE file