# Infor M3 MI API Transaction Call Generator (REST URL, curl and JavaScript)

> Source: https://netray.co/tools/infor-m3-mi-api-transaction-call-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Fill in program, transaction and parameters to get a ready M3 REST call as URL, curl and a JavaScript fetch snippet.

## Category

infor-cloudsuite

## Erp

Infor M3

## Audience

- M3 developer
- Integration consultant
- M3 technical consultant

## Tool

**Kind:** template

**Output:** code

**Language:** http

**Fields:**

#### ION API gateway host

**Key:** host

**Type:** text

**Default:** mingle-ionapi.eu1.inforcloudsuite.com

#### Tenant name

**Key:** tenant

**Type:** text

**Default:** ACME_PRD

#### MI program

**Key:** program

**Type:** text

**Default:** MMS200MI

#### Transaction

**Key:** transaction

**Type:** text

**Default:** GetItmBasic

#### Company (CONO)

**Key:** cono

**Type:** text

**Default:** 100

#### Key parameter name

**Key:** key_name

**Type:** text

**Default:** ITNO

#### Key parameter value

**Key:** key_value

**Type:** text

**Default:** A-1001

**Blocks:**

#### Request URL (ION API, v2 execute)

**Body:** GET https://{{host}}/{{tenant}}/M3/m3api-rest/v2/execute/{{program}}/{{transaction}}?CONO={{cono}}&{{key_name}}={{key_value}}
Authorization: Bearer <access token from ION API>
Accept: application/json

#### curl

**Body:** curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \
  "https://{{host}}/{{tenant}}/M3/m3api-rest/v2/execute/{{program}}/{{transaction}}?CONO={{cono}}&{{key_name}}={{key_value}}"

#### JavaScript (fetch)

**Body:** const url = "https://{{host}}/{{tenant}}/M3/m3api-rest/v2/execute/{{program}}/{{transaction}}?CONO={{cono}}&{{key_name}}={{key_value}}";
const res = await fetch(url, {
  headers: { Authorization: "Bearer " + token, Accept: "application/json" }
});
if (!res.ok) throw new Error("M3 API error " + res.status);
const data = await res.json();
console.log(data.results);

#### Reading the response

**Body:** // Typical shape of a successful response:
// { "program": "{{program}}", "transaction": "{{transaction}}",
//   "results": [ { "records": [ { "{{key_name}}": "{{key_value}}", ... } ] } ] }
// On failure M3 returns an error message field (often named errorMessage or message). Log it as is.

**Notes:** The URL pattern shown is the ION API form used by Infor cloud tenants. On-premise or older setups may use a different base path, for example the m3api-rest/execute form on the M3 server. Parameter names, mandatory fields and the CONO requirement differ per transaction, so check the transaction in the API repository (M3 API Tool or program documentation) before calling. Use read transactions (Get, Lst) first. Never put tokens in source control.

## Content

**Intro:** Calling an M3 MI program over REST is easy once you have the URL right and hard to remember when you only do it twice a month. This generator builds the call for any program and transaction as a raw request, curl and a JavaScript fetch snippet.

**Sections:**

#### How to use the generator

**Body:** Enter your ION API gateway host and tenant, then the MI program and transaction, for example MMS200MI and GetItmBasic or CRS610MI and GetBasicData. Add the key field of the transaction and its value. Copy the snippet that matches your tool, set a valid token and run it. The default values are samples only and will not return data from your tenant.

#### How MI programs work

**Body:** An MI program is a published interface onto an M3 business object. Each has transactions with input and output fields, named by verb: Get returns one record, Lst returns a list, Add creates, Upd changes, Del removes. Calls run under the authority of the user behind the token, so M3 security and the user company and division defaults apply. Many transactions require CONO or the division to be set when the default does not match.

**Bullets:**

- Prefer Get and Lst while you learn a transaction
- Check mandatory fields in the API repository, not by trial and error
- Test Add and Upd calls only in a non-production tenant
- Handle maximum record limits on Lst transactions by paging

#### Common mistakes

**Body:** Typical problems are a wrong tenant name in the path, an expired token, sending a field name from the screen rather than the API field name, and forgetting that M3 returns HTTP 200 for some business errors with the error inside the body. Always inspect the response body and log it. Another trap is writing through the API in bulk without a rollback plan: Add and Upd calls take effect immediately.

**Cta:** If you are building repeatable integrations or want an assistant that can look up M3 data safely, Netray can help design it with approval steps on any write.

**Faq:**

#### What is an M3 MI program?

**Answer:** An MI (M3 Interface) program is a published API for a business object such as items, customers or customer orders. Each MI program exposes transactions like Get, Lst, Add and Upd that you can call from outside M3 over REST or SOAP.

#### Which authentication does the call need?

**Answer:** On Infor cloud tenants you call through ION API with an OAuth 2.0 access token obtained from an ION API service account. The token determines which M3 user the call runs as, which in turn controls what data and functions are allowed.

#### How do I find the fields of a transaction?

**Answer:** Use the M3 API repository, the M3 API Tool in the Infor documentation set, or the API metadata of your tenant. They list mandatory inputs and returned fields per transaction. Field names are the four- or five-letter M3 field codes such as ITNO or CUNO.

#### Is this tool calling my M3?

**Answer:** No. It only builds text in your browser. Nothing is sent to M3 or to Netray. You run the generated call yourself from curl, Postman or your own code.

## Search terms

M3 API call example, M3 MI API REST, m3api-rest execute, MMS200MI GetItmBasic, CRS610MI GetBasicData, Infor ION API M3 call, M3 API curl, M3 MI program transaction

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