canonical: https://jentic.com/apis/ptg.co.th/ptg

# PTG PMS Connect API

The PTG PMS Connect API exposes PTG's employee directory, organisation structure, and vehicle equipment records to connected systems. It returns active and inactive employees, the subordinates under a position code, and the company, division, department, and section hierarchy, along with equipment lists, fuel and car types, and vehicle meter logs by car registration. It also issues tokens and validates employee and Active Directory logins for the systems that call it. The only server in the spec is a UAT host.

## For AI agents

Look up PTG employees, subordinates by position code, and the division, department, and section hierarchy, and read vehicle equipment, fuel types, and meter logs. Also validates employee and Active Directory logins.

## Scope

Does not handle payroll, recruiting, or live vehicle tracking. Use for reading PTG employee, organisation, and equipment records only.

## Capabilities

- Search active employees and separately list employees who are no longer active, filtered by searchText and a dateStart to dateEnd range
- Find the subordinates reporting under a position code and fetch one employee by person code
- Read the organisation hierarchy: company, divisions, departments, sections, organisation unit types, and work types
- List equipment, equipment types, equipment statuses, fuel types, car types, car colors, and account groups
- Retrieve meter logs for one vehicle by carRegister, or the latest meter logs across all cars
- Validate an employee or Active Directory login and create a token for a calling system with username, tokenGroup, and systemName
- Look up suppliers by vendorID or search text and read the working calendar for a given year and month

## Use cases

### Agent lookups across the PTG employee directory

An AI agent answering internal questions can query the PTG PMS Connect API for an employee by person code, search the active directory by name with searchText, and walk the reporting line with the subordinate lookup by position code. Because the division, department, and section lists come from the same API, the agent can place each person in the organisation structure in one session.

Example prompt: Call the subordinate lookup with positionCode P1023, then fetch each returned employee by personCode and group them by department

### Fleet meter log monitoring

Operations teams track company vehicle usage from meter logs. The API returns the logs for one vehicle when given its carRegister value, and a paged list of the latest meter logs for all cars, alongside equipment, car type, and fuel type reference lists, so usage reports can be assembled without exporting from the PMS.

Example prompt: Fetch the latest meter logs with page 1 and pageSize 100, then pull the full meter log history for the first carRegister returned

### Leaver reconciliation

HR and IT teams need to know who has left so accounts can be closed. The inactive-employee operation lists employees who are not active, filtered by a dateStart and dateEnd window and searchText, which a connected system can compare against its own user list to find accounts that should be removed.

Example prompt: List inactive employees with dateStart 2026-07-01 and dateEnd 2026-09-30 and return their person codes for account review

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/emp/employees` | Get all employees |
| GET | `/v1/emp/GetEmpcodeSubordinate/{positionCode}` | Get subordinates by position code |
| GET | `/v1/emp/GetEmployeeByPersonCode/{personCode}` | Get an employee by person code |
| POST | `/v1/emp/empnotactive` | Get inactive employees |
| POST | `/v1/equip/all` | Get all equipment |
| POST | `/v1/equip/meterLogs` | Get meter logs by car registration |
| POST | `/v1/master/departments` | Get departments |
| POST | `/v1/auth/createtoken` | Create a token |

## Key resources

- **Employees** — Active and inactive employee records, looked up by person code or search text
- **Organisation structure** — Company, divisions, departments, sections, and organisation unit types
- **Equipment** — Equipment records, types, statuses, and account groups
- **Vehicles** — Car types, colors, report types, and meter logs by car registration
- **Auth** — Token creation and employee and Active Directory login validation

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 58 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 73 / 100
  - Developer Experience & Jentic Compatibility: 72 / 100
  - AI-Readiness & Agent Experience: 35 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 60 / 100
- **View full report:** https://jentic.com/apis/ptg.co.th/ptg/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring PTG PMS Connect by hand means obtaining a bearer JWT, attaching it to the Authorization header, and building the paged POST bodies with page, pageSize, and date ranges that most of its lookups use. Through Jentic you install once, import PTG PMS Connect from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Most PTG PMS Connect lookups carry their filters in the request body rather than the URL path, so a rule bounds which operations your agent may call, not which employees or vehicles it reads. You choose the operations it may call, so sensitive ones like Active Directory login validation or token creation are not included unless you add them.
- **Credential handling:** Your PTG PMS Connect token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find an employee's subordinates' or 'get vehicle meter logs', and Jentic returns the matching PTG PMS Connect operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Merge HRIS API** — Merge returns normalised employee and employment data from many HRIS platforms through one schema.
- **Bob API** — HiBob's API manages employees, onboarding, and time off in a hosted HR platform.
- **NetworkFleet API** — NetworkFleet supplies vehicle telematics to set beside PTG's equipment and meter log records.

## FAQ

### What authentication does the PTG PMS Connect API use?

The PTG PMS Connect API declares HTTP bearer authentication with a JWT sent as Authorization: Bearer {token}, per its OpenAPI spec. The spec also includes a POST `/v1/auth/createtoken` operation that takes username, tokenGroup, and systemName. Through Jentic the token is stored once and injected at call time, so it never appears in your agent's prompt or logs.

### Can I find who reports to a manager with the PTG PMS Connect API?

Yes. GET `/v1/emp/GetEmpcodeSubordinate/{positionCode}` returns the employees under a position code, and GET `/v1/emp/GetEmployeeByPersonCode/{personCode}` returns a single employee's record, so an agent can walk a reporting line one level at a time.

### What are the rate limits for the PTG PMS Connect API?

The OpenAPI spec does not specify rate limits for the PTG PMS Connect API. Contact PTG support through https://www.ptg.co.th/contact for current limits and access terms.

### Which server does the PTG PMS Connect API spec point to?

The spec lists one server, a UAT host at depwn2021.ptg.co.th under the /ptgpmsapi base path. It does not declare a production host, so confirm the right environment with PTG before connecting live systems.

### How do I read vehicle meter logs with the PTG PMS Connect API through Jentic?

Search Jentic for 'get vehicle meter logs', which returns POST `/v1/equip/meterLogs` with its input schema, then send the carRegister value for the vehicle. For every car at once, use POST `/v1/equip/latestMeterLogs` with page and pageSize. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a PTG PMS Connect MCP server?

You don't need an MCP server to give your agent the PTG PMS Connect API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it, discovering operations on demand rather than loading every tool definition into context.

### Can I limit what my agent is allowed to do with the PTG PMS Connect API?

Yes. Write a rule that allows only the equipment and meter log operations under `/v1/equip`, so the agent can report on vehicles but cannot read employee records or call the login validation operations, and every call it makes is logged.
