API Endpoints Intro
This article catalogs the Epicor Prophet 21 endpoints that the integration calls during synchronization. It provides a complete inventory of every endpoint the integration depends on, so that if Epicor publishes a deprecation notice you can quickly determine whether the integration is affected. It is also useful for firewall whitelisting, troubleshooting, and understanding how data flows between Prophet 21 and iPaaS.com.
Prophet 21 exposes a REST/OData service. The integration reads data from Prophet 21 using the OData query service (odataservice) and writes data into Prophet 21 using the Prophet 21 transaction API. All requests are issued against the base URL of your Prophet 21 instance.
The base URL varies by environment:
Environment | Base URL |
Test / Sandbox |
|
Production | Provided by your client (your live Prophet 21 instance) |
Throughout this article, [Base URL] represents the base URL for your environment. For example, in a sandbox environment a request shown as [Base URL]/odataservice/odata/table/customer resolves to https://sandbox-test.epicordistribution.com/odataservice/odata/table/customer.
OData reads support the following common query parameters:
Parameter | Description | Example |
| Restricts the result set to records matching a condition |
|
| Limits the response to specific fields |
|
| Maximum number of records returned per page |
|
| Number of records to skip (used with |
|
Scheduled polling reads use a date-windowed $filter on date_last_modified so that only records changed since the previous poll are retrieved.
Table of Contents
Customer Endpoints
Customer Address Endpoints
Company Endpoints
Company Address Endpoints
Location Endpoints
Product Endpoints
Product Inventory Endpoints
Transaction Endpoints
Authorization Endpoint
Customer Endpoints
Get a Customer by Id (GET)
[Base URL]/odataservice/odata/table/contacts?$filter=id eq '{Id}'Retrieve Customers Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/contacts?$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Create or Update a Customer (POST)
[Base URL]/uiserver0/api/v2/transaction
Customer Address Endpoints
Get a Customer Address by Id (GET)
[Base URL]/odataservice/odata/table/address?$filter=id eq {Id}Create or Update a Customer Address (POST)
[Base URL]/uiserver0/api/v2/transaction
Company Endpoints
Get a Company by Id (GET)
[Base URL]/odataservice/odata/table/customer?$filter=customer_id eq {Id}Retrieve Companies Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/customer?$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Company Address Endpoints
Get a Company Address by Id (GET)
[Base URL]/odataservice/odata/table/address?$filter=id eq {Id}Location Endpoints
Get a Location by Name (GET)
[Base URL]/odataservice/odata/table/location?$filter=location_name eq '{Name}'Retrieve Locations Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/location?$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Product Endpoints
Get a Product by Id (GET)
[Base URL]/odataservice/odata/table/inv_mast?$filter=item_id eq '{Id}'Get a Product Id by SKU (GET)
[Base URL]/odataservice/odata/table/inv_mast?$select=item_id&$filter=item_id eq '{Sku}'Retrieve Products Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/inv_mast?$select=item_id,date_last_modified,inv_mast_uid&$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Manage Product Attribute Sets (GET / POST / PUT)
[Base URL]/attribute_sets
[Base URL]/attribute_sets/{Id}Product attribute sets are retrieved with GET, created with POST, and updated with PUT (PUT targets a specific attribute set by {Id}).
Product Inventory Endpoints
Get Product Inventory for a Product (GET)
[Base URL]/odataservice/odata/table/inv_mast?$select=item_id,item_desc,inv_mast_uid,date_created,product_type,price1,price2,upc_or_ean,d_length,height,weight,width,inactive,item_sales_tax_class&$filter=item_id eq '{ProductId}'Get Product Inventory by Inventory Master Id and Location Id (GET)
[Base URL]/odataservice/odata/table/inv_loc?$filter=inv_mast_uid eq {InvMastUid} and location_id eq {LocationId}When no location is specified, the location_id clause is omitted and inventory for all locations of the product is returned.
Retrieve Product Inventory Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/inv_loc?$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Transaction Endpoints
Get Invoice by Invoice No (GET)
[Base URL]/odataservice/odata/table/invoice_hdr?$filter=invoice_no eq '{Id}'Get Invoice Lines by Invoice No (GET)
[Base URL]/odataservice/odata/table/invoice_line?$filter=invoice_no eq '{Id}' and inv_mast_uid ne nullRetrieve Invoices Modified Since a Specific Time (GET)
[Base URL]/odataservice/odata/table/invoice_hdr?$top={limit}&$skip={page * limit}&$filter=date_last_modified gt {Timestamp}Get an Order by Order No (GET)
[Base URL]/odataservice/odata/table/oe_hdr?$filter=order_no eq '{Id}'Get Order Lines by Order No (GET)
[Base URL]/odataservice/odata/table/oe_line?$filter=order_no eq '{Id}'Get Tracking Number by Invoice No (GET)
[Base URL]/odataservice/odata/table/oe_pick_ticket?$filter=invoice_no eq {Id}Get Ship To by Customer Id (GET)
[Base URL]/odataservice/odata/table/ship_to?$filter=customer_id eq {Id}Create or Update a Transaction (POST)
[Base URL]/uiserver0/api/v2/transaction
This single transaction endpoint is used to write the transaction header, transaction address, transaction lines, and tracking number into Prophet 21.
Authorization Endpoint
Obtain an Access Token (POST)
[Base URL]/api/security/token
The integration exchanges your Prophet 21 username and password for an access token at this endpoint. The token is obtained automatically on the first transfer, cached, and refreshed automatically when it expires (the partner documents a token lifetime of approximately 24 hours). Subscribers do not need to obtain or manage the token manually.
