Epicor Prophet 21 API Documentation: Which API to Use and Where to Find the Docs
epicor prophet 21 api documentation
Also searched as
- p21 api documentation
- epicor application studio prophet 21
- prophet 21 odata api
- prophet 21 middleware api
Short answer
Prophet 21 (P21) exposes several APIs: the Data Service for read access over OData, the Middleware (REST) for transactions such as orders and receipts, and older SOAP style services. Documentation is mostly through Epicor's partner and customer portals plus the help pages on your own P21 server. Pick OData for reporting and lookups and Middleware for creating or changing business documents.
Applies to: Epicor Prophet 21 on-prem and hosted. Endpoints and availability depend on version and licence; confirm with Epicor.
Choose and test the right API
- 1Decide the job: read data (Data Service / OData), create or change a business document (Middleware transaction API) or legacy integration (SOAP).
- 2Confirm your licence and that the relevant service is installed and reachable from the integration host.
- 3Request an access token with a dedicated API user. Check the existing token and 401 page if the call fails.
- 4For OData, call a view with $top and $select first, then add $filter. Use views, not base tables, so you stay on supported shapes.
- 5For Middleware, find the transaction you need in the documentation, build the JSON body and post it with the token in the Authorization header.
- 6Capture the response and error messages; P21 validation messages come back from the same rules the screen applies.
- 7Move from a test environment to production only after replaying real sample data.
Data Service (OData)
The Data Service gives read-oriented access to P21 data through OData views. It suits reporting, dashboards and syncing item or customer data into other systems.
Use $select to limit columns and paging to limit volume. Views reflect P21 business concepts, which makes them easier to use than raw tables, though you must still understand the joins.
Middleware and transactions
The Middleware lets you create and update documents such as sales orders, purchase orders or receipts through the same business logic the application uses. Validation, defaults and security apply.
Because it follows application logic, payloads must be complete for that transaction. Start from a sample the documentation provides and change one field at a time.
SOAP and Application Studio
Older integrations may still use SOAP services. For new work prefer the REST based options where they cover the use case.
Epicor Application Studio is mainly for building and customising Kinetic screens. Where P21 supports Application Studio style tooling in your version, it is a UI customisation tool, not an integration API; do not confuse the two.
Try it here, free
Prophet 21 Inventory Replenishment Calculator
Work out order point, safety stock, EOQ and a max level for a distribution item, then compare against what your P21 replenishment parameters say.
Common pitfalls
- !Using OData for writes; it is for reading.
- !Sharing one API user across several integrations so audit is useless.
- !Posting incomplete Middleware payloads and chasing generic errors.
- !Querying huge views without filters during business hours.
- !Assuming endpoints are identical across versions.
How an ERP-grounded AI assistant handles this
A read-only assistant on the OData views can answer questions like open orders by branch with the query shown. For write actions, the safe pattern is a proposed Middleware payload that a person approves. On-prem P21 keeps all of it inside your network.
Frequently asked questions
Does Prophet 21 have a REST API?
Yes. P21 provides OData based data access and a Middleware with REST style transaction endpoints, alongside older SOAP services. Availability depends on version and licence.
Where is the P21 API documentation?
Mostly in Epicor's customer and partner resources and in help pages hosted on your own P21 server. Ask your account manager for access if you cannot see it.
OData or Middleware?
Use OData to read data and Middleware to create or update business documents. Do not write to the database directly.
How do I authenticate to the P21 API?
Request a token using an API user and send it as a bearer token on subsequent calls. If you get 401, see the token troubleshooting page.
Related
Prophet 21 API returns 401 Unauthorized: how to fix token and OData access
A 401 from the Prophet 21 API almost always means the bearer token was never obtained, has expired, or is not being sent on the call. Request a token from the security endpoint with a valid P21 user, send it in the Authorization header on every request, and make sure that user has access to the data and services you are calling.
How-toHow to use DynaChange in Prophet 21 to change screens without custom code
DynaChange is Prophet 21's built-in tool for adjusting windows without programming: you can hide or disable fields, change labels, make fields required, and set defaults, scoped to a user, role or the whole company. Build the change against the window you want to alter, test it in a test environment with a real user role, and document each rule so it survives upgrades.
How-toEpicor Kinetic API Documentation: Where It Lives and How the URLs Work
Epicor Kinetic documents its REST API on your own server: a Swagger-style help page under /api/help lists every business object, method and field for your exact version. v1 uses /api/v1/ service URLs, v2 uses /api/v2/odata/{Company}/ and adds function (EFx) and BAQ endpoints. There is no separate SDK you must install; most teams call REST or generate a client from the OpenAPI definition.
Error fixFixing Epicor BusinessObjectException: BPM Directive Errors
A BusinessObjectException that says "A Business Process Management (BPM) directive has raised the following error" means a directive on that business object stopped the transaction, either deliberately via a Raise Exception widget or accidentally via an unhandled .NET error in Custom Code. Expand the InnerException on the error dialog to see the real message and the directive name, then open BPM Designer for that object and method to find the widget that fired.
How-toFixing a Slow Epicor BAQ (Business Activity Query)
A slow BAQ in Epicor is usually caused by unindexed join columns, a subquery or calculated field forcing a table scan, or the BAQ pulling far more rows than the dashboard actually displays before filtering client-side. Fix it by reading the SQL Server execution plan Epicor generates, moving filters into the BAQ criteria instead of the dashboard filter panel, and replacing subqueries with joins where possible.
How-toEpicor MRP Runs but Generates No Suggestions
When Epicor's MRP process completes without a job or purchase suggestion for a part you expect one for, the cause is almost always the part's own configuration (Part Class Type, Make Direct, Non-MRP flag, planning Time Fence) or the demand not being linked in a way MRP recognizes, not a defect in the MRP engine. Work through the part's Planning tab, its safety stock and lead time setup, and the demand source (sales order line status, job material requirement) before assuming the run itself failed.
AI for ERPAI for Epicor Prophet 21, Built for Distribution Operations
Prophet 21 AI for distributors: on-prem or private-cloud LLM grounded in P21 order, inventory, and purchasing data, for order follow-up, forecasting, and pricing questions.
Stuck on Epicor Prophet 21?
Talk to engineers who work inside Epicor Prophet 21 every week, and who build private AI that answers these questions from your own ERP data.
Keep exploring
Free tools
- Prophet 21 Inventory Replenishment CalculatorWork out order point, safety stock, EOQ and a max level for a distribution item, then compare against what your P21 replenishment parameters say.
- Prophet 21 Data Cleanup ChecklistA checklist for cleaning item, customer, vendor, pricing and inventory data in Prophet 21 before an upgrade, migration or reporting project.
- Epicor Prophet 21 AI Assistant Sizing and Value CalculatorEstimate GPUs, index size, hours saved and payback for a private AI assistant used by counter sales and purchasing on Prophet 21.
ERP fixes and how-tos
- How to Add AI to Prophet 21 On-Premises Without Moving Your DataPrivate AI assistant for Epicor Prophet 21 on-prem: SQL Server views, P21 API options, local LLM, role and location filters, audit and rollout steps.
- Prophet 21 API returns 401 Unauthorized: how to fix token and OData accessGetting 401 from the Prophet 21 API or OData service? Check the token request, bearer header, user permissions, and server URL, with a working curl pattern.
- Epicor Prophet 21 License and Domain, Manuals and User GroupsWhat a Prophet 21 license and domain involve, where to find the P21 user manual and help, and how to join the user community. Plain guidance from an ERP perspective.
Integrations
- How to add AI agents to Epicor Prophet 21How to add AI agents to Epicor Prophet 21: a tool layer over the P21 APIs and SQL Server views, distribution workflows, human approval and on-prem hosting.
- How to add an AI chatbot to Epicor Prophet 21Add an AI chatbot to Epicor Prophet 21 for staff or customers: grounded in P21 order, stock and pricing data, role aware, and able to run fully on-prem.