# Epicor REST API v2 URL Builder for OData Services and BAQs

> Source: https://netray.co/tools/epicor-rest-api-v2-url-builder
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Fill in server, instance, company and service to get a ready OData URL, a curl command and the required headers for the Epicor REST API v2.

## Category

epicor

## Erp

Epicor Kinetic

## Industry

Discrete Manufacturing

## Audience

- Epicor developer
- Integration engineer
- BAQ developer

## Tool

**Kind:** template

**Output:** code

**Language:** http

**Fields:**

#### Server host

**Key:** host

**Type:** text

**Default:** erp.example.com

#### Instance (site) name

**Key:** instance

**Type:** text

**Default:** Kinetic

#### Company ID

**Key:** company

**Type:** text

**Default:** EPIC06

#### Service

**Key:** service

**Type:** select

**Options:**

- Erp.BO.JobEntrySvc
- Erp.BO.PartSvc
- Erp.BO.SalesOrderSvc
- Erp.BO.POSvc

**Default:** Erp.BO.JobEntrySvc

#### Entity set

**Key:** entity

**Type:** text

**Default:** JobHeads

#### OData filter (URL-encoded)

**Key:** filter

**Type:** text

**Default:** JobReleased%20eq%20true%20and%20JobClosed%20eq%20false

#### Fields to return

**Key:** select

**Type:** text

**Default:** JobNum,PartNum,ProdQty,DueDate

#### Top (max rows)

**Key:** top

**Type:** number

**Default:** 50

#### BAQ ID (for BAQ call)

**Key:** baq

**Type:** text

**Default:** OpenJobsByOp

**Blocks:**

#### Business object GET

**Body:** GET https://{{host}}/{{instance}}/api/v2/odata/{{company}}/{{service}}/{{entity}}?$top={{top}}&$filter={{filter}}&$select={{select}}

#### Saved BAQ GET

**Body:** GET https://{{host}}/{{instance}}/api/v2/odata/{{company}}/BaqSvc/{{baq}}/Data?$top={{top}}

#### Headers

**Body:** Authorization: Basic <base64 of user:password>
x-api-key: <your API key>
Accept: application/json
Content-Type: application/json

#### curl example

**Body:** curl -X GET "https://{{host}}/{{instance}}/api/v2/odata/{{company}}/{{service}}/{{entity}}?$top={{top}}&$filter={{filter}}&$select={{select}}" -H "Authorization: Basic <base64>" -H "x-api-key: <key>" -H "Accept: application/json"

**Notes:** Confirm the URL pattern, entity set names and authentication scheme for your Kinetic version and hosting, since cloud and on-premises setups can differ. Never put credentials in source control, and test against a non-production instance first.

## Content

**Intro:** The Epicor REST API v2 exposes business objects and saved BAQs as OData endpoints. Getting the URL right, with company, service, entity and encoded filter, is where most first calls fail. This builder assembles the pieces for you.

**Sections:**

#### How to use the builder

**Body:** Fill in your host, instance and company, select a service and set the entity set, filter and fields. Copy the GET line into a REST client such as Postman, add the headers, and run it against a test instance. For BAQ results, enter the BAQ ID and use the BAQ call. Always URL-encode spaces in filters as percent twenty.

**Bullets:**

- Pattern: host / instance / api/v2/odata / company / service / entity
- Use $select to return only the fields you need
- Use $top while testing to limit the load
- Send an API key header plus your normal credentials

#### OData filters in practice

**Body:** Filters use operators such as eq, ne, gt, lt, and and or. String values go in single quotes and booleans are written true or false. For example, a filter for released and open jobs combines two boolean conditions with and. URL-encode the filter so spaces and quotes survive transport. Test small filters first and add conditions one at a time.

#### Business objects versus BAQs

**Body:** Business object services are good for reading and writing standard entities and respect the business logic and BPMs on the service. BAQs are better for read-only joined data that you have already designed. A BAQ call needs the query saved, and the calling user needs permission to run it.

#### Common mistakes

**Body:** Forgetting the company segment, using the wrong instance name, leaving spaces unencoded, and requesting every field of a large table with no top. Also check that the API key is valid for the user and that the user has access to the service in security. Hard-coded credentials in scripts are a frequent audit finding.

**Cta:** If you are building integrations over Epicor, we can help design a read-only API layer with logging and approval for any write-back.

**Faq:**

#### What does an Epicor REST API v2 URL look like?

**Answer:** The pattern is the server, the instance name, then api/v2/odata, then the company ID, the service name and the entity set, with OData query options after a question mark. Exact details depend on version and hosting, so confirm in your API help page.

#### How do I authenticate to the Epicor REST API?

**Answer:** Most setups use an API key header together with credentials such as basic authentication, though token-based options exist depending on version and hosting. Use a dedicated integration account with limited security rights and keep keys out of source control.

#### Can I call a saved BAQ over REST?

**Answer:** Yes. Saved BAQs can be reached through the BAQ service by ID, returning the query results as JSON. The calling user needs access to the BAQ, and query parameters can be supplied as options on the URL.

#### Why do I get an empty list or a 401?

**Answer:** An empty list usually means the filter is too narrow or the wrong company is used. A 401 points to a missing or invalid API key or credentials. Check the company segment, encoding of the filter and the security of the integration user.

## Search terms

epicor rest api v2, epicor rest api url, epicor odata filter example, epicor rest api baq, epicor api key header, epicor kinetic rest, epicor jobentry rest, epicor rest api curl

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