REST API & INTEGRATIONS TUTORIAL

Epicor REST API Integration Tutorial (OData v4 & API Keys)

Learn how to construct secure REST API v2 HTTP client setups inside C# to fetch parts metadata and order lists from Epicor Kinetic.

Overview

Epicor REST API v2 exposes all server-side Business Objects as structured OData v4 endpoints. This allows developers to integrate e-commerce engines, MES devices, and mobile terminals with the ERP database securely. Refer to the official Epicor Help Documentation

When calling REST v2, it is mandatory to inject both basic credentials (or OAuth tokens) and an X-API-Key in the request headers. The API Key provides permission control and tracking for external calls.

Technical Implementation Details

To implement this solution in your Epicor environment, utilize the following code block. Ensure you replace the standard configurations with your company database names, server URLs, and keys.

// C# Setup for Epicor Kinetic REST v2 OData request
using (var client = new HttpClient())
{
    // Set Base Address and Headers
    client.BaseAddress = new Uri("https://yourserver.com/SaaS/api/v2/");
    client.DefaultRequestHeaders.Accept.Clear();
    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
    
    // Inject Required API Key and Auth
    client.DefaultRequestHeaders.Add("X-API-Key", "abc123XYZkey");
    var authBytes = Encoding.ASCII.GetBytes("api_user:secret_pass");
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(authBytes));

    // Requesting a filtered JSON list of open Part records using standard v2 service path
    var response = await client.GetAsync("api/v2/odata/EPIC01/Erp.BO.PartSvc/Parts?$filter=Inactive eq false&$top=10");
    if (response.IsSuccessStatusCode)
    {
        string json = await response.Content.ReadAsStringAsync();
        Console.WriteLine(json);
    }
}

Process Verification and Flow

Always use pagination parameters like $top and $skip when retrieving large datasets. Fetching thousands of customer records in a single request can block transaction queues on the App Server. For more complex server-side data operations, it is highly recommended to invoke custom Epicor Functions via REST rather than executing multiple heavy CRUD requests.

Related Resources & Services

Related Resources & Services

Looking for Professional ERP Customization Support?

Learn more about our Epicor REST API Integration Services or contact Amit directly to outline your optimization goals.

Request Free ERP Automation Audit