> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Epicor Kinetic REST API

> Client-mode REST API connector for Epicor Kinetic OData v2 (Jobs, Labor, Parts, Inventory)

Technical Preview

## Overview

Client-mode REST API connector for Epicor Kinetic OData v2 (Jobs, Labor, Parts, Inventory). `BASE_ADDRESS` defaults to `https://YOUR_SERVER/YOUR_INSTANCE/api/v2/odata/YOUR_COMPANY`. Auth: **Basic or API key + Bearer (Epicor Identity)**. Pass secrets only at runtime via MQTT JSON placeholders or Hub `GET SECRET` — never commit real credentials.

## Auth

Basic or API key + Bearer (Epicor Identity). Prefer Hub secrets / `GET SECRET`. Never hard-code tokens into the `.lot`.

## Basic Syntax

```lot wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}

DEFINE ROUTE EpicorKineticRestApi WITH TYPE REST_API
    ADD REST_API_CONFIG
        WITH BASE_ADDRESS "https://YOUR_SERVER/YOUR_INSTANCE/api/v2/odata/YOUR_COMPANY"
        WITH ENABLE_CLIENT "true"
        WITH USE_SSL "true"
        WITH REQUEST_TIMEOUT '30'
        WITH DEFAULT_CONTENT_TYPE "application/json"
        # Auth: Authorization Bearer {value.json.access_token} — prefer Hub secrets / GET SECRET.
        # Optional Basic: WITH USERNAME "YOUR_USER" / WITH PASSWORD GET SECRET "APP_PASSWORD"
    ADD EVENT Listjobs
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Listjobs"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Listjobs"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.JobEntrySvc/Jobs"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
    ADD EVENT Getjob
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Getjob"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Getjob"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.JobEntrySvc/Jobs('{value.json.JobNum}')"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
    ADD EVENT Createlabor
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Createlabor"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Createlabor"
        WITH METHOD "POST"
        WITH ENDPOINT "/Erp.BO.LaborSvc/Labors"
        WITH HEADERS
            ADD "Content-Type" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
        WITH BODY "{payload}"
    # ... additional EVENTs in package .lot ...
```

## MQTT topics

Request topics under `integrations/epicor-kinetic/request/...`; responses on `integrations/epicor-kinetic/response/...`.

## Template reference

Generated from the shipped broker template `epicor-kinetic` (`-routeCode EPICOR_KINETIC`). It lists every event the template defines.

### Auth

Basic or API key + Bearer (Epicor Identity)

Auth headers used by the template: `Authorization: Bearer {value.json.access_token}`, `x-api-key: {value.json.api_key}`.

### Template parameters

| Placeholder | Type | Description | Required |
| - | - | - | - |
| `RouteName` | string | Name of the Epicor Kinetic connector | no |
| `BaseUrl` | string | Epicor Kinetic base URL without trailing slash (e.g. https\://YOUR\_SERVER/YOUR\_INSTANCE/api/v2/odata/YOUR\_COMPANY) | yes |

`BASE_ADDRESS` default: `https://YOUR_SERVER/YOUR_INSTANCE/api/v2/odata/YOUR_COMPANY`.

### Events

| Event | Method | Endpoint | Request topic | Response topic | Payload fields |
| - | - | - | - | - | - |
| `Listjobs` | GET | `/Erp.BO.JobEntrySvc/Jobs` | `integrations/epicor-kinetic/request/Listjobs` | `integrations/epicor-kinetic/response/Listjobs` | `access_token`, `api_key` |
| `Getjob` | GET | `/Erp.BO.JobEntrySvc/Jobs('{value.json.JobNum}')` | `integrations/epicor-kinetic/request/Getjob` | `integrations/epicor-kinetic/response/Getjob` | `JobNum`, `access_token`, `api_key` |
| `Createlabor` | POST | `/Erp.BO.LaborSvc/Labors` | `integrations/epicor-kinetic/request/Createlabor` | `integrations/epicor-kinetic/response/Createlabor` | `access_token`, `api_key`, `body` |
| `Listparts` | GET | `/Erp.BO.PartSvc/Parts` | `integrations/epicor-kinetic/request/Listparts` | `integrations/epicor-kinetic/response/Listparts` | `access_token`, `api_key` |
| `Getpart` | GET | `/Erp.BO.PartSvc/Parts('{value.json.PartNum}')` | `integrations/epicor-kinetic/request/Getpart` | `integrations/epicor-kinetic/response/Getpart` | `PartNum`, `access_token`, `api_key` |
| `Createinventoryqtyadj` | POST | `/Erp.BO.InventoryQtyAdjSvc/InventoryQtyAdjs` | `integrations/epicor-kinetic/request/Createinventoryqtyadj` | `integrations/epicor-kinetic/response/Createinventoryqtyadj` | `access_token`, `api_key`, `body` |
| `Listemployees` | GET | `/Erp.BO.EmpBasicSvc/EmpBasics` | `integrations/epicor-kinetic/request/Listemployees` | `integrations/epicor-kinetic/response/Listemployees` | `access_token`, `api_key` |
| `Searchjobs` | GET | `/Erp.BO.JobEntrySvc/Jobs?$filter={value.json.filter}&$top={value.json.top}` | `integrations/epicor-kinetic/request/Searchjobs` | `integrations/epicor-kinetic/response/Searchjobs` | `access_token`, `api_key`, `filter`, `top` |

### Deploy

Get the template card (JSON with `template` and `metadata`) from the broker, then deploy the connector:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
mosquitto_pub -t '$SYS/Coreflux/Command' -m "-routeCode EPICOR_KINETIC"
```

The deployable connector from the REST API app, with `BASE_ADDRESS` already filled in:

```lot theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
DEFINE ROUTE EpicorKineticRestApi WITH TYPE REST_API
    ADD REST_API_CONFIG
        WITH BASE_ADDRESS "https://YOUR_SERVER/YOUR_INSTANCE/api/v2/odata/YOUR_COMPANY"
        WITH ENABLE_CLIENT "true"
        WITH USE_SSL "true"
        WITH REQUEST_TIMEOUT '30'
        WITH DEFAULT_CONTENT_TYPE "application/json"
    ADD EVENT Listjobs
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Listjobs"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Listjobs"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.JobEntrySvc/Jobs"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
    ADD EVENT Getjob
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Getjob"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Getjob"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.JobEntrySvc/Jobs('{value.json.JobNum}')"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
    ADD EVENT Createlabor
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Createlabor"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Createlabor"
        WITH METHOD "POST"
        WITH ENDPOINT "/Erp.BO.LaborSvc/Labors"
        WITH HEADERS
            ADD "Content-Type" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
        WITH BODY "{value.json.body}"
    ADD EVENT Listparts
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Listparts"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Listparts"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.PartSvc/Parts"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
    ADD EVENT Getpart
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Getpart"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Getpart"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.PartSvc/Parts('{value.json.PartNum}')"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
    ADD EVENT Createinventoryqtyadj
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Createinventoryqtyadj"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Createinventoryqtyadj"
        WITH METHOD "POST"
        WITH ENDPOINT "/Erp.BO.InventoryQtyAdjSvc/InventoryQtyAdjs"
        WITH HEADERS
            ADD "Content-Type" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
        WITH BODY "{value.json.body}"
    ADD EVENT Listemployees
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Listemployees"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Listemployees"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.EmpBasicSvc/EmpBasics"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
    ADD EVENT Searchjobs
        WITH SOURCE_TOPIC "integrations/epicor-kinetic/request/Searchjobs"
        WITH DESTINATION_TOPIC "integrations/epicor-kinetic/response/Searchjobs"
        WITH METHOD "GET"
        WITH ENDPOINT "/Erp.BO.JobEntrySvc/Jobs?$filter={value.json.filter}&$top={value.json.top}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "Bearer {value.json.access_token}"
            ADD "x-api-key" "{value.json.api_key}"
```

Deploy it with `-addRoute` (do not include `ADD METADATA`).

### Usage example

Call `Listjobs` by publishing a JSON payload to its request topic, and read the reply on the response topic:

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
mosquitto_sub -t 'integrations/epicor-kinetic/response/Listjobs' &
mosquitto_pub -t 'integrations/epicor-kinetic/request/Listjobs' -m '{"access_token": "<access_token>", "api_key": "<api_key>"}'
```

## Related

* [REST API Connectors](/latest/lot-language/routes/rest-api-routes)
* [REST API apps index](/latest/lot-language/routes/rest-api-apps)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.