How-toEpicor Prophet 21APIs / Integration

Epicor Prophet 21 API Documentation: Which API to Use and Where to Find the Docs

Question
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

  1. 1Decide the job: read data (Data Service / OData), create or change a business document (Middleware transaction API) or legacy integration (SOAP).
  2. 2Confirm your licence and that the relevant service is installed and reachable from the integration host.
  3. 3Request an access token with a dedicated API user. Check the existing token and 401 page if the call fails.
  4. 4For OData, call a view with $top and $select first, then add $filter. Use views, not base tables, so you stay on supported shapes.
  5. 5For Middleware, find the transaction you need in the documentation, build the JSON body and post it with the token in the Authorization header.
  6. 6Capture the response and error messages; P21 validation messages come back from the same rules the screen applies.
  7. 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

Open full tool

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

Error fix

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-to

How 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-to

Epicor 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 fix

Fixing 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-to

Fixing 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-to

Epicor 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 ERP

AI 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

ERP fixes and how-tos

Guides

AI on your ERP

Integrations

Software