# Infor M3 API Swagger: Discover MI Programs, Authenticate and Test Calls

> Source: https://netray.co/erp-help/infor-m3-api-swagger-ion-api-openapi-docs
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

M3 exposes its business logic as MI programs (such as MMS200MI or OIS100MI) with transactions that you call over REST through ION API. The ION API portal presents the available APIs with Swagger/OpenAPI documentation, so you can browse programs and transactions, see input and output fields, and try calls after authenticating with an OAuth 2.0 token from an ionapi credentials file.

## Kind

how-to

## System

infor-m3

## Erp

Infor M3

## Module

M3 APIs / ION API

## Query

infor m3 api swagger

## Alternate Queries

- infor m3 api documentation openapi
- infor m3 rest api swagger
- find m3 mi programs and transactions

## Applies To

Infor M3 with Infor OS / ION API (cloud and on-prem); portal layout and menu names vary by version

## Steps

### How to discover and test M3 APIs

**Items:**

In Infor OS open ION API and look for the API suite entries for M3. The M3 API documentation is exposed there with an OpenAPI/Swagger view.

Browse the MI programs. Each program (for example MMS200MI for items) contains transactions such as GetItmBasic or LstItmBasic. Open a transaction to see its input fields and returned fields.

Create an authorized application in ION API as a backend or service type, and download its credentials as an .ionapi file. Treat that file as a secret.

Read the file: it holds the tenant id, client id, client secret, the base and token endpoints, and service account keys if you use the service account flow.

Request an access token from the token endpoint using the grant type documented for your application type, and note the expiry time.

Call the M3 REST path with the Authorization: Bearer header. The pattern is the ION API gateway URL, the tenant, M3, then m3api-rest/v2/execute followed by program and transaction.

Pass input fields as query parameters, for example ITNO for an item number, and read the JSON response, including the error element if the transaction failed.

Make sure the service user has M3 authorizations for the program and transaction; an authorization error in M3 comes back as an error in the response, not as an HTTP failure.

## Sections

### What Swagger shows and does not show

**Body:**

The Swagger view documents the REST surface: path, method, parameters and response structure. For M3 it is the quickest way to find the exact transaction name and the field names without reading the older MI program documentation.

It does not show your business rules. A call can be valid in structure and still fail in M3 because of a missing authorization, a wrong company or division, or a rule specific to your configuration. The error text in the response is your guide.

### Authentication through ION API

**Body:**

Production integrations should use a service account flow with the keys in the ionapi file, so no human password is stored in the integration. Keep the file out of source control, rotate the secret on a schedule, and give the service user only the M3 authorizations the integration needs.

Tokens expire. Cache the token for its lifetime and refresh on expiry rather than requesting one per call, which is slow and may be rate limited.

**Code:**

- GET https://<ionapi-gateway>/<tenant>/M3/m3api-rest/v2/execute/MMS200MI/GetItmBasic?ITNO=A100
Authorization: Bearer <access_token>
Accept: application/json

### Testing and common errors

**Body:**

Test in Swagger or a tool such as Postman first, with one item you know exists. Then move the same call into code. If it works in the tool and fails in code, compare headers and the URL line by line.

Common errors: expired token (401), wrong tenant in the path, missing M3 authorization for the program, and list transactions returning only a capped number of records. Handle pagination for lists as described in the page on MI list pagination.

## Pitfalls

- Committing the .ionapi file to source control.
- Requesting a token for every call instead of caching it.
- Using a personal user instead of a service account for integrations.
- Assuming a valid REST call implies M3 authorization.
- Ignoring the maximum returned records on list transactions.

## Ai Angle

An assistant that knows your M3 API catalog can turn a request in plain language into the right MI program, transaction and field names, show the call it would make, and run read-only transactions on request. Write transactions stay behind human approval.

## Faq

### Where is the Infor M3 API Swagger?

**Answer:** In Infor OS under ION API, where the M3 APIs are documented with an OpenAPI/Swagger view. Availability and exact navigation depend on your Infor OS version and tenant.

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

**Answer:** Create an authorized app in ION API, download the .ionapi file, request an OAuth 2.0 token from the token endpoint it describes, and send it as a Bearer token. Service accounts are recommended for integrations.

### What is an MI program?

**Answer:** An MI program is an M3 API program, for example MMS200MI for items. It contains transactions that read or change M3 data, each with defined input and output fields.

### Why does my call return an authorization error?

**Answer:** The user the token represents lacks M3 authority for that program or transaction. Grant the right security permissions in M3 to the service user and retry.

## Search terms

infor m3 api swagger, infor m3 rest api, m3 mi programs, ion api m3, infor ionapi file, m3api-rest execute, infor m3 openapi, infor os ion api

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