Transaction API¶
The Transaction API exposes Prophet 21 business objects as discrete service endpoints. With over 500 services covering every major business domain, it is the broadest programmatic interface in the P21 platform. Each service corresponds to a P21 business object and supports standard CRUD operations against the underlying data — without invoking the full UI event chain.
Base URLs
V1 (Transaction)
V2 (Newer, more consistent)V2 Service Explorer
Browse all available V2 services interactively at:
Overview¶
The Transaction API is distinct from both the Interactive API and the REST Entity API:
- Unlike the Interactive API, the Transaction API does not open a P21 window and does not fire the full UI event chain. Business rules attached to UI windows do not fire.
- Unlike the REST Entity API, the Transaction API uses a SOAP/XML service model and often provides richer operation sets including composite operations that span multiple tables.
Use the Transaction API when you need structured, object-oriented access to P21 data with minimal overhead and a well-defined service contract — for example, in system integrations, middleware, or background data synchronization jobs.
Service URL Pattern¶
All services follow this URL pattern:
For example, to access the Customer service:
The WSDL for any service is available by appending ?wsdl:
Service Categories¶
Accounting & Finance¶
These services cover the general ledger, fiscal calendar, currency management, and tax reporting.
| Service | Description |
|---|---|
Account | Chart of accounts — GL account master records |
AccountAllocation | Allocation rules for distributing amounts across accounts |
AccountGroup | Groupings of GL accounts for reporting |
GLSegment | GL segment definitions (department, cost center, etc.) |
GLTransaction | General ledger transaction records |
JournalEntry | Journal entry headers and lines |
Currency | Currency master (codes, names, symbols) |
ExchangeRate | Exchange rate tables by date and currency pair |
FiscalYear | Fiscal year definitions |
FiscalPeriod | Fiscal period calendar within a fiscal year |
TaxCode | Tax code master and rate tables |
TaxAuthority | Tax authority (jurisdiction) definitions |
1099Form | 1099 form type definitions |
1099Balance | Vendor 1099 balance accumulations |
APInvoice | Accounts payable invoice headers |
APInvoiceLine | AP invoice line details |
APPayment | AP payment records |
ARInvoice | Accounts receivable invoice headers |
ARInvoiceLine | AR invoice line details |
ARPayment | AR cash receipt and payment application |
Sales¶
These services cover the full order-to-cash cycle, from customer master through invoicing.
| Service | Description |
|---|---|
Customer | Customer master records |
CustomerClass | Customer classification codes |
CustomerContact | Contacts associated with customers |
CustomerShipTo | Ship-to address records for customers |
CreditCard | Credit card records on file for customers |
SalesOrder | Order header and line composite |
OrderHeader | Sales order header (oe_hdr) records |
OrderLine | Sales order line (oe_line) records |
OrderNote | Notes attached to orders |
SalesRep | Sales representative master |
Territory | Sales territory definitions |
SalesCommission | Commission rate and rule definitions |
QuoteHeader | Quote header records |
QuoteLine | Quote line records |
InvoiceHeader | Invoice header records |
InvoiceLine | Invoice line records |
PriceBook | Price book header definitions |
PriceBookLine | Price book line (item/customer pricing) |
SpecialPrice | Special/contract pricing records |
Promotion | Promotional pricing rules |
ReturnMerchandise | RMA header and line records |
Purchasing¶
These services cover the procure-to-pay cycle, from vendor master through voucher.
| Service | Description |
|---|---|
PurchaseOrder | PO header and line composite |
POHeader | Purchase order header records |
POLine | Purchase order line records |
PONote | Notes attached to purchase orders |
Vendor | Vendor master records |
VendorClass | Vendor classification codes |
VendorContact | Contacts associated with vendors |
VendorShipFrom | Ship-from address records for vendors |
LandedCost | Landed cost definitions and allocations |
SupplierPricing | Supplier price files and brackets |
SupplierLead | Supplier lead time information |
ReceiptHeader | Receipt (PO receiving) header records |
ReceiptLine | Receipt line records |
Voucher | AP voucher records (payable side of receipt) |
BlanketOrder | Blanket purchase order definitions |
BlanketRelease | Releases against blanket orders |
Inventory¶
These services cover the inventory master, lot and serial tracking, and inventory movements.
| Service | Description |
|---|---|
InventoryMaster | Item master records (inv_mast) |
InventoryLocation | Item-location records (inv_loc) |
InventorySupplier | Item-supplier relationship records |
ProductGroup | Product group master definitions |
ItemClass | Item class codes |
UnitOfMeasure | Unit of measure master |
UOMConversion | UOM conversion factors between units |
LotNumber | Lot number records for lot-tracked items |
SerialNumber | Serial number records for serialized items |
InventoryMovement | Inventory transaction/movement history |
AdjustmentReason | Reason codes for inventory adjustments |
CycleCount | Cycle count header records |
CycleCountLine | Cycle count line records |
PhysicalInventory | Physical inventory count records |
Substitution | Item substitution definitions |
Kit | Kit/assembly item definitions |
KitComponent | Component lines within kit definitions |
Operations & Warehouse¶
These services cover warehouse structure, shipping, and carrier management.
| Service | Description |
|---|---|
Warehouse | Warehouse master records |
Location | Location (bin) records within warehouses |
Bin | Bin records (fine-grained storage locations) |
ShipVia | Shipping method / carrier service definitions |
Carrier | Carrier (shipping company) master |
FreightCode | Freight charge code definitions |
ShipmentHeader | Outbound shipment header records |
ShipmentLine | Outbound shipment line records |
PackingList | Packing list records |
TransferOrder | Warehouse-to-warehouse transfer order headers |
TransferLine | Transfer order line records |
System & Configuration¶
These services cover company setup, user management, and configuration tables.
| Service | Description |
|---|---|
Company | Company master record |
Branch | Branch/profit-center master |
Division | Division definitions |
User | P21 user account records |
SecurityGroup | Security group definitions |
UserSecurityGroup | User-to-security-group assignments |
ActivityType | Activity type codes (for CRM/notes) |
NoteType | Note type codes |
AddressBook | Address book records |
State | State/province code table |
Country | Country code table |
ZipCode | Zip code master (city/state lookup) |
V2 API¶
The V2 API is a newer service layer built on a more consistent architectural foundation. It exposes the same business objects with improved URL design and response formats.
V2 Base URL¶
V2 Service Explorer¶
The V2API.aspx page provides an interactive browser for all V2 services with full schema documentation:
Prefer V2 for New Development
For new integrations, start with the V2 API. It has a more consistent response envelope, better error messages, and is the direction of future development. Fall back to V1 Transaction services only when V2 does not cover the required business object.
V2 vs V1 Comparison¶
| Aspect | V1 Transaction | V2 API |
|---|---|---|
| URL structure | /interactive/transaction/{Service} | /ui/{Service} |
| Response format | SOAP/XML envelope | Cleaner XML / optional JSON |
| Error detail | Basic fault messages | Structured error objects |
| Service coverage | 500+ services | Growing subset of V1 |
| Consistency | Variable across services | Standardized across services |
| WSDL available | Yes (?wsdl) | Yes |
User-Defined Tables (UDTs)¶
P21 allows customers to add custom tables to the database. These User-Defined Tables are surfaced through the Transaction API using the same service pattern as standard P21 tables.
If your organization has added custom tables (e.g., udt_customer_profile, udt_project_tracking), they are typically accessible as:
Check the V2 Service Explorer for the exact service names registered for your custom tables.
UDT Schema Varies by Customer
UDT schemas are defined per-installation. There is no standard schema for UDTs — consult your P21 database administrator or the UDT configuration in P21 Setup to determine column names and data types.
Authentication¶
All Transaction API services require a valid P21 session. Include the session token in the SOAP header or as an HTTP cookie depending on the service version.
<soap:Header>
<SessionHeader xmlns="urn:epicor-com:p21:session">
<SessionId>your-session-token-here</SessionId>
</SessionHeader>
</soap:Header>
Obtain a session token via the Common Services CreateSession call before invoking any Transaction API service.
Standard Operations¶
Most Transaction API services expose these standard operations:
| Operation | Description |
|---|---|
Get | Retrieve a record by primary key |
GetList | Retrieve a filtered list of records |
Add | Insert a new record |
Update | Update an existing record |
Delete | Delete a record by primary key |
GetByQuery | Query with arbitrary filter criteria |
Example: Get a Customer¶
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<SessionHeader xmlns="urn:epicor-com:p21:session">
<SessionId>abc123</SessionId>
</SessionHeader>
</soap:Header>
<soap:Body>
<Get xmlns="urn:epicor-com:p21:transaction:Customer">
<customerId>C100001</customerId>
</Get>
</soap:Body>
</soap:Envelope>
Example: Add a Customer¶
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="urn:epicor-com:p21:transaction:Customer">
<customer>
<customer_id>C999001</customer_id>
<customer_name>New Customer Inc</customer_name>
<terms_code>NET30</terms_code>
<currency_id>USD</currency_id>
<credit_limit>10000.00</credit_limit>
</customer>
</Add>
</soap:Body>
</soap:Envelope>
Choosing Between Transaction API and Other Interfaces¶
| Need | Recommended Interface |
|---|---|
| Bulk data load / ETL | Transaction API or Entity API |
| UI-identical behavior with all business rules | Interactive API |
| Simple CRUD on a known business object | Transaction API |
| Custom query / reporting | Entity API (REST GET with OData) |
| Driving a multi-step P21 workflow | Interactive API |
| Accessing UDTs | Transaction API |
| Real-time integration with downstream systems | Transaction API |
Error Handling¶
Transaction API services return SOAP faults for system-level errors. Business validation errors are returned inside the response body.
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Record not found: customer_id = C999999</faultstring>
<detail>
<ErrorDetail>
<ErrorCode>1001</ErrorCode>
<ErrorMessage>No customer record found for the supplied ID.</ErrorMessage>
</ErrorDetail>
</detail>
</soap:Fault>
| Fault Code Pattern | Meaning |
|---|---|
soap:Client | Request was malformed or missing required fields |
soap:Server | Server-side error: record not found, constraint violation, etc. |
| Authentication fault | Session missing, expired, or invalid |
No UI Validation
The Transaction API does not fire UI business rules. A record inserted via Customer.Add will not trigger validator rules configured on the Customer window in P21. If you need those validations, use the Interactive API instead or implement equivalent validation in your integration layer.