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

> Source: https://netray.co/erp-help/epicor-prophet-21-api-documentation-odata-middleware
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## 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.

## Kind

how-to

## System

epicor

## Erp

Epicor Prophet 21

## Module

APIs / Integration

## Query

epicor prophet 21 api documentation

## Alternate Queries

- p21 api documentation
- epicor application studio prophet 21
- prophet 21 odata api
- prophet 21 middleware api

## Applies To

Epicor Prophet 21 on-prem and hosted. Endpoints and availability depend on version and licence; confirm with Epicor.

## Steps

### Choose and test the right API

**Items:**

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

## Sections

### Data Service (OData)

**Body:**

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

**Body:**

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

**Body:**

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.

## 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.

## Ai Angle

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.

## Faq

### Does Prophet 21 have a REST API?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

epicor prophet 21 api documentation, p21 api, prophet 21 odata, p21 middleware api, prophet 21 rest api, p21 data service, epicor application studio prophet 21

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
