> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/infor-integration-and-configuration/importing-customer-master-data/m3/import-from-infor-m3-to-docbits-via-api.md).

# Import from Infor M3 to DocBits via API

## Step 1: Create an API

1. Open **Infor OS** and navigate to **API Gateway** > **Available APIs**.
2. Click **Add**, then select **Create New**.
3. Fill in the details for the API:
   * **Application Name**: `DocBits-Stage`, `DocBits-Sandbox`, `DocBits-Prod`, or `DocBits-Demo` (based on your environment).
   * **Suite Name**: Same as the application name.
   * **API Context**: Same as the application name.
   * **Description**: Same as the application name.
   * **Icon**: Select a blue document icon.

<figure><img src="/files/nqQ9zMy7Fpf4ELYe4oTu" alt=""><figcaption></figcaption></figure>

4. Add a **Target Endpoint**:

<figure><img src="/files/bbjWKlK1XyDtvCeBzBKr" alt=""><figcaption></figcaption></figure>

* **Target Endpoint URL**: Use the appropriate URL for your environment:
  * `https://stage.api.docbits.com`
  * `https://sandbox.api.docbits.com`
  * `https://api.docbits.com`
  * `https://demo.api.docbits.com`
* **Target Endpoint Description**: `Stage`, `Sandbox`, `Prod`, or `Demo` (matching the environment).
* **Proxy Context**: Same as the environment (`Stage`, `Sandbox`, `Prod`, or `Demo`).
* **Proxy Security**: Select **OAuth 2.0**.

<figure><img src="/files/wFkWjnBxeMczeehhjnDR" alt=""><figcaption></figcaption></figure>

* **Target Endpoint Security**:
  * **Authentication Type**: API Key
  * **Key Mode**: Header
  * **Key Name**: `X-API-KEY`
  * **Key Value**: Retrieve the API key from **DocBits** by navigating to **Settings** > **Global Settings** > **Integration**, then copy the API key and paste it as the key value.
* Save the target endpoint configuration.

<figure><img src="/files/oryRK14a7PsdOkucmdXJ" alt=""><figcaption></figcaption></figure>

5. Add API Documentation:

* Return to the API documentation section by clicking **Documentation Icon** in the created Endpoint.

<figure><img src="/files/iTdw22rTqce8iku3p8Kf" alt=""><figcaption></figcaption></figure>

* Scroll down to the **Documentation** section and click **+ Add Documentation**.
  * **Name**: `DocBits-Stage`, `DocBits-Sandbox`, `DocBits-Prod`, or `DocBits-Demo` (matching the environment).
  * **Type**: Swagger
  * **Enter URL or Upload Swagger JSON/YAML**: Use the appropriate Swagger file URL for your environment:
    * `https://stage.api.docbits.com/openapi.json`
    * `https://sandbox.api.docbits.com/openapi.json`
    * `https://api.docbits.com/openapi.json`
    * `https://demo.api.docbits.com/openapi.json`
  * Ensure there is no trailing space at the end of the URL.

<figure><img src="/files/PRtz3LGC67Jis08yaVSz" alt=""><figcaption></figcaption></figure>

* The API documentation will automatically be added, and the metadata refresh will be triggered.

<figure><img src="/files/hhZj92Yxiw7lKv1WqPSB" alt=""><figcaption></figcaption></figure>

## Step 2: Create an API Connection Point

1. Navigate to **OS** > **ION** > **Connect** > **Connection Point**.
2. Click **Add** and select **API** as the connection type.
3. Fill in the required details:
   * **Name**: `DocBits_Import`
   * **Description**: `DocBits_Import`
   * **Service Account**: Upload the service account file that was created earlier.

### Step 2.1: Add and Configure Documents

* You don't need to add all documents—only the necessary ones.
* The documents **Sync.ChartOfAccounts** and **Sync.CodeDefinition** are required for auto-accounting.

## Sync.SupplierPartyMaster

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. Click **Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.SupplierPartyMaster`

<figure><img src="/files/1CEXpLpryRTsPs628V3L" alt=""><figcaption></figcaption></figure>

3. Configure the ION API:
   * **API Call Name**: `Sync.SupplierPartyMaster`
   * **Click on Select**
   * For **Product**, choose the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/supplier_bod
     ```
   * Click **OK** to confirm the selection.

<figure><img src="/files/UTC7XnTpMMVbkd3F6YrX" alt=""><figcaption></figcaption></figure>

4. Set the **Request Body**:
   * For **File**, select **Input Document = No Compression**.

<figure><img src="/files/CJ53x220n75mKBLwf3HK" alt=""><figcaption></figcaption></figure>

## Sync.RemitToPartyMaster

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.RemitToPartyMaster`

<figure><img src="/files/neCLWoj9HSi1LDA2cnEo" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.RemitToPartyMaster`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/supplier_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/pOe3WvaVLP29mxbCUpyI" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, select **Input Document = No Compression**.

<figure><img src="/files/SQyy7XrR3A45yCH3cxP3" alt=""><figcaption></figcaption></figure>

## Acknowledge.SupplierInvoice

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Acknowledge.SupplierInvoice`
3. **Configure the ION API**:
   * **API Call Name**: `Acknowledge.SupplierInvoice`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/infor/idm/handle_ack_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/m5blQRJEA37Stz9bp2nz" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**: Add the following values in the **Request Body** section:
   * For **idm\_doc\_type**, set **Value** = `M3_SupplierInvoice`
   * For **idm\_bod\_id\_field\_name**, set **Value** = `BOD_AlternateDocumentID_1`
   * For **attributes\_map**, set **Value** =

     ```
     {"Export": "Success"}
     ```
   * For **acl\_from**, set **Value** = `Public`
   * For **acl\_to**, set **Value** = `Private`
   * For **set\_to\_error\_on\_rejected**, set **Value** = `True`
   * For **delete\_from\_idm\_on\_rejected**, set **Value** = `True`
   * For **File**, set **Input Document = No Compression**.
   * For **ionapi\_json**: Add the content of the ionapi file.

<figure><img src="/files/Lgo1Hv0WiJC7uE6XLVwO" alt=""><figcaption></figcaption></figure>

## Sync.PurchaseOrder

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.PurchaseOrder`

<figure><img src="/files/TK8gx7ruUELcXEiiTXOP" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.PurchaseOrder`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/purchase_order_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/QaDVpLYYKM62DwSJs5LS" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, set **Input Document = No Compression**.

<figure><img src="/files/TfIuUusA8Q5HDNpjXL7a" alt=""><figcaption></figcaption></figure>

## Sync.ReceiveDelivery

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.ReceiveDelivery`

<figure><img src="/files/Ns8UXL89O8FpDMNx3ipV" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.ReceiveDelivery`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/receive_delivery_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/ISQ3LMObwVMlUH3CA2HS" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, set **Input Document = No Compression**.

## Sync.AdvanceShipNotice

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.AdvanceShipNotice`

<figure><img src="/files/OZMCFT8eBWun1I7NGOM8" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.AdvanceShipNotice`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/iLSz5qZKp6pbjnBbgt5B" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set **Value** = `AdvanceShipNotice`
   * For **field\_mappings**, set **Value** =

     ```
     { "ID": "//DataArea/LnTaxCode/DocumentID/ID" }
     ```
   * For **File**, set **Input Document = No Compression**.

<figure><img src="/files/7BBTctYTQ0qkzvKenEpA" alt=""><figcaption></figcaption></figure>

## Sync.ChartOfAccounts

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.ChartOfAccounts`

<figure><img src="/files/6WgfqpCjHm6fKL9voOcY" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.ChartOfAccounts`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/uLWZidQrtEFrlTPCUvAt" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set Value = `ChartOfAccounts`
   * For **field\_mappings**, set Value =

     ```
     {
         "ID": "//DataArea/ChartOfAccounts/IDs/ID",
         "NominalAccount": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/GLNominalAccount",
         "AccountType": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/AccountType",
         "Description": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/Description",
         "DimensionProfile": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/ID",
         "Dimension1": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[0]/ListID",
         "Usage1": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[0]/Usage",
         "Dimension2": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[1]/ListID",
         "Usage2": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[1]/Usage",
         "Dimension3": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[2]/ListID",
         "Usage3": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[2]/Usage",
         "Dimension4": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[3]/ListID",
         "Usage4": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[3]/Usage",
         "Dimension5": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[4]/ListID",
         "Usage5": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[4]/Usage",
         "Dimension6": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[5]/ListID",
         "Usage6": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[5]/Usage",
         "Dimension7": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[6]/ListID",
         "Usage7": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[6]/Usage"
     }
     ```
   * For **File**, set **Input Document = No Compression**.

<figure><img src="/files/LPFgvYLuJPyUsnkvf38A" alt=""><figcaption></figcaption></figure>

## Sync.CodeDefinition-AccountingDimension

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="/files/hgJp21AMoknsr8aVJ38u" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.CodeDefinition`

<figure><img src="/files/dWPnW9R964AvLPXGMqzv" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.CodeDefinition-AccountingDimension`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="/files/h8de9YuMZcZFGJD2VT9a" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set Value = `M3Dimension`
   * For **field\_mappings**, set Value =

     ```
     {
         "ID": "//DataArea/CodeDefinition/DocumentID/ID",
         "Dimension": "substring(//DataArea/CodeDefinition/CodeValue/@listID,21)",
         "ListID": "//DataArea/CodeDefinition/ListID",
         "CodeValue": "//DataArea/CodeDefinition/CodeValue",
         "Description": "//DataArea/CodeDefinition/Description"
     }
     ```
   * For **File**, set **Input Document = No Compression**

<figure><img src="/files/bJcsDPnd7TBX67RaK3ZW" alt=""><figcaption></figcaption></figure>

## Step 3: Create the Document Flow

1. Navigate to **OS** > **ION** > **Connect** > **Data Flows**.
2. Click **Add** and select **Document Flow**.
3. Fill in the required fields:
   * **Name**: Use a name specific to your environment, such as `M3-to-DocBits-Stage-Import-API`
   * for stage, `M3-to-DocBits-Sandbox-Import-API` for sandbox, or `M3-to-DocBits-Prod-Import-API` for production.
   * **Description**: Same as the name above.
4. Configure the Application Node:
   * Under **Application**, set the **Name** to `M3`.

<figure><img src="/files/BngIvPVRHIauEJb5NKNK" alt=""><figcaption></figcaption></figure>

* Click the **+** button and select the customer's connection point.

<figure><img src="/files/IW0CO7yYGBgrTIJBpDQu" alt=""><figcaption></figcaption></figure>

* Click on the **Document** icon next to the application node.
  * Select all the documents you want to export/sync from LN to DocBits.
  * Ensure these documents match the ones selected in **Step 2: Create an API Connection Point**.
  * If any documents are missing, they must be added to the customer's connection point.

<figure><img src="/files/3fH1R8fo78zXlux30P5f" alt=""><figcaption></figcaption></figure>

5. Configure the API Node:
   * Add a **API** node and position it to the right of the application node.
   * Fill in the required fields:
     * **Name**: `DocBits-API`
     * **Description**: `DocBits-API`
     * **ION API Connector**: Use the connection point created in **Step 2: Create an API Connection Point**.
   * Click the **Document** icon next to the stream node. This should be empty.

<figure><img src="/files/AUlyMo7pLVNCYIHpuCeW" alt=""><figcaption></figcaption></figure>

6. Finalize the Setup:
   * Save the configuration.
   * Click **Activate** to complete the setup.

<figure><img src="/files/eNzWJ9Ogz60qIO1COEuw" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.docbits.com/infor-integration-and-configuration/importing-customer-master-data/m3/import-from-infor-m3-to-docbits-via-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
